style: 全局 UI 主题皮肤重构与样式模块化
引入 Element Plus 主题定制和主题皮肤 composable,将全局 样式拆分为组件级独立 CSS 文件(侧边栏、顶栏、工作台等), 统一色彩变量和间距规范,重构所有视图和组件样式以适配新 主题系统,优化图表和知识图谱组件视觉表现,提取审计和差 旅报销相关子组件。
This commit is contained in:
131
web/src/assets/styles/element-plus-theme.css
Normal file
131
web/src/assets/styles/element-plus-theme.css
Normal file
@@ -0,0 +1,131 @@
|
||||
:root {
|
||||
--theme-primary: #3a7ca5;
|
||||
--theme-primary-hover: #2f6d95;
|
||||
--theme-primary-active: #255b7d;
|
||||
--theme-primary-soft: #eaf4fa;
|
||||
--theme-primary-soft-strong: #d4e8f3;
|
||||
--theme-primary-rgb: 58, 124, 165;
|
||||
--theme-focus-ring: rgba(58, 124, 165, 0.12);
|
||||
--el-color-primary: var(--theme-primary);
|
||||
--el-color-primary-light-3: var(--theme-primary-hover);
|
||||
--el-color-primary-light-5: var(--theme-primary-light-5);
|
||||
--el-color-primary-light-7: var(--theme-primary-soft-strong);
|
||||
--el-color-primary-light-8: var(--theme-primary-soft);
|
||||
--el-color-primary-light-9: var(--theme-primary-light-9);
|
||||
--el-color-primary-dark-2: var(--theme-primary-active);
|
||||
--el-color-success: var(--success);
|
||||
--el-color-success-light-9: var(--success-soft);
|
||||
--el-color-warning: var(--warning);
|
||||
--el-color-warning-light-9: var(--warning-soft);
|
||||
--el-color-danger: var(--danger);
|
||||
--el-color-danger-light-9: var(--danger-soft);
|
||||
--el-color-info: var(--info);
|
||||
--el-border-radius-base: 4px;
|
||||
--el-border-radius-small: 3px;
|
||||
--el-border-radius-round: 4px;
|
||||
--el-border-color: var(--line-strong);
|
||||
--el-border-color-light: var(--line);
|
||||
--el-border-color-lighter: #edf2f7;
|
||||
--el-fill-color-light: var(--bg);
|
||||
--el-fill-color-lighter: var(--surface-soft);
|
||||
--el-fill-color-blank: var(--surface);
|
||||
--el-text-color-primary: var(--ink);
|
||||
--el-text-color-regular: var(--text);
|
||||
--el-text-color-secondary: var(--muted);
|
||||
--el-font-family: Inter, "SF Pro Text", "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
|
||||
--el-font-size-base: 14px;
|
||||
--el-box-shadow-light: 0 8px 22px rgba(15, 23, 42, 0.08);
|
||||
--el-box-shadow-lighter: 0 4px 14px rgba(15, 23, 42, 0.06);
|
||||
--el-transition-duration: 180ms;
|
||||
--el-transition-function-ease-in-out-bezier: cubic-bezier(0.2, 0, 0, 1);
|
||||
}
|
||||
|
||||
.el-button {
|
||||
font-weight: 600;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.el-button,
|
||||
.el-input__wrapper,
|
||||
.el-select__wrapper,
|
||||
.el-textarea__inner,
|
||||
.el-date-editor.el-input__wrapper,
|
||||
.el-popover.el-popper,
|
||||
.el-popper.is-light,
|
||||
.el-message-box,
|
||||
.el-dialog {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.el-input__wrapper,
|
||||
.el-select__wrapper {
|
||||
min-height: 34px;
|
||||
box-shadow: 0 0 0 1px var(--el-border-color) inset;
|
||||
transition:
|
||||
box-shadow 160ms var(--ease),
|
||||
background-color 160ms var(--ease),
|
||||
border-color 160ms var(--ease);
|
||||
}
|
||||
|
||||
.el-input__wrapper:hover,
|
||||
.el-select__wrapper:hover {
|
||||
box-shadow: 0 0 0 1px #b8c2d2 inset;
|
||||
}
|
||||
|
||||
.el-input__wrapper.is-focus,
|
||||
.el-select__wrapper.is-focused {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--el-color-primary) inset,
|
||||
0 0 0 3px var(--theme-focus-ring);
|
||||
}
|
||||
|
||||
.el-select-dropdown,
|
||||
.el-picker__popper,
|
||||
.el-dropdown__popper,
|
||||
.el-popover.el-popper {
|
||||
border: 1px solid rgba(148, 163, 184, 0.26);
|
||||
box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
|
||||
}
|
||||
|
||||
.el-select-dropdown__item {
|
||||
height: 34px;
|
||||
color: #334155;
|
||||
font-size: 13px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.el-select-dropdown__item.is-hovering {
|
||||
background: #f1f5f9;
|
||||
}
|
||||
|
||||
.el-select-dropdown__item.is-selected {
|
||||
background: var(--theme-primary-soft);
|
||||
color: var(--theme-primary-active);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.el-scrollbar__bar {
|
||||
opacity: 0.28;
|
||||
}
|
||||
|
||||
.el-overlay {
|
||||
background-color: rgba(15, 23, 42, 0.42);
|
||||
}
|
||||
|
||||
.el-dialog,
|
||||
.el-message-box {
|
||||
box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
|
||||
}
|
||||
|
||||
.el-table {
|
||||
--el-table-header-bg-color: #f8fafc;
|
||||
--el-table-header-text-color: #334155;
|
||||
--el-table-row-hover-bg-color: #f8fafc;
|
||||
color: #334155;
|
||||
}
|
||||
|
||||
.el-pagination {
|
||||
--el-pagination-button-bg-color: #ffffff;
|
||||
--el-pagination-hover-color: var(--theme-primary-active);
|
||||
font-weight: 600;
|
||||
}
|
||||
Reference in New Issue
Block a user