File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -327,6 +327,15 @@ export default class TreeStore {
327327 }
328328 }
329329
330+ setCheckedAll ( checked = true ) {
331+ const allNodes = this . _getAllNodes ( ) ;
332+
333+ for ( const node of allNodes ) {
334+ node . indeterminate = false ;
335+ node . checked = checked ;
336+ }
337+ }
338+
330339 getCurrentNode ( ) {
331340 return this . currentNode ;
332341 }
Original file line number Diff line number Diff line change @@ -308,6 +308,10 @@ export default {
308308 this .store .setChecked (data, checked, deep);
309309 },
310310
311+ setCheckedAll (checked = true ) {
312+ this .store .setCheckedAll (checked);
313+ },
314+
311315 getHalfCheckedNodes () {
312316 return this .store .getHalfCheckedNodes ();
313317 },
@@ -633,4 +637,4 @@ export default {
633637 this .checkboxItems = this .$el .querySelectorAll (" input[type=checkbox]" );
634638 }
635639};
636- </script >
640+ </script >
You can’t perform that action at this time.
0 commit comments