feat(web): 接入和信企业 Design System 并统一控制台主色
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b071c2a7a4
commit
ae67fefc80
9 files changed
+168
-17
No files matched your search
@@ -62,7 +62,8 @@ const crumbs = computed(() => {
|
||||
|
||||
const linkClass =
|
||||
"block rounded-md px-2.5 py-[7px] text-[var(--text-secondary)] no-underline hover:text-[var(--color-primary)]";
|
||||
const activeClass = "!bg-[#eef0fb] !font-semibold !text-[var(--color-primary)]";
|
||||
const activeClass =
|
||||
"!bg-[var(--color-primary-soft)] !font-semibold !text-[var(--color-primary)]";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -1,24 +1,56 @@
|
||||
/* Map Element Plus skin vars to web/design/tokens.css (standards://frontend/element-plus). */
|
||||
/**
|
||||
* apps/console/src/shared/styles/element-theme.css
|
||||
* 用途:把 web/design/tokens.css 映射到 Element Plus --el-*,并修正与 Tailwind 共存问题。
|
||||
* 依赖:tokens.css、element-plus/theme-chalk(含 dark/css-vars)。
|
||||
* 逻辑:styles.css 在 Tailwind 之后引入本文件;页面禁止再各自覆盖 --el-color-primary。
|
||||
*/
|
||||
:root,
|
||||
html.dark {
|
||||
--el-color-primary: var(--color-primary);
|
||||
--el-color-primary-light-3: #4da3d6;
|
||||
--el-color-primary-light-5: #81c2e3;
|
||||
--el-color-primary-light-7: #b4daf0;
|
||||
--el-color-primary-light-8: #cde6f4;
|
||||
--el-color-primary-light-9: #e6f3fa;
|
||||
--el-color-primary-dark-2: #0269a0;
|
||||
|
||||
--el-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
|
||||
--el-font-size-extra-large: 20px;
|
||||
--el-font-size-large: 18px;
|
||||
--el-font-size-medium: 16px;
|
||||
--el-font-size-base: var(--font-size-base);
|
||||
--el-font-size-small: 13px;
|
||||
--el-font-size-extra-small: 12px;
|
||||
|
||||
--el-text-color-primary: var(--text-primary);
|
||||
--el-text-color-regular: var(--text-secondary);
|
||||
--el-text-color-secondary: var(--text-muted);
|
||||
--el-text-color-placeholder: var(--text-muted);
|
||||
--el-text-color-disabled: var(--text-muted);
|
||||
|
||||
--el-border-color: var(--border-default);
|
||||
--el-border-color-light: var(--border-subtle);
|
||||
--el-border-color-lighter: var(--border-subtle);
|
||||
|
||||
--el-bg-color: var(--bg-surface);
|
||||
--el-bg-color-overlay: var(--bg-surface);
|
||||
--el-fill-color-blank: var(--bg-surface);
|
||||
--el-fill-color-light: var(--bg-surface-soft);
|
||||
|
||||
--el-border-radius-base: var(--radius-control);
|
||||
--el-component-size: 32px;
|
||||
}
|
||||
|
||||
/* Tailwind preflight sets svg { display:block }; keep Element button icons inline. */
|
||||
/* Tailwind preflight 会把 svg 设成 block;保持 Element 按钮图标与文字同行。 */
|
||||
.el-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.el-button .el-icon,
|
||||
.el-button svg {
|
||||
display: inline-block;
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
+47
-8
@@ -1,12 +1,51 @@
|
||||
/**
|
||||
* web/design/tokens.css
|
||||
* 用途:Watchman 控制台 L1 Design Tokens(颜色、字阶、圆角);可执行真源。
|
||||
* 依赖:无;由 apps/console/src/styles.css 引入,再由 element-theme.css 映射到 --el-*。
|
||||
* 逻辑:对齐 D:\FDE\SP\design-system\DESIGN.md(和信企业默认皮肤);换肤只改本文件。
|
||||
* 决策:主色 #0284c7 见 docs/decisions.md D41(覆盖公司 visual-ux 文档基线紫蓝)。
|
||||
*/
|
||||
:root {
|
||||
--color-primary: #5e6ad2;
|
||||
--text-primary: #1f2328;
|
||||
--text-secondary: #59636e;
|
||||
--text-muted: #8b949e;
|
||||
/* Surfaces */
|
||||
--bg-page: #f8fafc;
|
||||
--bg-surface: #ffffff;
|
||||
--bg-surface-soft: #f6f8fa;
|
||||
--border-default: #d0d7de;
|
||||
--border-subtle: #eaeef2;
|
||||
--bg-surface-soft: #f8fafc;
|
||||
--bg-surface-strong: #f1f5f9;
|
||||
|
||||
/* Brand */
|
||||
--color-primary: #0284c7;
|
||||
--color-primary-soft: #e0f2fe;
|
||||
|
||||
/* Text */
|
||||
--text-primary: #0f172a;
|
||||
--text-secondary: #334155;
|
||||
--text-muted: #64748b;
|
||||
|
||||
/* Borders */
|
||||
--border-default: #e2e8f0;
|
||||
--border-subtle: #f1f5f9;
|
||||
|
||||
/* Radius & type */
|
||||
--radius-control: 8px;
|
||||
--font-size-base: 13.5px;
|
||||
--radius-surface: 16px;
|
||||
--font-size-base: 14px;
|
||||
}
|
||||
|
||||
html.dark {
|
||||
color-scheme: dark;
|
||||
|
||||
--bg-page: #020617;
|
||||
--bg-surface: #0b1220;
|
||||
--bg-surface-soft: #0f172a;
|
||||
--bg-surface-strong: #1e293b;
|
||||
|
||||
--color-primary: #38bdf8;
|
||||
--color-primary-soft: rgba(14, 165, 233, 0.18);
|
||||
|
||||
--text-primary: #f8fafc;
|
||||
--text-secondary: #cbd5e1;
|
||||
--text-muted: #94a3b8;
|
||||
|
||||
--border-default: #334155;
|
||||
--border-subtle: #1e293b;
|
||||
}
|
||||
Reference in new issue
Block a user