Browse Source

refactor: 使用BI.Popovers.close(id)方式关闭Popovers

qufenxi
alan 6 years ago
parent
commit
d0a59ac4fb
  1. 8
      src/app/connection/more/more_link.service.ts

8
src/app/connection/more/more_link.service.ts

@ -3,7 +3,6 @@ let SubbitButton: any = null;
let selectKey = ''; let selectKey = '';
export const moreLink = (onConfirm?: Function): void => { export const moreLink = (onConfirm?: Function): void => {
const id = BI.UUID(); const id = BI.UUID();
let Popovers: any = null;
BI.Popovers.create(id, { BI.Popovers.create(id, {
type: 'bi.bar_popover', type: 'bi.bar_popover',
size: 'normal', size: 'normal',
@ -31,7 +30,7 @@ export const moreLink = (onConfirm?: Function): void => {
value: 1, value: 1,
level: 'ignore', level: 'ignore',
handler (v: any) { handler (v: any) {
Popovers.close(v); BI.Popovers.close(id);
}, },
}, { }, {
type: 'bi.button', type: 'bi.button',
@ -42,13 +41,10 @@ export const moreLink = (onConfirm?: Function): void => {
SubbitButton = ref; SubbitButton = ref;
}, },
handler (v: any) { handler (v: any) {
Popovers.close(v); BI.Popovers.close(id);
onConfirm ? onConfirm(selectKey) : null; onConfirm ? onConfirm(selectKey) : null;
}, },
}], }],
}, },
ref(ref: any) {
Popovers = ref;
},
}).open(id); }).open(id);
}; };

Loading…
Cancel
Save