Browse Source

Merge pull request #1306 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit '0c60008c3fb0f511c125ebbfd50278a048129164':
  update
  BI-64186 refactor: searcher提供可配参数
es6
windy 5 years ago
parent
commit
04f50a90de
  1. 1
      changelog.md
  2. 3
      src/base/combination/searcher.js
  3. 3
      src/css/widget/singleselect/search/multiselect.css
  4. 3
      src/css/widget/singleselect/search/singleselect.css
  5. 8
      src/less/widget/singleselect/search/singleselect.search.pane.less
  6. 2
      src/widget/singleselect/search/singleselect.search.pane.insert.js
  7. 2
      src/widget/singleselect/search/singleselect.search.pane.js

1
changelog.md

@ -1,5 +1,6 @@
# 更新日志 # 更新日志
2.0(2020-04) 2.0(2020-04)
- searcher提供可配是否支持搜索空格的allSearchBlank
- 修复了复选下拉全选状态下使用空格添加值trigger显示更新不对的问题 - 修复了复选下拉全选状态下使用空格添加值trigger显示更新不对的问题
- 复选下拉树展开节点提供分页加载和滚动加载两种方式 - 复选下拉树展开节点提供分页加载和滚动加载两种方式
- 修复了复选下拉列表初始化的时候发送执行两次itemsCreator的问题 - 修复了复选下拉列表初始化的时候发送执行两次itemsCreator的问题

3
src/base/combination/searcher.js

@ -21,6 +21,7 @@ BI.Searcher = BI.inherit(BI.Widget, {
isAutoSearch: true, // 是否自动搜索 isAutoSearch: true, // 是否自动搜索
isAutoSync: true, // 是否自动同步数据, 即是否保持搜索面板和adapter面板状态值的统一 isAutoSync: true, // 是否自动同步数据, 即是否保持搜索面板和adapter面板状态值的统一
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
allowSearchBlank: false, // 是否能够搜索包含空格的字符串
// isAutoSearch为false时启用 // isAutoSearch为false时启用
onSearch: function (op, callback) { onSearch: function (op, callback) {
@ -164,7 +165,7 @@ BI.Searcher = BI.inherit(BI.Widget, {
}, },
_search: function () { _search: function () {
var self = this, o = this.options, keyword = this._getLastSearchKeyword(); var self = this, o = this.options, keyword = o.allowSearchBlank ? this.editor.getValue() : this._getLastSearchKeyword();
if (keyword === "" || this._stop) { if (keyword === "" || this._stop) {
return; return;
} }

3
src/css/widget/singleselect/search/multiselect.css

@ -0,0 +1,3 @@
.bi-multi-select-search-pane .multi-select-toolbar {
color: #faaa39;
}

3
src/css/widget/singleselect/search/singleselect.css

@ -0,0 +1,3 @@
.bi-single-select-search-pane .single-select-toolbar {
color: #faaa39;
}

8
src/less/widget/singleselect/search/singleselect.search.pane.less

@ -0,0 +1,8 @@
@import "../../../index";
.bi-single-select-search-pane{
& .single-select-toolbar{
color: @color-bi-text-redmark;
}
}

2
src/widget/singleselect/search/singleselect.search.pane.insert.js

@ -31,7 +31,7 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
type: "bi.label", type: "bi.label",
invisible: true, invisible: true,
text: BI.i18nText("BI-Click_Blank_To_Select"), text: BI.i18nText("BI-Click_Blank_To_Select"),
cls: "multi-select-toolbar", cls: "single-select-toolbar",
height: this.constants.height height: this.constants.height
}); });

2
src/widget/singleselect/search/singleselect.search.pane.js

@ -31,7 +31,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
type: "bi.label", type: "bi.label",
invisible: true, invisible: true,
text: BI.i18nText("BI-Click_Blank_To_Select"), text: BI.i18nText("BI-Click_Blank_To_Select"),
cls: "multi-select-toolbar", cls: "single-select-toolbar",
height: this.constants.height height: this.constants.height
}); });

Loading…
Cancel
Save