From d0a59ac4fb7cb66e87bc90a8c069a491e7cb604b Mon Sep 17 00:00:00 2001 From: alan Date: Tue, 28 May 2019 11:45:20 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BD=BF=E7=94=A8BI.Popovers.close?= =?UTF-8?q?(id)=E6=96=B9=E5=BC=8F=E5=85=B3=E9=97=ADPopovers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/connection/more/more_link.service.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/app/connection/more/more_link.service.ts b/src/app/connection/more/more_link.service.ts index e9a11da..acfac03 100644 --- a/src/app/connection/more/more_link.service.ts +++ b/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); };