From 209a5725ba27a176d178c3b4232cf2a9027d1651 Mon Sep 17 00:00:00 2001 From: lianyue Date: Fri, 29 Mar 2019 10:13:31 +0800 Subject: [PATCH] fix #294 --- src/FileUpload.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/FileUpload.vue b/src/FileUpload.vue index 93d27c1..5cc59fb 100644 --- a/src/FileUpload.vue +++ b/src/FileUpload.vue @@ -223,10 +223,14 @@ export default { // 更新下父级 if (this.$parent) { this.$parent.$forceUpdate() + // 拖拽渲染 + this.$parent.$nextTick(() => { + this.watchDrop(this.drop) + }) + } else { + // 拖拽渲染 + this.watchDrop(this.drop) } - - // 拖拽渲染 - this.watchDrop(this.drop) }) }, @@ -240,6 +244,9 @@ export default { // 设置成不激活 this.active = false + + // 销毁拖拽事件 + this.watchDrop(false) }, computed: {