style: 文件列表样式修改 (#775)

pull/779/head
zhengkunwang223 2 years ago committed by GitHub
parent bfd857ec4b
commit 1208514f37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -98,7 +98,7 @@
:data="data" :data="data"
@search="search" @search="search"
> >
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="30" />
<el-table-column :label="$t('commons.table.name')" min-width="250" fix show-overflow-tooltip> <el-table-column :label="$t('commons.table.name')" min-width="250" fix show-overflow-tooltip>
<template #default="{ row }"> <template #default="{ row }">
<svg-icon v-if="row.isDir" className="table-icon" iconName="p-file-folder"></svg-icon> <svg-icon v-if="row.isDir" className="table-icon" iconName="p-file-folder"></svg-icon>
@ -107,14 +107,14 @@
<span v-if="row.isSymlink">-> {{ row.linkPath }}</span> <span v-if="row.isSymlink">-> {{ row.linkPath }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('file.mode')" prop="mode"> <el-table-column :label="$t('file.mode')" prop="mode" max-width="50">
<template #default="{ row }"> <template #default="{ row }">
<el-link :underline="false" @click="openMode(row)" type="primary">{{ row.mode }}</el-link> <el-link :underline="false" @click="openMode(row)" type="primary">{{ row.mode }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column :label="$t('file.user')" prop="user" show-overflow-tooltip></el-table-column> <!-- <el-table-column :label="$t('file.user')" prop="user" show-overflow-tooltip></el-table-column>
<el-table-column :label="$t('file.group')" prop="group"></el-table-column> --> <el-table-column :label="$t('file.group')" prop="group"></el-table-column> -->
<el-table-column :label="$t('file.size')" prop="size"> <el-table-column :label="$t('file.size')" prop="size" max-width="50">
<template #default="{ row }"> <template #default="{ row }">
<span v-if="row.isDir"> <span v-if="row.isDir">
<el-button type="primary" link small @click="getDirSize(row)"> <el-button type="primary" link small @click="getDirSize(row)">
@ -130,15 +130,15 @@
<el-table-column <el-table-column
:label="$t('file.updateTime')" :label="$t('file.updateTime')"
prop="modTime" prop="modTime"
:formatter="dateFormat"
min-width="150" min-width="150"
:formatter="dateFormat"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<fu-table-operations <fu-table-operations
:ellipsis="1" :ellipsis="2"
:buttons="buttons" :buttons="buttons"
:label="$t('commons.table.operate')" :label="$t('commons.table.operate')"
min-width="200"
fixed="right" fixed="right"
fix fix
/> />
@ -305,7 +305,7 @@ const copyDir = (row: File.File) => {
input.select(); input.select();
document.execCommand('copy'); document.execCommand('copy');
document.body.removeChild(input); document.body.removeChild(input);
MsgSuccess('复制成功'); MsgSuccess(i18n.global.t('commons.msg.copySuccess'));
} }
}; };
@ -562,8 +562,11 @@ const buttons = [
click: open, click: open,
}, },
{ {
label: i18n.global.t('file.copyDir'), label: i18n.global.t('file.deCompress'),
click: copyDir, click: openDeCompress,
disabled: (row: File.File) => {
return row.isDir;
},
}, },
{ {
label: i18n.global.t('file.mode'), label: i18n.global.t('file.mode'),
@ -575,17 +578,14 @@ const buttons = [
openCompress([row]); openCompress([row]);
}, },
}, },
{
label: i18n.global.t('file.deCompress'),
click: openDeCompress,
disabled: (row: File.File) => {
return row.isDir;
},
},
{ {
label: i18n.global.t('file.rename'), label: i18n.global.t('file.rename'),
click: openRename, click: openRename,
}, },
{
label: i18n.global.t('file.copyDir'),
click: copyDir,
},
{ {
label: i18n.global.t('commons.button.delete'), label: i18n.global.t('commons.button.delete'),
click: delFile, click: delFile,

@ -39,7 +39,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
host: '0.0.0.0', host: '0.0.0.0',
proxy: { proxy: {
'/api/v1': { '/api/v1': {
target: 'http://192.168.1.15:9999/', target: 'http://localhost:9999/',
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
}, },

Loading…
Cancel
Save