diff --git a/editor/src/init.js b/editor/src/init.js index 668fac5e..296e8996 100644 --- a/editor/src/init.js +++ b/editor/src/init.js @@ -24,7 +24,11 @@ const chooseFiles = files => { //拖拽上传 dropElement.addEventListener("dragenter", stopPropagation, false) dropElement.addEventListener("dragover", stopPropagation, false) -dropElement.addEventListener("drop", e => chooseFiles(e.dataTransfer.files), false) +dropElement.addEventListener("drop", e => { + chooseFiles(e.dataTransfer.files) + stopPropagation(e) + } + , false) //选择上传 /** @type { HTMLInputElement } */ diff --git a/editor/src/package-lock.json b/editor/src/package-lock.json index 6314e848..e75b0247 100644 --- a/editor/src/package-lock.json +++ b/editor/src/package-lock.json @@ -1,12 +1,12 @@ { "name": "petpet-editor", - "version": "0.1.0", + "version": "0.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "petpet-editor", - "version": "0.1.0", + "version": "0.2.0", "dependencies": { "fabric": "^5.2.4", "file-saver": "^2.0.5",