From c17aa448b2f742d3e3cff351c506f8a1ec7fec35 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Sun, 5 May 2019 11:40:12 +0800 Subject: [PATCH] update --- changelog.md | 6 ++-- .../component/demo.treevaluechoosercombo.js | 31 +++---------------- src/case/tree/ztree/tree.list.display.js | 5 +-- 3 files changed, 7 insertions(+), 35 deletions(-) diff --git a/changelog.md b/changelog.md index dc5a44de3d..3caf08032d 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ - 新增`bi.multi_tree_insert_combo`控件, 此下拉树可以插入不存在的新值 - 新增`bi.list_tree_value_chooser_insert_combo`部件, 封装`bi.multi_tree_list_combo`数据处理逻辑 - 新增`bi.tree_value_chooser_insert_combo`部件, 封装`bi.multi_tree_insert_combo`数据处理逻辑 +- 增加BI.DOM.ready方法 2.0(2019-03) - 新增`bi.time_combo`时分秒控件和`bi.time_periods`时间选择区间,时间区间无有效值校验 @@ -33,7 +34,4 @@ 2.0(2018-08) -- 增加BI.mount方法,支持同构 - -2.0(2019-04) -- 增加BI.DOM.ready方法 \ No newline at end of file +- 增加BI.mount方法,支持同构 \ No newline at end of file diff --git a/demo/js/component/demo.treevaluechoosercombo.js b/demo/js/component/demo.treevaluechoosercombo.js index f91b32cebc..8fa557ee1e 100644 --- a/demo/js/component/demo.treevaluechoosercombo.js +++ b/demo/js/component/demo.treevaluechoosercombo.js @@ -5,41 +5,18 @@ Demo.TreeValueChooser = BI.inherit(BI.Widget, { render: function () { var widget = BI.createWidget({ - type: "bi.tree_value_chooser_insert_combo", + type: "bi.tree_value_chooser_combo", width: 300, // items: BI.deepClone(Demo.CONSTANTS.TREEITEMS), itemsCreator: function (op, callback) { callback(BI.deepClone(Demo.CONSTANTS.TREEITEMS)); } }); - var widget1 = BI.createWidget({ - type: "bi.list_tree_value_chooser_insert_combo", - itemsCreator: function (op, callback) { - callback(BI.deepClone(Demo.CONSTANTS.TREEITEMS)); - } - }); - widget.setValue({ - "中国": { - "安徽省": { - "安庆市": {} - } - }, - "newValue": {} - }); - widget1.setValue([ - ["中国", "安徽省"], - ["中国", "安徽省", "安庆市"], - ["newValue"] - ]); return { type: "bi.vertical", - items: [{ - type: "bi.vertical_adapt", - hgap: 200, - vgap: 10, - items: [widget, widget1] - }] - + hgap: 200, + vgap: 10, + items: [widget] }; } }); diff --git a/src/case/tree/ztree/tree.list.display.js b/src/case/tree/ztree/tree.list.display.js index 3be529e135..d8abc27864 100644 --- a/src/case/tree/ztree/tree.list.display.js +++ b/src/case/tree/ztree/tree.list.display.js @@ -44,7 +44,7 @@ BI.ListDisplayTree = BI.inherit(BI.ListTreeView, { } function getFont(treeId, node) { - return node.font ? node.font : {color: "#999999"}; + return node.isLeaf ? {} : {color: "#999999"}; } return setting; @@ -60,9 +60,6 @@ BI.ListDisplayTree = BI.inherit(BI.ListTreeView, { node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")"; } } - if(node.isLeaf === true) { - node.font = {color: "#3d4d66"}; - } }); return nodes; },