From 465755ee5fd91dce80550477ed25b95287276ae7 Mon Sep 17 00:00:00 2001 From: ZiuChen <457353192@qq.com> Date: Sun, 25 Sep 2022 14:47:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=9A=E9=80=89=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=8B=E7=A7=BB=E5=8A=A8=E9=BC=A0=E6=A0=87=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E6=BF=80=E6=B4=BB=E5=88=97=E8=A1=A8=E6=9D=A1=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cpns/ClipItemList.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cpns/ClipItemList.vue b/src/cpns/ClipItemList.vue index bfdf778..d0050f8 100644 --- a/src/cpns/ClipItemList.vue +++ b/src/cpns/ClipItemList.vue @@ -120,6 +120,7 @@ const handleItemClick = (ev, item) => { if (props.isMultiple === true) { const i = selectItemList.value.indexOf(item) // 在已选中列表中的位置 const index = props.showList.indexOf(item) // 在全部列表中的位置 + activeIndex.value = index if (selectItemList.value.length !== 0 && isShiftDown.value) { // 列表不为空 且 Shift按下 多选 // 找到selectList的最高位与最低位 @@ -185,7 +186,11 @@ const handleItemClick = (ev, item) => { } } const activeIndex = ref(0) -const handleMouseOver = (index) => (activeIndex.value = index) +const handleMouseOver = (index) => { + if (!props.isMultiple) { + activeIndex.value = index + } +} // 父组件中改变了引用类型的地址 故要用 getter返回 watch( () => props.showList,