Browse Source

BI-125767 fix:popup多处this指向

es6
Treecat 2 years ago
parent
commit
eff309f9d8
  1. 7
      packages/fineui/src/case/combo/textvaluecombo/popup.textvalue.js
  2. 3
      packages/fineui/src/core/constant/var.js

7
packages/fineui/src/case/combo/textvaluecombo/popup.textvalue.js

@ -58,8 +58,9 @@ export class TextValueComboPopup extends Pane {
listeners: [ listeners: [
{ {
eventName: Controller.EVENT_CHANGE, eventName: Controller.EVENT_CHANGE,
action: (type, val, obj) => { action: (...args) => {
this.fireEvent(Controller.EVENT_CHANGE, arguments); const [type, val, obj] = args;
this.fireEvent(Controller.EVENT_CHANGE, args);
if (type === Events.CLICK) { if (type === Events.CLICK) {
this.fireEvent(TextValueComboPopup.EVENT_CHANGE, val, obj); this.fireEvent(TextValueComboPopup.EVENT_CHANGE, val, obj);
} }
@ -101,7 +102,7 @@ export class TextValueComboPopup extends Pane {
listeners: [ listeners: [
{ {
eventName: SelectList.EVENT_CHANGE, eventName: SelectList.EVENT_CHANGE,
action(val) { action: (val) => {
this.fireEvent(TextValueComboPopup.EVENT_CHANGE, val); this.fireEvent(TextValueComboPopup.EVENT_CHANGE, val);
}, },
} }

3
packages/fineui/src/core/constant/var.js

@ -3,8 +3,9 @@
*/ */
import { isNumber } from "../2.base"; import { isNumber } from "../2.base";
import { Cache } from "../structure/cache"; import { Cache } from "../structure/cache";
import { _global } from "../0.foundation";
export let EVENT_BLUR = Cache.getItem("event.blur", {typeConversion: true, defaultValue: true}); export let EVENT_BLUR = _global.localStorage ? Cache.getItem("event.blur", {typeConversion: true, defaultValue: true}) : true;
export const setEventBlur = (v) => { EVENT_BLUR = v, Cache.setItem("event.blur", v) }; export const setEventBlur = (v) => { EVENT_BLUR = v, Cache.setItem("event.blur", v) };
export const MAX = 0xfffffffffffffff; export const MAX = 0xfffffffffffffff;

Loading…
Cancel
Save