From 99b385eebc62bdc51ccc1533a685f08946e55b66 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 27 Aug 2018 09:30:51 +0800 Subject: [PATCH] update --- .../multiselect/demo.multi_select_combo.js | 39 ++----------------- dist/demo.js | 39 ++----------------- 2 files changed, 6 insertions(+), 72 deletions(-) diff --git a/demo/js/widget/multiselect/demo.multi_select_combo.js b/demo/js/widget/multiselect/demo.multi_select_combo.js index 33dc703dd..4875747b1 100644 --- a/demo/js/widget/multiselect/demo.multi_select_combo.js +++ b/demo/js/widget/multiselect/demo.multi_select_combo.js @@ -10,7 +10,7 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, { var self = this; var widget = BI.createWidget({ type: "bi.multi_select_insert_combo", - //itemsCreator: BI.bind(this._itemsCreator, this), + itemsCreator: BI.bind(this._itemsCreator, this), width: 200, value: { type: 1, @@ -72,47 +72,14 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, { }, 1000); }, - _createTreeCombo: function () { - var items = BI.deepClone(Demo.CONSTANTS.TREE); - return { - type: "bi.multi_tree_combo", - itemsCreator: function (options, callback) { - // 根据不同的类型处理相应的结果 - switch (options.type) { - case BI.TreeView.REQ_TYPE_INIT_DATA: - break; - case BI.TreeView.REQ_TYPE_ADJUST_DATA: - break; - case BI.TreeView.REQ_TYPE_SELECT_DATA: - break; - case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA: - break; - default : - break; - } - callback({ - items: items - }); - }, - width: 200, - value: { - "根目录": {} - } - }; - }, - render: function () { return { type: "bi.absolute", scrolly: false, items: [{ el: this._createMultiSelectCombo(), - right: "40%", - top: 200 - }, { - el: this._createTreeCombo(), - right: "60%", - top: 200 + right: "50%", + top: 10 }] }; } diff --git a/dist/demo.js b/dist/demo.js index 4397abba0..e92527a33 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -10682,7 +10682,7 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, { var self = this; var widget = BI.createWidget({ type: "bi.multi_select_insert_combo", - //itemsCreator: BI.bind(this._itemsCreator, this), + itemsCreator: BI.bind(this._itemsCreator, this), width: 200, value: { type: 1, @@ -10744,47 +10744,14 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, { }, 1000); }, - _createTreeCombo: function () { - var items = BI.deepClone(Demo.CONSTANTS.TREE); - return { - type: "bi.multi_tree_combo", - itemsCreator: function (options, callback) { - // 根据不同的类型处理相应的结果 - switch (options.type) { - case BI.TreeView.REQ_TYPE_INIT_DATA: - break; - case BI.TreeView.REQ_TYPE_ADJUST_DATA: - break; - case BI.TreeView.REQ_TYPE_SELECT_DATA: - break; - case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA: - break; - default : - break; - } - callback({ - items: items - }); - }, - width: 200, - value: { - "根目录": {} - } - }; - }, - render: function () { return { type: "bi.absolute", scrolly: false, items: [{ el: this._createMultiSelectCombo(), - right: "40%", - top: 200 - }, { - el: this._createTreeCombo(), - right: "60%", - top: 200 + right: "50%", + top: 10 }] }; }