Browse Source

DESIGN-4160 feat: 复选树节点,某一个节点支持灰化,复选框也灰化,并且前边的展开收起是正常的

即disabled属性不再限制展开收起
es6
zsmj 3 years ago
parent
commit
a6e85eb8d3
  1. 6
      src/case/ztree/0.treeview.js
  2. 9
      src/case/ztree/1.asynctree.js

6
src/case/ztree/0.treeview.js

@ -225,16 +225,10 @@ BI.TreeView = BI.inherit(BI.Pane, {
}
function onExpand(event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
treeNode.halfCheck = false;
}
function onCollapse(event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
}
return setting;

9
src/case/ztree/1.asynctree.js

@ -104,9 +104,6 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
}
function beforeExpand(treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
self._beforeExpandNode(treeId, treeNode);
}
@ -118,16 +115,10 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
}
function onExpand(event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
treeNode.halfCheck = false;
}
function onCollapse(event, treeId, treeNode) {
if (treeNode.disabled) {
return false;
}
treeNode.halfCheck = false;
}

Loading…
Cancel
Save