From c4713ad0c2c45c10467f1a7383e98f0e967a2903 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 30 Sep 2019 11:03:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(Dialog):=20add=20opened=E3=80=81closed=20e?= =?UTF-8?q?vent=20(#4634)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dialog/Dialog.js | 14 +++++++++++++- src/dialog/README.md | 2 ++ src/dialog/README.zh-CN.md | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/dialog/Dialog.js b/src/dialog/Dialog.js index 7b0d2d3fd..8f587b964 100644 --- a/src/dialog/Dialog.js +++ b/src/dialog/Dialog.js @@ -73,6 +73,14 @@ export default createComponent({ if (this.callback) { this.callback(action); } + }, + + onOpened() { + this.$emit('opened'); + }, + + onClosed() { + this.$emit('closed'); } }, @@ -131,7 +139,11 @@ export default createComponent({ ); return ( - +