mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] Dialog: action event (#2571)
This commit is contained in:
parent
6e9a097ded
commit
cf9ec2c144
@ -42,6 +42,7 @@ export default sfc({
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handleAction(action) {
|
handleAction(action) {
|
||||||
|
this.$emit(action);
|
||||||
if (this.beforeClose) {
|
if (this.beforeClose) {
|
||||||
this.loading[action] = true;
|
this.loading[action] = true;
|
||||||
this.beforeClose(action, state => {
|
this.beforeClose(action, state => {
|
||||||
@ -57,7 +58,6 @@ export default sfc({
|
|||||||
|
|
||||||
onClose(action) {
|
onClose(action) {
|
||||||
this.$emit('input', false);
|
this.$emit('input', false);
|
||||||
this.$emit(action);
|
|
||||||
this.callback && this.callback(action);
|
this.callback && this.callback(action);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user