Browse Source

refactor: 优化写法

es6
iapyang 4 years ago
parent
commit
80a11742bd
  1. 8
      src/component/treevaluechooser/abstract.treevaluechooser.js

8
src/component/treevaluechooser/abstract.treevaluechooser.js

@ -638,13 +638,9 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
return false; return false;
} }
var can = true; return BI.every(selected, function (value) {
return isAllSelected(selected[value], BI.concat(parents, value));
BI.each(selected, function (value) {
can = can && isAllSelected(selected[value], BI.concat(parents, value));
}); });
return can;
} }
function getCheckState(current, parentValues, valueMap, checkState) { function getCheckState(current, parentValues, valueMap, checkState) {

Loading…
Cancel
Save