feat: add display of directory information

This commit is contained in:
hayden
2024-11-06 13:51:38 +08:00
parent 0a8c532506
commit 288f026d47
3 changed files with 20 additions and 3 deletions

View File

@@ -29,11 +29,13 @@
<col />
</colgroup>
<tbody>
<tr v-for="item in information" class="h-8 border-b">
<tr v-for="item in information" class="h-8 whitespace-nowrap border-b">
<td class="border-r bg-gray-300 px-4 dark:bg-gray-800">
{{ $t(`info.${item.key}`) }}
</td>
<td class="break-all px-4">{{ item.display }}</td>
<td class="overflow-hidden text-ellipsis break-all px-4">
{{ item.display }}
</td>
</tr>
</tbody>
</table>
@@ -81,7 +83,8 @@ const pathOptions = computed(() => {
const information = computed(() => {
return Object.values(baseInfo.value).filter((row) => {
if (editable.value) {
return row.key !== 'fullname'
const hiddenKeys = ['fullname', 'pathIndex']
return !hiddenKeys.includes(row.key)
}
return true
})