💎 优化所有文件卡片样式

This commit is contained in:
2026-06-05 12:45:07 +08:00
parent 8201f526f0
commit 4eb2146206
4 changed files with 101 additions and 23 deletions
+81
View File
@@ -73,3 +73,84 @@
border-color: rgba(113, 153, 168, 0.68);
box-shadow: 0 20px 44px rgba(4, 10, 14, 0.46);
}
.data-table-2026 thead th {
background: rgba(236, 244, 246, 0.76);
}
.data-table-2026 thead th:first-child {
border-radius: 30px 0 0 30px;
}
.data-table-2026 thead th:last-child {
border-radius: 0 30px 30px 0;
}
.file-row-2026 > td {
border-top: 1px solid rgba(199, 213, 216, 0.78);
border-bottom: 1px solid rgba(199, 213, 216, 0.78);
background:
linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 248, 0.92)),
radial-gradient(circle at 0% 0%, rgba(129, 163, 174, 0.18), transparent 32%);
box-shadow: 0 12px 28px rgba(126, 149, 154, 0.2);
transition:
background 220ms ease,
border-color 220ms ease,
box-shadow 220ms ease;
}
.file-row-2026 > td:first-child {
border-left: 1px solid rgba(199, 213, 216, 0.78);
border-radius: 30px 0 0 30px;
}
.file-row-2026 > td:last-child {
border-right: 1px solid rgba(199, 213, 216, 0.78);
border-radius: 0 30px 30px 0;
}
.file-row-2026:hover > td {
border-color: rgba(126, 162, 173, 0.9);
background:
linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(230, 241, 244, 0.96)),
radial-gradient(circle at 0% 0%, rgba(112, 151, 164, 0.22), transparent 34%);
box-shadow: 0 18px 38px rgba(115, 142, 149, 0.3);
}
.file-row-2026.is-selected > td {
border-color: rgba(112, 151, 164, 0.96);
background:
linear-gradient(135deg, rgba(236, 246, 249, 0.98), rgba(219, 235, 240, 0.96)),
radial-gradient(circle at 0% 0%, rgba(91, 135, 151, 0.2), transparent 36%);
}
.file-row-2026.is-muted > td {
opacity: 0.74;
}
.dark .data-table-2026 thead th {
background: rgba(31, 45, 52, 0.82);
}
.dark .file-row-2026 > td {
border-color: rgba(68, 86, 94, 0.82);
background:
linear-gradient(135deg, rgba(35, 50, 57, 0.96), rgba(25, 38, 45, 0.94)),
radial-gradient(circle at 0% 0%, rgba(101, 139, 154, 0.18), transparent 34%);
box-shadow: 0 14px 30px rgba(4, 10, 14, 0.32);
}
.dark .file-row-2026:hover > td {
border-color: rgba(113, 153, 168, 0.72);
background:
linear-gradient(135deg, rgba(40, 58, 66, 0.98), rgba(28, 43, 51, 0.96)),
radial-gradient(circle at 0% 0%, rgba(105, 150, 166, 0.24), transparent 36%);
box-shadow: 0 18px 38px rgba(4, 10, 14, 0.48);
}
.dark .file-row-2026.is-selected-dark > td {
border-color: rgba(121, 161, 176, 0.82);
background:
linear-gradient(135deg, rgba(42, 62, 72, 0.98), rgba(29, 48, 58, 0.96)),
radial-gradient(circle at 0% 0%, rgba(117, 166, 184, 0.22), transparent 36%);
}
+1 -1
View File
@@ -3,7 +3,7 @@
:type="type"
:disabled="disabled || loading"
@click="$emit('click', $event)"
class="inline-flex items-center justify-center px-4 py-2 rounded-md font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed"
class="inline-flex items-center justify-center rounded-[30px] px-4 py-2 font-medium shadow-sm transition-all duration-200 hover:shadow-md focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:shadow-sm"
:class="[
sizeClasses,
variantClasses,
+8 -11
View File
@@ -1,14 +1,15 @@
<template>
<div class="rounded-lg shadow-sm overflow-hidden transition-all duration-300"
:class="[isDarkMode ? 'bg-gray-800 bg-opacity-70' : 'bg-white']">
<div class="px-6 py-4 border-b" :class="[isDarkMode ? 'border-gray-700' : 'border-gray-200']">
<div
class="data-table-2026 theme-2026-card theme-2026-card-hover overflow-hidden rounded-[30px] shadow-md transition-all duration-300 hover:-translate-y-0.5 hover:shadow-lg"
>
<div class="px-6 py-4 border-b" :class="[isDarkMode ? 'border-gray-700/80' : 'border-[#d9e4e6]']">
<h3 class="text-lg font-medium" :class="[isDarkMode ? 'text-white' : 'text-gray-800']">
{{ title }}
</h3>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y" :class="[isDarkMode ? 'divide-gray-700' : 'divide-gray-200']">
<thead :class="[isDarkMode ? 'bg-gray-900/50' : 'bg-gray-50']">
<div class="overflow-x-auto px-3 pb-3">
<table class="min-w-full border-separate border-spacing-y-3">
<thead>
<tr>
<th v-for="header in headers" :key="header"
class="px-6 py-3.5 text-left text-xs font-medium uppercase tracking-wider"
@@ -17,11 +18,7 @@
</th>
</tr>
</thead>
<tbody :class="[
isDarkMode
? 'bg-gray-800/50 divide-y divide-gray-700'
: 'bg-white divide-y divide-gray-200'
]">
<tbody>
<slot name="body"></slot>
</tbody>
</table>
+10 -10
View File
@@ -391,14 +391,14 @@
<tr
v-for="file in tableData"
:key="file.id"
class="transition-colors duration-200"
class="file-row-2026 transition-all duration-200 hover:-translate-y-0.5"
:class="[
selectedFileIds.has(file.id)
? isDarkMode
? 'bg-indigo-950/30'
: 'bg-indigo-50/70'
? 'is-selected-dark'
: 'is-selected'
: '',
isDarkMode ? 'hover:bg-gray-700/70' : 'hover:bg-gray-50'
file.isExpiredFile ? 'is-muted' : ''
]"
>
<td class="px-6 py-4 whitespace-nowrap">
@@ -418,7 +418,7 @@
</td>
<td class="px-6 py-4">
<div class="flex min-w-0 items-center gap-3">
<div class="rounded-lg p-2" :class="[isDarkMode ? 'bg-gray-700' : 'bg-gray-100']">
<div class="rounded-[22px] p-2" :class="[isDarkMode ? 'bg-gray-700' : 'bg-gray-100']">
<FileTextIcon v-if="file.isTextFile" class="h-4 w-4" :class="[mutedTextClass]" />
<FileIcon v-else class="h-4 w-4" :class="[mutedTextClass]" />
</div>
@@ -492,7 +492,7 @@
<button
type="button"
:title="t('fileManage.detail')"
class="inline-flex items-center rounded-md px-3 py-1.5 transition-colors duration-200"
class="inline-flex items-center rounded-[30px] px-3 py-1.5 shadow-sm transition-all duration-200 hover:shadow-md"
:class="[
isDarkMode
? 'bg-indigo-900/20 text-indigo-300 hover:bg-indigo-900/30'
@@ -507,7 +507,7 @@
v-if="file.canPreviewText"
type="button"
:title="t('fileManage.viewText')"
class="inline-flex items-center rounded-md px-3 py-1.5 transition-colors duration-200"
class="inline-flex items-center rounded-[30px] px-3 py-1.5 shadow-sm transition-all duration-200 hover:shadow-md"
:class="[
isDarkMode
? 'bg-gray-700 text-gray-300 hover:bg-gray-600'
@@ -524,7 +524,7 @@
file.isTextFile ? t('fileManage.exportText') : t('fileManage.downloadFile')
"
:disabled="Boolean(downloadingFileId)"
class="inline-flex items-center rounded-md px-3 py-1.5 transition-colors duration-200 disabled:cursor-not-allowed disabled:opacity-60"
class="inline-flex items-center rounded-[30px] px-3 py-1.5 shadow-sm transition-all duration-200 hover:shadow-md disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:shadow-sm"
:class="[
isDarkMode
? 'bg-emerald-900/20 text-emerald-300 hover:bg-emerald-900/30'
@@ -541,7 +541,7 @@
</button>
<button
type="button"
class="inline-flex items-center rounded-md px-3 py-1.5 transition-colors duration-200"
class="inline-flex items-center rounded-[30px] px-3 py-1.5 shadow-sm transition-all duration-200 hover:shadow-md"
:class="[
isDarkMode
? 'bg-blue-900/20 text-blue-300 hover:bg-blue-900/30'
@@ -554,7 +554,7 @@
</button>
<button
type="button"
class="inline-flex items-center rounded-md px-3 py-1.5 transition-colors duration-200"
class="inline-flex items-center rounded-[30px] px-3 py-1.5 shadow-sm transition-all duration-200 hover:shadow-md"
:class="[
isDarkMode
? 'bg-red-900/20 text-red-300 hover:bg-red-900/30'