From 90d3a95ff4f94da8455744bb0aa2a43c40a04775 Mon Sep 17 00:00:00 2001 From: zhangyh Date: Wed, 19 Nov 2025 16:08:21 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E9=AB=98=E7=BA=A7=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E5=85=88=E7=82=B9=E5=96=9C=E6=AC=A2=E5=86=8D=E7=82=B9=E4=B8=8D?= =?UTF-8?q?=E5=96=9C=E6=AC=A2,=E5=9C=A8design=E5=88=97=E8=A1=A8=E6=B6=88?= =?UTF-8?q?=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/home/design/tools.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/component/home/design/tools.vue b/src/component/home/design/tools.vue index 448a169a..7c77be77 100644 --- a/src/component/home/design/tools.vue +++ b/src/component/home/design/tools.vue @@ -203,7 +203,10 @@ export default defineComponent({ }) } const unLike = (item)=>{ - data.unLikeList.push(item) + const hasSame = data.unLikeList.some((unlikeItem:any)=>unlikeItem?.id === item?.id) + if(!hasSame){ + data.unLikeList.push(item) + } } let cleardata = async ()=>{ let list = [] @@ -220,10 +223,12 @@ export default defineComponent({ const { newLike, ...rest } = item; // 解构赋值移除 newLike return item.oldSort ? { ...rest, sort: item.oldSort } : rest; }); + const addIdSet = new Set(generateCourse.map((item:any)=>item?.id)) + const deleteList = data.unLikeList.filter((item:any)=>!addIdSet.has(item?.id)) let emitData = { status:'add', addList:generateCourse, - deleteList:data.unLikeList, + deleteList, } emit('editToolsSuccess',emitData,'batch') @@ -489,9 +494,6 @@ export default defineComponent({ // .ant-modal-mask{ // position: absolute; // } - .ant-modal-wrap,.ant-modal-mask{ - - } > .ant-modal-root{ > .ant-modal-centered{ > .fullScreen{