[bugfix] Dialog: action event (#2571)

This commit is contained in:
neverland 2019-01-20 13:56:40 +08:00 committed by GitHub
parent 6e9a097ded
commit cf9ec2c144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,6 +42,7 @@ export default sfc({
methods: {
handleAction(action) {
this.$emit(action);
if (this.beforeClose) {
this.loading[action] = true;
this.beforeClose(action, state => {
@ -57,7 +58,6 @@ export default sfc({
onClose(action) {
this.$emit('input', false);
this.$emit(action);
this.callback && this.callback(action);
}
},