add done parameter

This commit is contained in:
Leopoldthecoder
2017-01-14 16:10:33 +08:00
parent 900d7af019
commit 03d618973f
3 changed files with 19 additions and 19 deletions

View File

@@ -92,7 +92,7 @@
},
methods: {
safeClose() {
getSafeClose() {
const currentId = this.uid;
return () => {
this.$nextTick(() => {
@@ -138,8 +138,8 @@
}
this.action = action;
if (typeof this.beforeClose === 'function') {
this.close = this.safeClose();
this.beforeClose(action, this);
this.close = this.getSafeClose();
this.beforeClose(action, this, this.close);
} else {
this.doClose();
}