|
|
@ -1,3 +1,15 @@ |
|
|
|
|
|
|
|
(function () { |
|
|
|
|
|
|
|
var CustomIcon = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
render: function () { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
type: "bi.label", |
|
|
|
|
|
|
|
text: "✨", |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
BI.shortcut("demo.downlist.icon", CustomIcon); |
|
|
|
|
|
|
|
}()); |
|
|
|
|
|
|
|
|
|
|
|
Demo.Downlist = BI.inherit(BI.Widget, { |
|
|
|
Demo.Downlist = BI.inherit(BI.Widget, { |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
baseCls: "demo-downlist" |
|
|
|
baseCls: "demo-downlist" |
|
|
@ -22,9 +34,9 @@ Demo.Downlist = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
// test
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
type: "bi.horizontal_adapt", |
|
|
|
type: "bi.left", |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
type: "bi.down_list_combo", |
|
|
|
type: "bi.down_list_combo", |
|
|
|
ref: function (_ref) { |
|
|
|
ref: function (_ref) { |
|
|
@ -131,7 +143,51 @@ Demo.Downlist = BI.inherit(BI.Widget, { |
|
|
|
// }]
|
|
|
|
// }]
|
|
|
|
}] |
|
|
|
}] |
|
|
|
|
|
|
|
|
|
|
|
] |
|
|
|
], |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
type: "bi.down_list_combo", |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: "bi.button", |
|
|
|
|
|
|
|
ghost: true, |
|
|
|
|
|
|
|
iconPosition: "right", |
|
|
|
|
|
|
|
icon: "column-next-page-h-font", |
|
|
|
|
|
|
|
text: "自定义 trigger 和 icon 的级联下拉框", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
listeners: [{ |
|
|
|
|
|
|
|
eventName: "EVENT_CHANGE", |
|
|
|
|
|
|
|
action: function (v) { |
|
|
|
|
|
|
|
console.log("触发值", v); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
eventName: "EVENT_SON_VALUE_CHANGE", |
|
|
|
|
|
|
|
action: function(v) { |
|
|
|
|
|
|
|
console.log("二级菜单触发值", v) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}], |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
[{ |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
text: "选项一", |
|
|
|
|
|
|
|
value: 1, |
|
|
|
|
|
|
|
icon: { |
|
|
|
|
|
|
|
type: "demo.downlist.icon", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
children: [{ |
|
|
|
|
|
|
|
text: "选项一", |
|
|
|
|
|
|
|
value: 11, |
|
|
|
|
|
|
|
icon: { |
|
|
|
|
|
|
|
type: "demo.downlist.icon", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
text: "选项二", |
|
|
|
|
|
|
|
value: 12, |
|
|
|
|
|
|
|
}], |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
text: "选项二", |
|
|
|
|
|
|
|
value: 2, |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
], |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
type: "bi.multi_layer_down_list_combo", |
|
|
|
type: "bi.multi_layer_down_list_combo", |
|
|
|
ref: function (_ref) { |
|
|
|
ref: function (_ref) { |
|
|
|