From 55fb304fa3bf4343335fe6892f374b96453f0383 Mon Sep 17 00:00:00 2001 From: ZiuChen <457353192@qq.com> Date: Fri, 9 Sep 2022 11:04:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3Ctrl=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE=E5=A4=B1=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20=E7=A7=BB=E9=99=A4=E6=97=A5=E5=BF=97=E8=BE=93?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cpns/ClipItemList.vue | 2 -- src/views/Main.vue | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/cpns/ClipItemList.vue b/src/cpns/ClipItemList.vue index 383e55d..f4aa5fd 100644 --- a/src/cpns/ClipItemList.vue +++ b/src/cpns/ClipItemList.vue @@ -113,7 +113,6 @@ const handleItemClick = (ev, item) => { // 找到selectList的最高位与最低位 // 如果index大于最高位/小于最低位 则将二者之间的全部历史都选中 // 区分不同标签 - console.log(props.currentActiveTab) const tmpArray = selectItemList.value .filter((item) => props.currentActiveTab === 'all' ? true : item.type === props.currentActiveTab @@ -121,7 +120,6 @@ const handleItemClick = (ev, item) => { .sort((a, b) => selectItemList.value.indexOf(a) - selectItemList.value.indexOf(b)) const h = props.showList.indexOf(tmpArray[0]) // 已选中的index最高位 实际上index是最小的 const l = props.showList.indexOf(tmpArray[tmpArray.length - 1]) // 已选中的最低位 实际上index是最大的 - console.log(props.showList) if (index < h) { // 更高: index从0开始计算 // selectItemList.value = [] diff --git a/src/views/Main.vue b/src/views/Main.vue index 7ba70bb..e78be9b 100644 --- a/src/views/Main.vue +++ b/src/views/Main.vue @@ -274,12 +274,11 @@ onMounted(() => { } else { // 无上述情况 执行默认: 隐藏uTools主窗口 } - } else if (ctrlKey || metaKey || isArrow || isEnter) { - // 仅有 Ctrl时 什么也不执行 (utools模拟执行粘贴时触发) + } else if (isArrow || isEnter) { e.preventDefault() - } else if (isShift) { + } else if (isShift || ctrlKey || metaKey) { // Shift: 多选操作 - // e.preventDefault() + // Ctrl: utools模拟执行粘贴时触发 } else { window.focus() // 其他键盘事件 直接聚焦搜索框 }