feat: 样式升级

This commit is contained in:
2026-03-16 23:54:01 +08:00
parent 110fe62404
commit 4a5fdd3961
42 changed files with 1931 additions and 1404 deletions

View File

@@ -337,14 +337,14 @@ onBeforeUnmount(() => {
/* 空状态 */
.empty-voices {
padding: 40px 24px;
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
border: 1px dashed #e2e8f0;
border-radius: 16px;
padding: var(--space-10) var(--space-6);
background: var(--muted);
border: 1px dashed var(--border);
border-radius: var(--radius-lg);
text-align: center;
.empty-icon {
margin-bottom: 12px;
margin-bottom: var(--space-3);
}
}
@@ -352,7 +352,7 @@ onBeforeUnmount(() => {
.voice-selector-wrapper {
display: flex;
flex-direction: column;
gap: 16px;
gap: var(--space-4);
}
/* 标题栏 */
@@ -360,49 +360,49 @@ onBeforeUnmount(() => {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 12px;
border-bottom: 1px solid #f1f5f9;
padding-bottom: var(--space-3);
border-bottom: 1px solid var(--border);
}
.header-left {
display: flex;
align-items: center;
gap: 10px;
gap: var(--space-2-5);
}
.header-title {
font-size: 15px;
font-size: var(--font-size-md);
font-weight: 600;
color: #1e293b;
color: var(--foreground);
}
.voice-count {
font-size: 12px;
color: #94a3b8;
background: #f1f5f9;
padding: 2px 8px;
border-radius: 10px;
font-size: var(--font-size-xs);
color: var(--muted-foreground);
background: var(--muted);
padding: var(--space-0-5) var(--space-2);
border-radius: var(--radius);
}
.synthesize-btn {
height: 34px;
padding: 0 14px;
border-radius: 8px;
padding: 0 var(--space-3-5);
border-radius: var(--radius);
border: none;
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
color: white;
background: var(--primary);
color: var(--primary-foreground);
font-weight: 500;
font-size: 13px;
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
transition: all 0.2s ease;
font-size: var(--font-size-sm);
box-shadow: var(--shadow-sm);
transition: all var(--duration-fast);
&:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
box-shadow: var(--shadow-md);
}
&:disabled {
background: #94a3b8;
background: var(--muted-foreground);
box-shadow: none;
cursor: not-allowed;
transform: none;
@@ -437,25 +437,25 @@ onBeforeUnmount(() => {
/* 音色卡片 */
.voice-card {
position: relative;
background: white;
border: 2px solid #f1f5f9;
border-radius: 14px;
padding: 16px 12px;
background: var(--card);
border: 2px solid var(--muted);
border-radius: var(--radius-lg);
padding: var(--space-4) var(--space-3);
cursor: pointer;
transition: all 0.25s ease;
transition: all var(--duration-base);
overflow: hidden;
text-align: left;
&:hover {
border-color: #e2e8f0;
border-color: var(--border);
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
box-shadow: var(--shadow-lg);
}
&.selected {
border-color: #3b82f6;
background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
border-color: var(--primary);
background: oklch(from var(--primary) l c h / 0.1);
box-shadow: var(--shadow-md);
}
}
@@ -464,17 +464,17 @@ onBeforeUnmount(() => {
position: relative;
width: 48px;
height: 48px;
margin: 0 auto 10px;
margin: 0 auto var(--space-2-5);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
.avatar-ring {
background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
background: oklch(from var(--primary) l c h / 0.2);
}
.avatar-icon {
color: #3b82f6;
color: var(--primary);
}
}
@@ -500,15 +500,15 @@ onBeforeUnmount(() => {
right: -4px;
width: 20px;
height: 20px;
background: #3b82f6;
background: var(--primary);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 10px;
box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
animation: scaleIn 0.2s ease;
color: var(--primary-foreground);
font-size: var(--font-size-xs);
box-shadow: var(--shadow-sm);
animation: scaleIn var(--duration-fast);
}
@keyframes scaleIn {
@@ -526,18 +526,18 @@ onBeforeUnmount(() => {
}
.voice-name {
font-size: 13px;
font-size: var(--font-size-sm);
font-weight: 600;
color: #1e293b;
margin-bottom: 4px;
color: var(--foreground);
margin-bottom: var(--space-1);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.voice-desc {
font-size: 11px;
color: #94a3b8;
font-size: var(--font-size-xs);
color: var(--muted-foreground);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -545,29 +545,29 @@ onBeforeUnmount(() => {
/* 播放器区域 */
.player-section {
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
border-radius: 14px;
padding: 14px;
border: 1px solid #e2e8f0;
background: var(--muted);
border-radius: var(--radius-lg);
padding: var(--space-3-5);
border: 1px solid var(--border);
}
.player-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
margin-bottom: var(--space-3);
}
.player-info {
display: flex;
align-items: center;
gap: 10px;
gap: var(--space-2-5);
}
.player-icon {
width: 36px;
height: 36px;
color: #3b82f6;
color: var(--primary);
display: flex;
align-items: center;
justify-content: center;
@@ -575,49 +575,49 @@ onBeforeUnmount(() => {
.player-meta {
.player-title {
font-size: 14px;
font-size: var(--font-size-base);
font-weight: 600;
color: #1e293b;
color: var(--foreground);
}
.player-label {
font-size: 11px;
color: #94a3b8;
font-size: var(--font-size-xs);
color: var(--muted-foreground);
}
}
.download-btn {
color: #64748b;
font-size: 12px;
padding: 4px 10px;
color: var(--muted-foreground);
font-size: var(--font-size-xs);
padding: var(--space-1) var(--space-2-5);
height: auto;
border-radius: 6px;
transition: all 0.2s ease;
border-radius: var(--radius-sm);
transition: all var(--duration-fast);
&:hover {
color: #3b82f6;
background: rgba(59, 130, 246, 0.08);
color: var(--primary);
background: oklch(from var(--primary) l c h / 0.08);
}
}
.aplayer-container {
:deep(.aplayer) {
border-radius: 10px;
border-radius: var(--radius);
box-shadow: none;
border: 1px solid rgba(0, 0, 0, 0.04);
border: 1px solid var(--border);
.aplayer-body {
border-radius: 10px;
border-radius: var(--radius);
}
}
}
/* 动画 */
.slide-fade-enter-active {
transition: all 0.3s ease-out;
transition: all var(--duration-base) ease-out;
}
.slide-fade-leave-active {
transition: all 0.2s ease-in;
transition: all var(--duration-fast) ease-in;
}
.slide-fade-enter-from {