Browse Source

同步與異步的問題

es6
unknown 5 years ago
parent
commit
acada738b5
  1. 4
      src/widget/multilayerselecttree/multilayerselecttree.leveltree.js
  2. 1
      src/widget/multilayerselecttree/multilayerselecttree.popup.js
  3. 4
      src/widget/multilayersingletree/multilayersingletree.leveltree.js
  4. 1
      src/widget/multilayersingletree/multilayersingletree.popup.js

4
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",

1
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 () {

4
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",

1
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 () {

Loading…
Cancel
Save