From 369cb2d1a8d7e18bbef12f2ce71b391856ae3cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Mon, 12 May 2025 11:57:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E6=8E=A7=E5=88=B6=E6=A0=8F?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E6=A0=87=E8=A2=AB=E7=A7=BB=E5=8A=A8=E8=B5=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script.js | 6 ++++-- service-worker.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index 01f2937f..fadc10a6 100644 --- a/script.js +++ b/script.js @@ -3755,12 +3755,14 @@ function initialize() { const formStr = event.dataTransfer.getData('from'); if (formStr) { //从队伍里拖下来的,需要重新创建怪物头像,强制复制 event.preventDefault(); - isCopy = true; - event.dataTransfer.dropEffect = 'copy'; const [teamNum, isAssist, indexInTeam] = JSON.parse(formStr); const mon = formation.teams[teamNum][isAssist][indexInTeam]; newIcon = createIndexedIcon('card', mon.id); } else if (draggedNode) { + if (richTextTools.contains(draggedNode)) { + isCopy = true; + event.dataTransfer.dropEffect = 'copy'; + } if (event.dataTransfer.dropEffect === 'move') { newIcon = draggedNode; } else { diff --git a/service-worker.js b/service-worker.js index 65e16adc..37633997 100644 --- a/service-worker.js +++ b/service-worker.js @@ -48287,7 +48287,7 @@ const cachesMap = new Map([ ], [ "script.js", - "54d48e5bbcb4c71363bd8ac9dcd34ba7" + "9b67e5961d34e6e19da13a7ec1ef73fb" ], [ "solo.html",