Browse Source

JSY-20326 fix: 【组件问题】带清除按钮的单选下拉框,清除后需要恢复到默认值

es6
zsmj 2 years ago
parent
commit
a99e4d759d
  1. 4
      demo/js/widget/singletree/demo.single_tree_combo.js
  2. 1
      src/widget/singletree/singletree.combo.js
  3. 1
      src/widget/singletree/singletree.trigger.js

4
demo/js/widget/singletree/demo.single_tree_combo.js

@ -16,7 +16,7 @@ Demo.SingleTreeCombo = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.tree = _ref;
},
text: "默认值",
defaultText: "请选择",
items: items,
width: 300,
value: "11"
@ -40,4 +40,4 @@ Demo.SingleTreeCombo = BI.inherit(BI.Widget, {
}
});
BI.shortcut("demo.single_tree_combo", Demo.SingleTreeCombo);
BI.shortcut("demo.single_tree_combo", Demo.SingleTreeCombo);

1
src/widget/singletree/singletree.combo.js

@ -25,6 +25,7 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
this.trigger = BI.createWidget(BI.extend({
type: "bi.single_tree_trigger",
text: o.text,
defaultText: o.defaultText,
height: o.height,
items: o.items,
value: o.value,

1
src/widget/singletree/singletree.trigger.js

@ -26,6 +26,7 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
type: "bi.select_text_trigger",
element: this,
text: o.text,
defaultText: o.defaultText,
items: o.items,
height: o.height,
warningTitle: o.warningTitle,

Loading…
Cancel
Save