windy 6 years ago
parent
commit
c17aa448b2
  1. 6
      changelog.md
  2. 31
      demo/js/component/demo.treevaluechoosercombo.js
  3. 5
      src/case/tree/ztree/tree.list.display.js

6
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方法
- 增加BI.mount方法,支持同构

31
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]
};
}
});

5
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;
},

Loading…
Cancel
Save