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.
1.3 KiB
1.3 KiB
bi.searcher_view
搜索面板, 基类BI.Widget
{% method %} source
{% common %}
var searcher = BI.createWidget({
element: "#wrapper",
type: "bi.searcher_view",
});
searcher.populate([{
text: "aba",
value: "aba"
},{
text: "acc",
value: "acc"
}], [{
text: "a",
value: "a"
}], "a");
{% endmethod %}
API
基础属性
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
tipText | title文本 | string | — | BI.i18nText("BI-No_Select") |
chooseType | 选择类型 | const | 参考button_group | BI.Selection.Single |
matcher | 完全匹配的构造器 | object | — | {type: "bi.button_group",behaviors: { redmark: function () { return true;} },items: [], layouts: [{ type: "bi.vertical"}]} |
searcher | 搜索到的元素 | object | — | {type: "bi.button_group",behaviors: {redmark: function () {return true;}}, items: [], layouts: [{ type: "bi.vertical" }]} |
对外方法
名称 | 说明 | 回调参数 |
---|---|---|
populate | 刷新列表 | searchResult, matchResult, keyword |
setValue | 设置value 值 | value |
getValue | 获取value值 | — |
hasMatched | 是否有匹配的元素 | — |