mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 16:56:40 +08:00
fix: 优化 FileList 组件中的文件和目录图标显示逻辑
This commit is contained in:
@@ -106,9 +106,6 @@ const files = computed(() => items.value.filter(item => item.type === 'file' &&
|
|||||||
// 是否文件
|
// 是否文件
|
||||||
const isFile = computed(() => inProps.item.type == 'file')
|
const isFile = computed(() => inProps.item.type == 'file')
|
||||||
|
|
||||||
// 是否目录
|
|
||||||
const isDir = computed(() => !isFile.value)
|
|
||||||
|
|
||||||
// 需要整理的文件项
|
// 需要整理的文件项
|
||||||
const transferItems = ref<FileItem[]>([])
|
const transferItems = ref<FileItem[]>([])
|
||||||
|
|
||||||
@@ -622,7 +619,8 @@ onMounted(() => {
|
|||||||
v-if="inProps.icons && item.extension"
|
v-if="inProps.icons && item.extension"
|
||||||
:icon="inProps.icons[item.extension.toLowerCase()] || inProps.icons?.other"
|
:icon="inProps.icons[item.extension.toLowerCase()] || inProps.icons?.other"
|
||||||
/>
|
/>
|
||||||
<VIcon v-else icon="mdi-folder-outline" />
|
<VIcon v-else-if="item.type == 'dir'" icon="mdi-folder-outline" />
|
||||||
|
<VIcon v-else icon="mdi-file-outline" />
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<VListItemTitle v-text="item.name" />
|
<VListItemTitle v-text="item.name" />
|
||||||
|
|||||||
Reference in New Issue
Block a user