Browse Source

无JIRA任务 设置不选multilayertree的getValue问题

es6
windy 5 years ago
parent
commit
d6ce996fba
  1. 6
      src/widget/multilayerselecttree/multilayerselecttree.leveltree.js
  2. 6
      src/widget/multilayersingletree/multilayersingletree.leveltree.js

6
src/widget/multilayerselecttree/multilayerselecttree.leveltree.js

@ -111,9 +111,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
el: {
type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors,
layouts: [{
type: "bi.vertical"
@ -150,8 +150,12 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
},
setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v;
this.tree.setValue(v);
}
},
getValue: function () {

6
src/widget/multilayersingletree/multilayersingletree.leveltree.js

@ -110,9 +110,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
el: {
type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors,
layouts: [{
type: "bi.vertical"
@ -149,8 +149,12 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
},
setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v;
this.tree.setValue(v);
}
},
getValue: function () {

Loading…
Cancel
Save