From 083b0a4cd2a29903253d0a0f9e7476f900aa3500 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 18 Sep 2017 09:03:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BBtext?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bi/case.js | 2 +- dist/bundle.js | 2 +- dist/case.js | 2 +- dist/demo.js | 93 ++++++++++---------------- src/case/editor/editor.sign.initial.js | 2 +- 5 files changed, 39 insertions(+), 62 deletions(-) diff --git a/bi/case.js b/bi/case.js index acee99ed34..c5d73ef20e 100644 --- a/bi/case.js +++ b/bi/case.js @@ -6937,7 +6937,7 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, { rgap: o.rgap, tgap: o.tgap, bgap: o.bgap, - value: o.value || o.text, + value: o.value, validationChecker: o.validationChecker, quitChecker: o.quitChecker, allowBlank: o.allowBlank, diff --git a/dist/bundle.js b/dist/bundle.js index 40da0e62f7..0a703f9325 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -71300,7 +71300,7 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, { rgap: o.rgap, tgap: o.tgap, bgap: o.bgap, - value: o.value || o.text, + value: o.value, validationChecker: o.validationChecker, quitChecker: o.quitChecker, allowBlank: o.allowBlank, diff --git a/dist/case.js b/dist/case.js index 87671092c3..2ac3e52b76 100644 --- a/dist/case.js +++ b/dist/case.js @@ -6937,7 +6937,7 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, { rgap: o.rgap, tgap: o.tgap, bgap: o.bgap, - value: o.value || o.text, + value: o.value, validationChecker: o.validationChecker, quitChecker: o.quitChecker, allowBlank: o.allowBlank, diff --git a/dist/demo.js b/dist/demo.js index 64088eb034..d62f0c9182 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -2522,65 +2522,42 @@ BI.shortcut("demo.handstand_branch_tree", Demo.Func);Demo.Func = BI.inherit(BI.W }, render: function () { + var self = this; var tree = BI.createWidget({ - type: "bi.level_tree", - chooseType: 0, - items: [{ - id: 1, - text: "第一项", - value: 1, - isParent: true - }, { - id: 2, - text: "第二项", - value: 2, - isParent: true - }, { - id: 3, - text: "第三项", - value: 1, - isParent: true, - open: true - }, { - id: 4, - text: "第四项", - value: 1 - }, { - id: 11, - pId: 1, - text: "子项1", - value: 11 - }, { - id: 12, - pId: 1, - text: "子项2", - value: 12 - }, { - id: 13, - pId: 1, - text: "子项3", - value: 13 - }, { - id: 21, - pId: 2, - text: "子项1", - value: 21 - }, { - id: 31, - pId: 3, - text: "子项1", - value: 31 - }, { - id: 32, - pId: 3, - text: "子项2", - value: 32 - }, { - id: 33, - pId: 3, - text: "子项3", - value: 33 - }] + + type: "bi.platform_level_tree", + ref: function () { + self.tree = this; + }, + itemsCreator: function (op, callback) { + + callback([ + + {"id": 21, "pId": -1, "text": "销售管理", layer: 1, value: 21, + expander: { + type: "bi.expander", + adjustLength: 20, + direction: "right", + popup: { + items: [{ + type: "bi.single_select_item", + height: 25, + text: "项目1", + value: 1 + }, { + type: "bi.single_select_item", + height: 25, + text: "项目2", + value: 2 + }] + } + } + } + ]) + }, + + width: 200 + }) BI.createWidget({ diff --git a/src/case/editor/editor.sign.initial.js b/src/case/editor/editor.sign.initial.js index 0225ab617c..87c3ef32f6 100644 --- a/src/case/editor/editor.sign.initial.js +++ b/src/case/editor/editor.sign.initial.js @@ -35,7 +35,7 @@ BI.SignInitialEditor = BI.inherit(BI.Widget, { rgap: o.rgap, tgap: o.tgap, bgap: o.bgap, - value: o.value || o.text, + value: o.value, validationChecker: o.validationChecker, quitChecker: o.quitChecker, allowBlank: o.allowBlank,