feat(Dialog): add opened、closed event (#4634)

This commit is contained in:
neverland
2019-09-30 11:03:48 +08:00
committed by GitHub
parent 02a81a1ac3
commit c4713ad0c2
3 changed files with 17 additions and 1 deletions

View File

@@ -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 (
<transition name="van-dialog-bounce">
<transition
name="van-dialog-bounce"
onAfterEnter={this.onOpened}
onAfterLeave={this.onClosed}
>
<div
vShow={this.value}
role="dialog"