File tree 2 files changed +14
-1
lines changed
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 {
327
327
}
328
328
}
329
329
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
+
330
339
getCurrentNode ( ) {
331
340
return this . currentNode ;
332
341
}
Original file line number Diff line number Diff line change @@ -308,6 +308,10 @@ export default {
308
308
this .store .setChecked (data, checked, deep);
309
309
},
310
310
311
+ setCheckedAll (checked = true ) {
312
+ this .store .setCheckedAll (checked);
313
+ },
314
+
311
315
getHalfCheckedNodes () {
312
316
return this .store .getHalfCheckedNodes ();
313
317
},
@@ -633,4 +637,4 @@ export default {
633
637
this .checkboxItems = this .$el .querySelectorAll (" input[type=checkbox]" );
634
638
}
635
639
};
636
- </script >
640
+ </script >
You can’t perform that action at this time.
0 commit comments