style: 修改文件列表部分样式 (#2758)

pull/2760/head
zhengkunwang 2023-11-01 14:22:33 +08:00 committed by GitHub
parent 00cad5b586
commit 9acd315fef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 17 deletions

View File

@ -112,7 +112,11 @@
<el-table :data="favorites"> <el-table :data="favorites">
<el-table-column prop="name"> <el-table-column prop="name">
<template #default="{ row }"> <template #default="{ row }">
<span class="table-link" @click="toFavorite(row)" type="primary"> <span
class="table-link text-ellipsis"
@click="toFavorite(row)"
type="primary"
>
<svg-icon <svg-icon
v-if="row.isDir" v-if="row.isDir"
className="table-icon" className="table-icon"
@ -176,7 +180,7 @@
<template #default="{ row, $index }"> <template #default="{ row, $index }">
<div @mouseenter="showFavorite($index)" @mouseleave="hideFavorite"> <div @mouseenter="showFavorite($index)" @mouseleave="hideFavorite">
<el-row> <el-row>
<el-col :span="23"> <el-col :span="1">
<svg-icon <svg-icon
v-if="row.isDir" v-if="row.isDir"
className="table-icon" className="table-icon"
@ -187,10 +191,17 @@
className="table-icon" className="table-icon"
:iconName="getIconName(row.extension)" :iconName="getIconName(row.extension)"
></svg-icon> ></svg-icon>
<span class="table-link" @click="open(row)" type="primary">{{ row.name }}</span> </el-col>
<el-col :span="22">
<div class="text-parent">
<span class="table-link text-ellipsis" @click="open(row)" type="primary">
{{ row.name }}
</span>
<span v-if="row.isSymlink">-> {{ row.linkPath }}</span> <span v-if="row.isSymlink">-> {{ row.linkPath }}</span>
</div>
</el-col> </el-col>
<el-col :span="1"> <el-col :span="1">
<div>
<el-button <el-button
v-if="row.favoriteID > 0" v-if="row.favoriteID > 0"
link link
@ -207,6 +218,7 @@
@click="addFavorite(row)" @click="addFavorite(row)"
></el-button> ></el-button>
</div> </div>
</div>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -895,6 +907,18 @@ onMounted(() => {
} }
} }
.text-parent {
display: flex;
width: 100%;
margin-left: 2px;
}
.text-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.favorite-item { .favorite-item {
max-height: 650px; max-height: 650px;
overflow: auto; overflow: auto;