Browse Source

BI-128204 fix: 【6.0.12发散】自适应布局及内容缩放下,缩小浏览器窗口,过滤查看已选下方异常

es6
zsmj 1 year ago
parent
commit
9efe3a1ad7
  1. 5
      packages/fineui/src/base/combination/switcher.js
  2. 20
      packages/fineui/src/widget/multiselect/multiselect.combo.js
  3. 20
      packages/fineui/src/widget/multiselect/multiselect.combo.nobar.js
  4. 23
      packages/fineui/src/widget/multiselect/multiselect.insert.combo.js
  5. 23
      packages/fineui/src/widget/multiselect/multiselect.insert.combo.nobar.js
  6. 4
      packages/fineui/src/widget/multiselect/multiselect.popup.view.js
  7. 4
      packages/fineui/src/widget/multiselect/multiselect.popup.view.nobar.js

5
packages/fineui/src/base/combination/switcher.js

@ -11,7 +11,7 @@ import {
isNull, isNull,
Events, Events,
Direction, Direction,
EVENT_RESPONSE_TIME EVENT_RESPONSE_TIME, isFunction
} from "@/core"; } from "@/core";
import { ButtonGroup } from "./group.button"; import { ButtonGroup } from "./group.button";
import { Maskers } from "@/base/0.base"; import { Maskers } from "@/base/0.base";
@ -188,7 +188,8 @@ export class Switcher extends Widget {
} }
_assertPopupView() { _assertPopupView() {
const { popup, adapter, masker, value, direction } = this.options; const { popup, masker, value, direction } = this.options;
const adapter = isFunction(this.options.adapter) ? this.options.adapter() : this.options.adapter;
if (!this._created) { if (!this._created) {
this.popupView = createWidget( this.popupView = createWidget(
popup, popup,

20
packages/fineui/src/widget/multiselect/multiselect.combo.js

@ -99,13 +99,8 @@ export class MultiSelectCombo extends Single {
height: toPix(o.height, o.simple ? 1 : 2), height: toPix(o.height, o.simple ? 1 : 2),
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
masker: { adapter: () => {
offset: { return this.popup.getView();
left: 0,
top: 0,
right: 0,
bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1,
},
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemFormatter: o.itemFormatter, itemFormatter: o.itemFormatter,
@ -185,8 +180,6 @@ export class MultiSelectCombo extends Single {
type: MultiSelectPopupView.xtype, type: MultiSelectPopupView.xtype,
ref() { ref() {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this);
self.numberCounter.setAdapter(this);
}, },
listeners: [ listeners: [
{ {
@ -269,13 +262,8 @@ export class MultiSelectCombo extends Single {
this.numberCounter = createWidget({ this.numberCounter = createWidget({
type: MultiSelectCheckSelectedSwitcher.xtype, type: MultiSelectCheckSelectedSwitcher.xtype,
masker: { adapter: () => {
offset: { return this.popup.getView();
left: 0,
top: 0,
right: 0,
bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1,
},
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: bind(this._itemsCreator4Trigger, this), itemsCreator: bind(this._itemsCreator4Trigger, this),

20
packages/fineui/src/widget/multiselect/multiselect.combo.nobar.js

@ -97,13 +97,8 @@ export class MultiSelectNoBarCombo extends Single {
height: toPix(o.height, o.simple ? 1 : 2), height: toPix(o.height, o.simple ? 1 : 2),
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
masker: { adapter: () => {
offset: { return this.popup.getView();
left: 0,
top: 0,
right: 0,
bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1,
},
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: bind(this._itemsCreator4Trigger, this), itemsCreator: bind(this._itemsCreator4Trigger, this),
@ -185,8 +180,6 @@ export class MultiSelectNoBarCombo extends Single {
type: MultiSelectNoBarPopupView.xtype, type: MultiSelectNoBarPopupView.xtype,
ref() { ref() {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this);
self.numberCounter.setAdapter(this);
}, },
listeners: [ listeners: [
{ {
@ -272,13 +265,8 @@ export class MultiSelectNoBarCombo extends Single {
this.numberCounter = createWidget({ this.numberCounter = createWidget({
type: MultiSelectCheckSelectedSwitcher.xtype, type: MultiSelectCheckSelectedSwitcher.xtype,
masker: { adapter: () => {
offset: { return this.popup.getView();
left: 0,
top: 0,
right: 0,
bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1,
},
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: bind(this._itemsCreator4Trigger, this), itemsCreator: bind(this._itemsCreator4Trigger, this),

23
packages/fineui/src/widget/multiselect/multiselect.insert.combo.js

@ -99,14 +99,8 @@ export class MultiSelectInsertCombo extends Single {
text: o.text, text: o.text,
watermark: o.watermark, watermark: o.watermark,
defaultText: o.defaultText, defaultText: o.defaultText,
// adapter: this.popup, adapter: () => {
masker: { return this.popup.getView();
offset: {
left: 0,
top: 0,
right: 0,
bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1,
},
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: bind(this._itemsCreator4Trigger, this), itemsCreator: bind(this._itemsCreator4Trigger, this),
@ -151,7 +145,7 @@ export class MultiSelectInsertCombo extends Single {
self._dataChange = true; self._dataChange = true;
}); });
this.getSearcher().getKeywordsLength() > 2000 && this.getSearcher().getKeywordsLength() > 2000 &&
Msg.alert(i18nText("BI-Basic_Prompt"), i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand")); Msg.alert(i18nText("BI-Basic_Prompt"), i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand"));
} }
self.fireEvent(MultiSelectInsertCombo.EVENT_SEARCHING); self.fireEvent(MultiSelectInsertCombo.EVENT_SEARCHING);
}); });
@ -192,8 +186,6 @@ export class MultiSelectInsertCombo extends Single {
type: MultiSelectPopupView.xtype, type: MultiSelectPopupView.xtype,
ref() { ref() {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this);
self.numberCounter.setAdapter(this);
}, },
listeners: [ listeners: [
{ {
@ -276,13 +268,8 @@ export class MultiSelectInsertCombo extends Single {
this.numberCounter = createWidget({ this.numberCounter = createWidget({
type: MultiSelectCheckSelectedSwitcher.xtype, type: MultiSelectCheckSelectedSwitcher.xtype,
masker: { adapter: () => {
offset: { return this.popup.getView();
left: 0,
top: 0,
right: 0,
bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1,
},
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: bind(this._itemsCreator4Trigger, this), itemsCreator: bind(this._itemsCreator4Trigger, this),

23
packages/fineui/src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -93,14 +93,8 @@ export class MultiSelectInsertNoBarCombo extends Single {
type: MultiSelectInsertTrigger.xtype, type: MultiSelectInsertTrigger.xtype,
height: toPix(o.height, o.simple ? 1 : 2), height: toPix(o.height, o.simple ? 1 : 2),
text: o.text, text: o.text,
// adapter: this.popup, adapter: () => {
masker: { return this.popup.getView();
offset: {
left: 0,
top: 0,
right: 0,
bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1,
},
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: bind(this._itemsCreator4Trigger, this), itemsCreator: bind(this._itemsCreator4Trigger, this),
@ -140,7 +134,7 @@ export class MultiSelectInsertNoBarCombo extends Single {
self._dataChange = true; self._dataChange = true;
}); });
this.getSearcher().getKeywordsLength() > 2000 && this.getSearcher().getKeywordsLength() > 2000 &&
Msg.alert(i18nText("BI-Basic_Prompt"), i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand")); Msg.alert(i18nText("BI-Basic_Prompt"), i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand"));
} }
}); });
@ -178,8 +172,6 @@ export class MultiSelectInsertNoBarCombo extends Single {
type: MultiSelectNoBarPopupView.xtype, type: MultiSelectNoBarPopupView.xtype,
ref() { ref() {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this);
self.numberCounter.setAdapter(this);
}, },
listeners: [ listeners: [
{ {
@ -263,13 +255,8 @@ export class MultiSelectInsertNoBarCombo extends Single {
this.numberCounter = createWidget({ this.numberCounter = createWidget({
type: MultiSelectCheckSelectedSwitcher.xtype, type: MultiSelectCheckSelectedSwitcher.xtype,
masker: { adapter: () => {
offset: { return this.popup.getView();
left: 0,
top: 0,
right: 0,
bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1,
},
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: bind(this._itemsCreator4Trigger, this), itemsCreator: bind(this._itemsCreator4Trigger, this),

4
packages/fineui/src/widget/multiselect/multiselect.popup.view.js

@ -98,4 +98,8 @@ export class MultiSelectPopupView extends Widget {
setDirection(direction, position) { setDirection(direction, position) {
this.popupView.setDirection(direction, position); this.popupView.setDirection(direction, position);
} }
getView() {
return this.popupView.getView();
}
} }

4
packages/fineui/src/widget/multiselect/multiselect.popup.view.nobar.js

@ -93,4 +93,8 @@ export class MultiSelectNoBarPopupView extends Widget {
setDirection(direction, position) { setDirection(direction, position) {
this.popupView.setDirection(direction, position); this.popupView.setDirection(direction, position);
} }
getView() {
return this.popupView.getView();
}
} }

Loading…
Cancel
Save