From e68b7812bf875981755e37f38b3c427a0ca6804f Mon Sep 17 00:00:00 2001 From: Arjun Date: Tue, 17 Dec 2024 10:29:27 +0800 Subject: [PATCH] fix: build type check --- src/pages/main/components/SnapVault.vue | 5 +++-- src/pages/main/components/SnapVaultItemList.vue | 12 ++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/pages/main/components/SnapVault.vue b/src/pages/main/components/SnapVault.vue index 798eac6..763fa86 100644 --- a/src/pages/main/components/SnapVault.vue +++ b/src/pages/main/components/SnapVault.vue @@ -29,6 +29,7 @@ async function loadData() { list.value = entries.filter(entry => entry.isFile && FileSizeFormatter.isPictureFile(entry.name)).map(entry => ({ id: entry.name, image: `${val?.value}/images/${entry.name}`, + checked: false, })) } @@ -48,11 +49,11 @@ async function handleDelete() { deleteLoading.value = true const newList = list.value.filter(item => !item.checked) const confirmation = await confirm( - `是否确认删除 ${ list.value.length } 个文件?`, + `是否确认删除 ${ newList.length } 个文件?`, { title: '确认删除', kind: 'warning' }, ) if (confirmation) { - for (const item of list.value) { + for (const item of newList) { await remove(item.image) } } diff --git a/src/pages/main/components/SnapVaultItemList.vue b/src/pages/main/components/SnapVaultItemList.vue index 63dc1ca..8515958 100644 --- a/src/pages/main/components/SnapVaultItemList.vue +++ b/src/pages/main/components/SnapVaultItemList.vue @@ -1,7 +1,6 @@