fix: 修正Ctrl相关快捷键失效的问题 移除日志输出

This commit is contained in:
ZiuChen
2022-09-09 11:04:54 +08:00
parent cea005a9a1
commit 55fb304fa3
2 changed files with 3 additions and 6 deletions

View File

@@ -113,7 +113,6 @@ const handleItemClick = (ev, item) => {
// 找到selectList的最高位与最低位 // 找到selectList的最高位与最低位
// 如果index大于最高位/小于最低位 则将二者之间的全部历史都选中 // 如果index大于最高位/小于最低位 则将二者之间的全部历史都选中
// 区分不同标签 // 区分不同标签
console.log(props.currentActiveTab)
const tmpArray = selectItemList.value const tmpArray = selectItemList.value
.filter((item) => .filter((item) =>
props.currentActiveTab === 'all' ? true : item.type === props.currentActiveTab 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)) .sort((a, b) => selectItemList.value.indexOf(a) - selectItemList.value.indexOf(b))
const h = props.showList.indexOf(tmpArray[0]) // 已选中的index最高位 实际上index是最小的 const h = props.showList.indexOf(tmpArray[0]) // 已选中的index最高位 实际上index是最小的
const l = props.showList.indexOf(tmpArray[tmpArray.length - 1]) // 已选中的最低位 实际上index是最大的 const l = props.showList.indexOf(tmpArray[tmpArray.length - 1]) // 已选中的最低位 实际上index是最大的
console.log(props.showList)
if (index < h) { if (index < h) {
// 更高: index从0开始计算 // 更高: index从0开始计算
// selectItemList.value = [] // selectItemList.value = []

View File

@@ -274,12 +274,11 @@ onMounted(() => {
} else { } else {
// 无上述情况 执行默认: 隐藏uTools主窗口 // 无上述情况 执行默认: 隐藏uTools主窗口
} }
} else if (ctrlKey || metaKey || isArrow || isEnter) { } else if (isArrow || isEnter) {
// 仅有 Ctrl时 什么也不执行 (utools模拟执行粘贴时触发)
e.preventDefault() e.preventDefault()
} else if (isShift) { } else if (isShift || ctrlKey || metaKey) {
// Shift: 多选操作 // Shift: 多选操作
// e.preventDefault() // Ctrl: utools模拟执行粘贴时触发
} else { } else {
window.focus() // 其他键盘事件 直接聚焦搜索框 window.focus() // 其他键盘事件 直接聚焦搜索框
} }