Skip to content

Commit

Permalink
fix: 删除重复后, 更新文件列表, 只剩一个文件的分组不应该显示
Browse files Browse the repository at this point in the history
  • Loading branch information
yubaoquan committed Apr 14, 2024
1 parent 6303258 commit 5572f85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/renderer/src/components/file-list/file-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
</template>

<v-list-item-title>{{ file.name }}</v-list-item-title>
<v-list-item-subtitle>{{ file.path }}</v-list-item-subtitle>
<v-list-item-subtitle
>{{ file.path }}
<v-tooltip location="top" activator="parent">{{ file.path }}</v-tooltip>
</v-list-item-subtitle>

<template #append>
<v-btn
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/views/dutor-view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const updateFiles = (deleted: string[]) => {
filesGroups.value.forEach((group) => {
group.files = group.files.filter((file) => !deleted.includes(file.path));
});
filesGroups.value = filesGroups.value.filter((group) => group.files.length > 0);
filesGroups.value = filesGroups.value.filter((group) => group.files.length > 1);
};
const handleDeleteFiles = async (paths: string[]) => {
Expand Down

0 comments on commit 5572f85

Please sign in to comment.