feat: support toggling file list columns (#12099)

* feat: support toggling file list columns

* feat: use fu table column select for file list

* chore: remove unused file column i18n keys

* feat: simplify file column visibility logic and remove unused configurations
This commit is contained in:
A_Words
2026-03-09 09:51:53 +08:00
committed by GitHub
parent 462ca6b373
commit d4394616af
@@ -424,23 +424,32 @@
<el-button plain class="close" icon="Close" @click="closeMove"></el-button>
</el-tooltip>
</el-button-group>
<div class="w-80">
<el-input
v-model="req.search"
clearable
@clear="search()"
@keydown.enter="search()"
:placeholder="$t('file.search')"
>
<template #prepend>
<el-checkbox v-model="req.containSub">
{{ $t('file.sub') }}
</el-checkbox>
</template>
<template #append>
<el-button icon="Search" @click="search" round />
</template>
</el-input>
<div class="flex items-center gap-2">
<fu-table-column-select
:columns="columns"
trigger="hover"
:title="$t('commons.table.selectColumn')"
popper-class="popper-class"
:only-icon="true"
/>
<div class="w-80">
<el-input
v-model="req.search"
clearable
@clear="search()"
@keydown.enter="search()"
:placeholder="$t('file.search')"
>
<template #prepend>
<el-checkbox v-model="req.containSub">
{{ $t('file.sub') }}
</el-checkbox>
</template>
<template #append>
<el-button icon="Search" @click="search" round />
</template>
</el-input>
</div>
</div>
</div>
</template>
@@ -456,6 +465,8 @@
@cell-mouse-leave="hideFavorite"
:heightDiff="heightDiff"
:right-buttons="rightButtons"
:columns="columns"
localKey="fileManagementColumn"
>
<el-table-column type="selection" width="30" />
<el-table-column
@@ -827,6 +838,7 @@ const setRenameRef = (key: string, el: any) => {
const getCurrentRename = () => renameRefs.value[editableTabsKey.value];
const pathRefs = ref<Record<string, any>>({});
const columns = ref([]);
const setPathRef = (key: string, el: any) => {
if (el) {