From ae974ae4365448317d0681ef500155c39bd6b7e6 Mon Sep 17 00:00:00 2001 From: lizijiee <562949697@qq.com> Date: Mon, 1 Apr 2024 17:49:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A1=86=E9=80=89=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Header/RecycleModal.vue | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/layout/components/Header/RecycleModal.vue b/src/layout/components/Header/RecycleModal.vue index d2f7ae5..f56ff8a 100644 --- a/src/layout/components/Header/RecycleModal.vue +++ b/src/layout/components/Header/RecycleModal.vue @@ -261,22 +261,19 @@ function closeModal(event: MouseEvent) { } async function remove() { - const arr = listData.value.filter((item) => { - return item.checked - }) - - if (arr.length === 0) { + if ( !selectIds.value|| selectIds.value.length === 0) { message.error('至少选中一个') return } - const ids = arr.map(item => item.id).join(',') + const ids = selectIds.value.join(',') const res = await removeFiles({ pictureid: ids }) if (res.code === 'OK') { message.success('移除成功') pagination.pageNo = 1 const list = await featchList() listData.value = list + layout() } } @@ -311,10 +308,10 @@ function onCheckChange(val: any, item: any) { v-model:show="show" :mask-closable="false" style="position: relative;" transform-origin="center" @after-enter="afterEnter" @after-leave="afterLeave" > - +
-- 2.39.3