From ea112ccb98aa5aadbde16b689bb50fc94ec34b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Fri, 14 Oct 2022 10:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(component):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20upload=20=E7=BB=84=E4=BB=B6=20drag=20=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E4=B8=BA=20false=20=E6=97=B6=E7=9A=84=20removeEventListener=20?= =?UTF-8?q?=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/component/src/component/upload/index.vue | 6 +++--- .../src/document/zh-CN/guide/changelog.md | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/package/component/src/component/upload/index.vue b/package/component/src/component/upload/index.vue index 090bf3fd..84544c97 100644 --- a/package/component/src/component/upload/index.vue +++ b/package/component/src/component/upload/index.vue @@ -381,7 +381,7 @@ function dragOver(e: any) { onMounted(() => { nextTick(() => { - if(dragRef.value) { + if (dragRef.value) { dragRef.value.addEventListener("dragenter", dragEnter, false); dragRef.value.addEventListener("dragover", dragOver, false); dragRef.value.addEventListener("drop", uploadChange, false); @@ -390,12 +390,12 @@ onMounted(() => { }); onUnmounted(() => { - if(dragRef.value) { + if (dragRef.value) { dragRef.value.removeEventListener("dragenter"); dragRef.value.removeEventListener("dragover"); dragRef.value.removeEventListener("drop"); } -}) +});