Browse Source

Pull request #1504: 无JIRA任务 支持自定义searcher高度

Merge in VISUAL/fineui from ~FAY/fineui:master to master

* commit '33ffa61bdc6636bf66266e22805fd1c1cb35cd4f':
  无JIRA任务 支持自定义searcher高度
master
fay 4 years ago
parent
commit
bd033ba7bf
  1. 10
      src/widget/multiselectlist/multiselectlist.insert.js
  2. 10
      src/widget/multiselectlist/multiselectlist.insert.nobar.js
  3. 13
      src/widget/multiselectlist/multiselectlist.js

10
src/widget/multiselectlist/multiselectlist.insert.js

@ -6,7 +6,8 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-multi-select-insert-list",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn,
searcherHeight: 24,
}); });
}, },
_init: function () { _init: function () {
@ -75,6 +76,9 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.searcher", type: "bi.searcher",
el: {
height: o.searcherHeight,
},
allowSearchBlank: false, allowSearchBlank: false,
isAutoSearch: false, isAutoSearch: false,
isAutoSync: false, isAutoSync: false,
@ -169,7 +173,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
element: this, element: this,
items: [{ items: [{
el: this.trigger, el: this.trigger,
height: 24 height: o.searcherHeight
}, { }, {
el: this.adapter, el: this.adapter,
height: "fill" height: "fill"
@ -180,7 +184,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
element: this, element: this,
items: [{ items: [{
el: this.searcherPane, el: this.searcherPane,
top: 30, top: o.searcherHeight,
bottom: 0, bottom: 0,
left: 0, left: 0,
right: 0 right: 0

10
src/widget/multiselectlist/multiselectlist.insert.nobar.js

@ -6,7 +6,8 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-multi-select-insert-list",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn,
searcherHeight: 24
}); });
}, },
_init: function () { _init: function () {
@ -81,6 +82,9 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.searcher", type: "bi.searcher",
el: {
height: o.searcherHeight
},
allowSearchBlank: false, allowSearchBlank: false,
isAutoSearch: false, isAutoSearch: false,
isAutoSync: false, isAutoSync: false,
@ -177,7 +181,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
element: this, element: this,
items: [{ items: [{
el: this.trigger, el: this.trigger,
height: 24 height: o.searcherHeight
}, { }, {
el: this.adapter, el: this.adapter,
height: "fill" height: "fill"
@ -188,7 +192,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
element: this, element: this,
items: [{ items: [{
el: this.searcherPane, el: this.searcherPane,
top: 30, top: o.searcherHeight,
bottom: 0, bottom: 0,
left: 0, left: 0,
right: 0 right: 0

13
src/widget/multiselectlist/multiselectlist.js

@ -2,14 +2,12 @@
* Created by zcf_1 on 2017/5/2. * Created by zcf_1 on 2017/5/2.
*/ */
BI.MultiSelectList = BI.inherit(BI.Widget, { BI.MultiSelectList = BI.inherit(BI.Widget, {
_constant: {
EDITOR_HEIGHT: 24
},
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-list", baseCls: "bi-multi-select-list",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn,
searcherHeight: 24
}); });
}, },
_init: function () { _init: function () {
@ -62,6 +60,9 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.searcher", type: "bi.searcher",
el: {
height: o.searcherHeight
},
allowSearchBlank: false, allowSearchBlank: false,
isAutoSearch: false, isAutoSearch: false,
isAutoSync: false, isAutoSync: false,
@ -151,7 +152,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
element: this, element: this,
items: [{ items: [{
el: this.trigger, el: this.trigger,
height: this._constant.EDITOR_HEIGHT height: o.searcherHeight
}, { }, {
el: this.adapter, el: this.adapter,
height: "fill" height: "fill"
@ -162,7 +163,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
element: this, element: this,
items: [{ items: [{
el: this.searcherPane, el: this.searcherPane,
top: this._constant.EDITOR_HEIGHT, top: o.searcherHeight,
bottom: 0, bottom: 0,
left: 0, left: 0,
right: 0 right: 0

Loading…
Cancel
Save