mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
feat(Dialog): add opened、closed event (#4634)
This commit is contained in:
@@ -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"
|
||||
|
Reference in New Issue
Block a user