|
|
|
Demo.Func = BI.inherit(BI.Widget, {
|
|
|
|
props: {
|
|
|
|
baseCls: "demo-func",
|
|
|
|
},
|
|
|
|
|
|
|
|
render: function () {
|
|
|
|
BI.createWidget({
|
|
|
|
type: "bi.horizontal",
|
|
|
|
element: this,
|
|
|
|
vgap: 20,
|
|
|
|
hgap: 30,
|
|
|
|
items: [{
|
|
|
|
type: "bi.segment",
|
|
|
|
items: [{
|
|
|
|
text: "较长的选项1",
|
|
|
|
value: 1,
|
|
|
|
}, {
|
|
|
|
text: "选项2",
|
|
|
|
value: 2,
|
|
|
|
}, {
|
|
|
|
text: "选项3",
|
|
|
|
value: 3,
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
BI.shortcut("demo.segment", Demo.Func);
|