样式整改

This commit is contained in:
2026-02-25 23:44:01 +08:00
parent 8beb4a5508
commit 116e363e83
16 changed files with 660 additions and 720 deletions

View File

@@ -239,20 +239,12 @@ watch(() => props.visible, (val) => {
</script>
<style scoped lang="less">
@primary: #6366f1;
@primary-light: rgba(99, 102, 241, 0.1);
@surface: #ffffff;
@bg: #f8fafc;
@text: #1e293b;
@text-light: #64748b;
@text-muted: #94a3b8;
@border: #e2e8f0;
@radius: 12px;
// 使用设计系统变量
.history-panel {
position: absolute;
inset: 0;
background: @bg;
background: var(--color-bg-page);
z-index: 20;
display: flex;
flex-direction: column;
@@ -266,7 +258,7 @@ watch(() => props.visible, (val) => {
padding: 16px 20px;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(12px);
border-bottom: 1px solid @border;
border-bottom: 1px solid var(--color-gray-200);
}
.header-left {
@@ -278,45 +270,45 @@ watch(() => props.visible, (val) => {
.back-btn {
width: 32px;
height: 32px;
border-radius: 8px;
border-radius: var(--radius-sm);
border: none;
background: transparent;
color: @text-light;
color: var(--color-gray-600);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
transition: all var(--duration-fast);
&:hover {
background: #f1f5f9;
color: @text;
background: var(--color-gray-100);
color: var(--color-gray-900);
}
}
.header-title {
font-size: 15px;
font-weight: 600;
color: @text;
color: var(--color-gray-900);
margin: 0;
}
.close-btn {
width: 32px;
height: 32px;
border-radius: 8px;
border-radius: var(--radius-sm);
border: none;
background: transparent;
color: @text-light;
color: var(--color-gray-600);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
transition: all var(--duration-fast);
&:hover {
background: #fee2e2;
color: #ef4444;
background: var(--color-error-100);
color: var(--color-error-500);
}
}
@@ -348,7 +340,7 @@ watch(() => props.visible, (val) => {
position: absolute;
inset: 0;
border-radius: 50%;
border: 2px dashed @border;
border: 2px dashed var(--color-gray-300);
animation: ringRotate 20s linear infinite;
}
@@ -362,19 +354,19 @@ watch(() => props.visible, (val) => {
left: 50%;
transform: translate(-50%, -50%);
font-size: 32px;
color: @text-muted;
color: var(--color-gray-500);
}
.empty-text {
font-size: 15px;
font-weight: 500;
color: @text;
color: var(--color-gray-900);
margin: 0 0 6px;
}
.empty-hint {
font-size: 13px;
color: @text-muted;
color: var(--color-gray-500);
margin: 0;
}
@@ -400,7 +392,7 @@ watch(() => props.visible, (val) => {
.group-label {
font-size: 12px;
font-weight: 600;
color: @text-light;
color: var(--color-gray-600);
text-transform: uppercase;
letter-spacing: 0.5px;
}
@@ -408,8 +400,8 @@ watch(() => props.visible, (val) => {
.group-count {
font-size: 11px;
font-weight: 500;
color: @text-muted;
background: #f1f5f9;
color: var(--color-gray-500);
background: var(--color-gray-100);
padding: 2px 8px;
border-radius: 10px;
}
@@ -427,20 +419,20 @@ watch(() => props.visible, (val) => {
align-items: center;
justify-content: space-between;
padding: 14px 16px;
background: @surface;
border: 1px solid @border;
border-radius: @radius;
background: var(--color-bg-card);
border: 1px solid var(--color-gray-200);
border-radius: var(--radius-lg);
cursor: pointer;
transition: all 0.2s;
transition: all var(--duration-fast);
text-align: left;
&:hover {
border-color: @primary;
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
border-color: var(--color-primary-500);
box-shadow: var(--shadow-primary);
transform: translateY(-1px);
.meta-arrow {
color: @primary;
color: var(--color-primary-500);
transform: translateX(2px);
}
}
@@ -454,7 +446,7 @@ watch(() => props.visible, (val) => {
.card-title {
font-size: 14px;
font-weight: 600;
color: @text;
color: var(--color-gray-900);
margin: 0 0 4px;
overflow: hidden;
text-overflow: ellipsis;
@@ -463,7 +455,7 @@ watch(() => props.visible, (val) => {
.card-preview {
font-size: 12px;
color: @text-muted;
color: var(--color-gray-500);
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
@@ -484,13 +476,13 @@ watch(() => props.visible, (val) => {
align-items: center;
gap: 4px;
font-size: 11px;
color: @text-muted;
color: var(--color-gray-500);
}
.meta-arrow {
font-size: 10px;
color: @text-muted;
transition: all 0.2s;
color: var(--color-gray-500);
transition: all var(--duration-fast);
}
// Message View
@@ -511,17 +503,17 @@ watch(() => props.visible, (val) => {
}
.message-bubble {
border-radius: @radius;
border-radius: var(--radius-lg);
overflow: hidden;
&--user {
background: linear-gradient(135deg, #f8fafc, #f1f5f9);
border: 1px solid @border;
background: linear-gradient(135deg, var(--color-bg-page), var(--color-gray-100));
border: 1px solid var(--color-gray-200);
}
&--ai {
background: linear-gradient(135deg, @primary-light, rgba(139, 92, 246, 0.08));
border: 1px solid rgba(99, 102, 241, 0.2);
background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.04));
border: 1px solid rgba(59, 130, 246, 0.2);
}
}
@@ -535,20 +527,20 @@ watch(() => props.visible, (val) => {
.bubble-avatar {
font-size: 14px;
color: @text-light;
color: var(--color-gray-600);
}
.bubble-label {
font-size: 11px;
font-weight: 600;
color: @text-light;
color: var(--color-gray-600);
text-transform: uppercase;
letter-spacing: 0.3px;
}
.bubble-time {
font-size: 10px;
color: @text-muted;
color: var(--color-gray-500);
margin-left: auto;
}
@@ -558,17 +550,17 @@ watch(() => props.visible, (val) => {
height: 24px;
border: none;
background: transparent;
color: @text-muted;
border-radius: 6px;
color: var(--color-gray-500);
border-radius: var(--radius-sm);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
transition: all var(--duration-fast);
&:hover {
background: rgba(99, 102, 241, 0.1);
color: @primary;
background: rgba(59, 130, 246, 0.1);
color: var(--color-primary-500);
}
}
@@ -577,7 +569,7 @@ watch(() => props.visible, (val) => {
padding: 12px 14px;
font-size: 13px;
line-height: 1.7;
color: @text;
color: var(--color-gray-900);
white-space: pre-wrap;
word-break: break-word;
}
@@ -585,7 +577,7 @@ watch(() => props.visible, (val) => {
// Transition
.history-slide-enter-active,
.history-slide-leave-active {
transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
transition: transform var(--duration-base) cubic-bezier(0.32, 0.72, 0, 1);
}
.history-slide-enter-from,