feat: 双主题系统 — 编辑风 + 极简亮色
前端: - 新增 Pinia theme store,localStorage 持久化,data-theme 切换 - App.vue: :root 新增 --font-*/--sidebar-* CSS 变量;新增 :root[data-theme=light] 完整配色(极简黑白金 + Noto Sans SC) - DesktopLayout: 侧边栏 15 个变量化 + 顶栏主题切换按钮 - MobileLayout: 装饰色变量化 - Settings: 新增「界面主题」卡片 - 21 个组件 font-family 统一替换为 var(--font-*) - 新增 utils/managerColor.ts — 12 色调色板 + 自适应文字色 + 后端自定义色优先 - WorkPlans/MiniBusiness/KeyVisits/CustomerManage: 客户经理标签色统一走共享工具 - UserManage: 编辑弹窗新增颜色选择器(仅 manager) - LightBoard: 去标题星标图标 - ManagerWorkspace/WorkPlans/MiniBusiness/KeyVisits: 删除按钮改为实心红底白字 后端: - User 模型新增 color 列 + lifespan 自动迁移 - users API 支持 color 字段读写 - UserOut schema 新增 color Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+118
-10
@@ -67,6 +67,114 @@ const isMobile = computed(() => {
|
||||
--radius-sm: 2px;
|
||||
--radius-xs: 2px;
|
||||
--transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
|
||||
/* ── Sidebar — dark editorial ── */
|
||||
--sidebar-bg: var(--ink);
|
||||
--sidebar-color: #fff;
|
||||
--sidebar-accent: var(--gold);
|
||||
--sidebar-nav-text: rgba(255,255,255,0.55);
|
||||
--sidebar-nav-text-hover: rgba(255,255,255,0.85);
|
||||
--sidebar-nav-text-active: #fff;
|
||||
--sidebar-nav-bg-hover: rgba(255,255,255,0.04);
|
||||
--sidebar-nav-bg-active: rgba(255,255,255,0.06);
|
||||
--sidebar-nav-border-active: var(--gold);
|
||||
--sidebar-divider: rgba(255,255,255,0.06);
|
||||
--sidebar-brand-color: #fff;
|
||||
--sidebar-brand-sub-color: rgba(255,255,255,0.4);
|
||||
--sidebar-group-label-color: rgba(255,255,255,0.25);
|
||||
--sidebar-footer-role-color: var(--gold);
|
||||
--sidebar-footer-name-color: rgba(255,255,255,0.7);
|
||||
|
||||
/* ── Mobile page accent ── */
|
||||
--page-accent-color: rgba(196,147,74,0.06);
|
||||
|
||||
/* ── Manager chip tags ── */
|
||||
--mgr-chip-text: #fff;
|
||||
|
||||
/* ── Fonts — editorial Chinese ── */
|
||||
--font-body: 'Noto Serif SC', STSong, Songti SC, '宋体', serif;
|
||||
--font-heading: 'ZCOOL XiaoWei', STSong, Songti SC, serif;
|
||||
--font-mono: 'JetBrains Mono', 'SF Mono', monospace;
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════
|
||||
THEME: Light — 极简功能主义 / Brutally Minimal
|
||||
═══════════════════════════════════════════════════════════ */
|
||||
|
||||
:root[data-theme="light"] {
|
||||
/* ── Core palette ── */
|
||||
--ink: #1A1A1A;
|
||||
--ink-light: #3D3D3D;
|
||||
--ink-dark: #0A0A0A;
|
||||
--vermilion: #DC2626;
|
||||
--vermilion-light: #EF4444;
|
||||
--vermilion-dark: #B91C1C;
|
||||
--gold: #D4AF37;
|
||||
--gold-light: #E5C955;
|
||||
--gold-dark: #B8941F;
|
||||
--paper: #F5F5F5;
|
||||
--paper-dark: #EBEBEB;
|
||||
--surface: #FFFFFF;
|
||||
--sage: #16A34A;
|
||||
--amber: #D97706;
|
||||
--warm-gray: #666666;
|
||||
--warm-border: #DDDDDD;
|
||||
|
||||
/* ── Semantic tokens ── */
|
||||
--c-primary: var(--ink);
|
||||
--c-primary-light: var(--ink-light);
|
||||
--c-primary-bg: #F5F5F5;
|
||||
--c-accent: var(--vermilion);
|
||||
--c-accent-light: var(--vermilion-light);
|
||||
--c-gold: var(--gold);
|
||||
--c-success: var(--sage);
|
||||
--c-warning: var(--amber);
|
||||
--c-danger: var(--vermilion);
|
||||
--c-info: #2563EB;
|
||||
--c-text: #1A1A1A;
|
||||
--c-text-secondary: #666666;
|
||||
--c-text-muted: #999999;
|
||||
--c-bg: var(--paper);
|
||||
--c-bg-card: var(--surface);
|
||||
--c-border: var(--warm-border);
|
||||
|
||||
/* ── Effects ── */
|
||||
--shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
|
||||
--shadow: 0 1px 3px rgba(0,0,0,0.08);
|
||||
--shadow-md: 0 2px 6px rgba(0,0,0,0.10);
|
||||
--shadow-lg: 0 4px 12px rgba(0,0,0,0.12);
|
||||
--radius: 0px;
|
||||
--radius-sm: 0px;
|
||||
--radius-xs: 0px;
|
||||
--transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
|
||||
/* ── Sidebar — light minimal ── */
|
||||
--sidebar-bg: #FFFFFF;
|
||||
--sidebar-color: #1A1A1A;
|
||||
--sidebar-accent: var(--gold);
|
||||
--sidebar-nav-text: #777777;
|
||||
--sidebar-nav-text-hover: #1A1A1A;
|
||||
--sidebar-nav-text-active: #1A1A1A;
|
||||
--sidebar-nav-bg-hover: #F5F5F5;
|
||||
--sidebar-nav-bg-active: #F0F0F0;
|
||||
--sidebar-nav-border-active: var(--gold);
|
||||
--sidebar-divider: #EEEEEE;
|
||||
--sidebar-brand-color: #1A1A1A;
|
||||
--sidebar-brand-sub-color: #999999;
|
||||
--sidebar-group-label-color: #AAAAAA;
|
||||
--sidebar-footer-role-color: var(--gold);
|
||||
--sidebar-footer-name-color: #777777;
|
||||
|
||||
/* ── Mobile page accent ── */
|
||||
--page-accent-color: rgba(212,175,55,0.04);
|
||||
|
||||
/* ── Manager chip tags ── */
|
||||
--mgr-chip-text: #1A1A1A;
|
||||
|
||||
/* ── Fonts — sans-serif minimal ── */
|
||||
--font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||
--font-heading: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||
--font-mono: 'JetBrains Mono', monospace;
|
||||
}
|
||||
|
||||
/* ── Reset & Base ── */
|
||||
@@ -76,7 +184,7 @@ html, body, #app {
|
||||
margin: 0; padding: 0; height: 100%;
|
||||
overflow-x: hidden;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
font-family: 'Noto Serif SC', STSong, Songti SC, '宋体', serif;
|
||||
font-family: var(--font-body);
|
||||
font-size: 15px;
|
||||
line-height: 1.7;
|
||||
color: var(--c-text);
|
||||
@@ -87,7 +195,7 @@ html, body, #app {
|
||||
|
||||
/* ── Editorial heading style ── */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: 'ZCOOL XiaoWei', STSong, Songti SC, serif;
|
||||
font-family: var(--font-heading);
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
@@ -107,7 +215,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||
.el-card__header {
|
||||
border-bottom: 2px solid var(--gold) !important;
|
||||
padding: 16px 20px !important;
|
||||
font-family: 'ZCOOL XiaoWei', STSong, serif;
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
color: var(--ink);
|
||||
@@ -121,7 +229,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.02em;
|
||||
transition: all var(--transition);
|
||||
font-family: 'Noto Serif SC', STSong, Songti SC, serif;
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
.el-button--primary {
|
||||
background: var(--ink) !important;
|
||||
@@ -149,14 +257,14 @@ h1, h2, h3, h4, h5, h6 {
|
||||
.el-tag {
|
||||
border-radius: 2px !important;
|
||||
font-weight: 500;
|
||||
font-family: 'Noto Serif SC', STSong, serif;
|
||||
font-family: var(--font-body);
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
/* ── Tabs ── */
|
||||
.el-tabs__item {
|
||||
font-weight: 500;
|
||||
font-family: 'ZCOOL XiaoWei', STSong, serif;
|
||||
font-family: var(--font-heading);
|
||||
}
|
||||
.el-tabs__active-bar { background: var(--gold) !important; }
|
||||
.el-tabs__item.is-active { color: var(--ink) !important; }
|
||||
@@ -167,7 +275,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||
color: var(--ink);
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
font-family: 'ZCOOL XiaoWei', STSong, serif;
|
||||
font-family: var(--font-heading);
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
|
||||
@@ -184,7 +292,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||
.el-dialog__header {
|
||||
padding: 20px 24px 0 !important;
|
||||
font-weight: 600;
|
||||
font-family: 'ZCOOL XiaoWei', STSong, serif;
|
||||
font-family: var(--font-heading);
|
||||
}
|
||||
.el-dialog__body { padding: 20px 24px !important; }
|
||||
|
||||
@@ -225,7 +333,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||
/* ── Textarea ── */
|
||||
.el-textarea__inner {
|
||||
border-radius: 2px !important;
|
||||
font-family: 'Noto Serif SC', STSong, serif;
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
/* ── Radio ── */
|
||||
@@ -258,7 +366,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||
|
||||
/* ── Divider ── */
|
||||
.el-divider__text {
|
||||
font-family: 'ZCOOL XiaoWei', STSong, serif;
|
||||
font-family: var(--font-heading);
|
||||
color: var(--warm-gray);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user