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

Loading…
Cancel
Save