From acada738b5d2f682fcfae3151ed2349be8bc80b4 Mon Sep 17 00:00:00 2001 From: unknown <1374721899@qq.com> Date: Wed, 19 Jun 2019 21:28:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E8=88=87=E7=95=B0=E6=AD=A5?= =?UTF-8?q?=E7=9A=84=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../multilayerselecttree/multilayerselecttree.leveltree.js | 4 +++- src/widget/multilayerselecttree/multilayerselecttree.popup.js | 1 + .../multilayersingletree/multilayersingletree.leveltree.js | 4 +++- src/widget/multilayersingletree/multilayersingletree.popup.js | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/widget/multilayerselecttree/multilayerselecttree.leveltree.js b/src/widget/multilayerselecttree/multilayerselecttree.leveltree.js index 2c3b9a0dc0..ae0ddb11e1 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.leveltree.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.leveltree.js @@ -9,6 +9,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, { return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-multilayer-select-level-tree", isDefaultInit: false, + async: false, items: [], itemsCreator: BI.emptyFn, keywordGetter: BI.emptyFn, @@ -97,7 +98,8 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, { el: { type: "bi.loader", - isDefaultInit: true, + // loader的isDefaultInit为异步加载服务,如果是同步选择不开启 + isDefaultInit: o.async, chooseType: o.chooseType, el: { type: "bi.button_tree", diff --git a/src/widget/multilayerselecttree/multilayerselecttree.popup.js b/src/widget/multilayerselecttree/multilayerselecttree.popup.js index b2e904e54e..cb38078154 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.popup.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.popup.js @@ -26,6 +26,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, { this.tree = BI.createWidget({ type: "bi.multilayer_select_level_tree", isDefaultInit: o.isDefaultInit, + async: o.itemsCreator !== BI.emptyFn, items: o.items, itemsCreator: function (op, callback) { (op.times === 1 && !op.node) && BI.nextTick(function () { diff --git a/src/widget/multilayersingletree/multilayersingletree.leveltree.js b/src/widget/multilayersingletree/multilayersingletree.leveltree.js index f2d9ff1f4f..3786581283 100644 --- a/src/widget/multilayersingletree/multilayersingletree.leveltree.js +++ b/src/widget/multilayersingletree/multilayersingletree.leveltree.js @@ -9,6 +9,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, { return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-multilayer-single-level-tree", isDefaultInit: false, + async: false, items: [], itemsCreator: BI.emptyFn, keywordGetter: BI.emptyFn, @@ -96,7 +97,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, { el: { type: "bi.loader", - isDefaultInit: true, + // loader的isDefaultInit为异步加载服务,如果是同步选择不开启 + isDefaultInit: o.async, chooseType: o.chooseType, el: { type: "bi.button_tree", diff --git a/src/widget/multilayersingletree/multilayersingletree.popup.js b/src/widget/multilayersingletree/multilayersingletree.popup.js index 7e9aca6f9f..37a9601b1c 100644 --- a/src/widget/multilayersingletree/multilayersingletree.popup.js +++ b/src/widget/multilayersingletree/multilayersingletree.popup.js @@ -25,6 +25,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, { this.tree = BI.createWidget({ type: "bi.multilayer_single_level_tree", isDefaultInit: o.isDefaultInit, + async: o.itemsCreator !== BI.emptyFn, items: o.items, itemsCreator: function (op, callback) { (op.times === 1 && !op.node) && BI.nextTick(function () {