forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.6 KiB
58 lines
1.6 KiB
Demo.Func = BI.inherit(BI.Widget, { |
|
props: { |
|
baseCls: "demo-func" |
|
}, |
|
render: function () { |
|
var items = [{ |
|
type: "bi.label", |
|
value: "张三" |
|
}, { |
|
type: "bi.label", |
|
value: "李四" |
|
}]; |
|
var popup = BI.createWidget({ |
|
type: "bi.button_group", |
|
cls: "bi-border layout-bg3", |
|
items: items, |
|
layouts: [{ |
|
type: "bi.vertical" |
|
}] |
|
}); |
|
return { |
|
type: "bi.absolute", |
|
items: [{ |
|
el: { |
|
type: "bi.searcher", |
|
listeners: [{ |
|
eventName: BI.Searcher.EVENT_STOP, |
|
action: function () { |
|
popup.populate(items) |
|
} |
|
}, { |
|
eventName: BI.Searcher.EVENT_PAUSE, |
|
action: function () { |
|
popup.populate(items) |
|
} |
|
}], |
|
adapter: { |
|
getItems: function () { |
|
return items |
|
} |
|
}, |
|
popup: popup, |
|
masker: false |
|
}, |
|
left: 0, |
|
right: 0, |
|
top: 0 |
|
}, { |
|
el: popup, |
|
left: 0, |
|
right: 0, |
|
top: 50, |
|
bottom: 0 |
|
}] |
|
} |
|
} |
|
}); |
|
BI.shortcut("demo.searcher", Demo.Func); |