From 8fc9ce3b9cf1d4a8b98ddd7b43718918287ab327 Mon Sep 17 00:00:00 2001 From: fangxu864 <864109504@qq.com> Date: Tue, 11 Dec 2018 14:58:51 +0800 Subject: [PATCH] =?UTF-8?q?[improvement]=20dialog=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=9A=E5=8F=AF=E4=BB=A5=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E5=87=BA=E7=9A=84dialog=E5=AE=9E=E4=BE=8B?= =?UTF-8?q?=E7=9A=84stopLoading()=E6=89=8B=E5=8A=A8=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=9A=84loading=E7=8A=B6=E6=80=81=20(#1047)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/dialog/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/dialog/index.ts b/packages/dialog/index.ts index 948097fa..fec7b977 100644 --- a/packages/dialog/index.ts +++ b/packages/dialog/index.ts @@ -95,7 +95,9 @@ VantComponent({ this.close(); } this.$emit('close', action); - this.$emit(action); + + //把 dialog 实例传递出去,可以通过 stopLoading() 在外部关闭按钮的 loading + this.$emit(action, { dialog: this }); const callback = this.data[action === 'confirm' ? 'onConfirm' : 'onCancel']; if (callback) {