- workbench 快捷入口「操作日志/登录日志」指向不存在的 /system/log/*, 按后端菜单真实路由改为 /log/operation 与 /log/login - 6 个页面(admin/role/menu/community/listing/push)Drawer 重构误用 内部包路径 @vben-core/popup-ui(app 未直接依赖),改从 @vben/common-ui 导入 useVbenDrawer 并合并同源 import - 清理未使用变量:push 页 ref、preferences.vue loadLocaleMessages、 user-dropdown.vue ref - preferences 默认配置补缺失字段 languageToggleButtonPosition:'none' - menu 页 submit 改三元、log 页嵌套三元抽 methodTheme 辅助函数 - vue-tsc 与全部 lint 钩子通过
205 lines
5.3 KiB
CSS
205 lines
5.3 KiB
CSS
/**
|
||
* 全局主题美化
|
||
* 设计语言:跟随系统主题色(可在偏好设置中切换主题色);柔和圆角;轻投影;有纵深的浅色背景。
|
||
* 说明:Vben 的 useTDesignDesignTokens 会用 JS 根据主题色动态把 --td-* 品牌色写到
|
||
* documentElement 上,因此这里不再用固定色值覆盖品牌色,改为引用 --primary
|
||
* 变量,保证切换主题色时整个系统颜色同步变化。
|
||
*/
|
||
|
||
:root {
|
||
/* —— 品牌主色:跟随系统主题色(--primary),支持在系统内切换 —— */
|
||
--td-brand-color: var(--primary);
|
||
--td-brand-color-hover: var(--primary-600);
|
||
--td-brand-color-active: var(--primary-700);
|
||
--td-brand-color-disabled: var(--primary-200);
|
||
--td-brand-color-light: var(--primary-50);
|
||
--td-brand-color-light-hover: var(--primary-100);
|
||
--td-brand-color-light-active: var(--primary-200);
|
||
|
||
/* —— 圆角:更现代、更柔 —— */
|
||
--td-radius-small: 6px !important;
|
||
--td-radius-medium: 10px !important;
|
||
--td-radius-large: 14px !important;
|
||
--td-radius-round: 999px !important;
|
||
--td-radius-circle: 50% !important;
|
||
|
||
/* —— 投影:更轻、更有层次 —— */
|
||
--td-shadow-1: 0 1px 2px rgb(16 24 40 / 4%),
|
||
0 1px 3px rgb(16 24 40 / 6%) !important;
|
||
--td-shadow-2: 0 2px 4px rgb(16 24 40 / 4%),
|
||
0 8px 24px rgb(16 24 40 / 6%) !important;
|
||
--td-shadow-3: 0 4px 8px rgb(16 24 40 / 5%),
|
||
0 16px 40px rgb(16 24 40 / 8%) !important;
|
||
|
||
/* —— 边框:更淡 —— */
|
||
--td-component-stroke: #eef0f5 !important;
|
||
--td-border-level-1-color: #eef0f5 !important;
|
||
--td-bg-color-page: #f5f7fb !important;
|
||
}
|
||
|
||
/* 页面整体:不再纯白,带极淡的冷色纵深 */
|
||
html {
|
||
font-family: 'PingFang SC', 'Microsoft YaHei', 'Source Han Sans SC',
|
||
'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
||
Helvetica, Arial, sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
text-rendering: optimizelegibility;
|
||
}
|
||
|
||
body {
|
||
background-color: #f5f7fb;
|
||
background-image: radial-gradient(
|
||
1200px 600px at 100% -10%,
|
||
color-mix(in srgb, var(--primary) 8%, transparent),
|
||
transparent 60%
|
||
),
|
||
radial-gradient(
|
||
900px 500px at -10% 110%,
|
||
color-mix(in srgb, var(--primary) 7%, transparent),
|
||
transparent 55%
|
||
);
|
||
background-attachment: fixed;
|
||
}
|
||
|
||
/* 内容区卡片化:让所有 TDesign 卡片更精致 */
|
||
.t-card {
|
||
overflow: hidden;
|
||
border-color: var(--td-border-level-1-color);
|
||
border-radius: var(--td-radius-large);
|
||
box-shadow: var(--td-shadow-2);
|
||
}
|
||
|
||
.t-card__header {
|
||
padding: 16px 20px;
|
||
border-bottom: 1px solid var(--td-border-level-1-color);
|
||
}
|
||
|
||
.t-card__title {
|
||
font-size: 15px;
|
||
font-weight: 600;
|
||
color: #1d2129;
|
||
}
|
||
|
||
.t-card__body {
|
||
padding: 16px 20px;
|
||
}
|
||
|
||
/* 表格更透气 */
|
||
.t-table {
|
||
--td-table-bg-color: transparent;
|
||
}
|
||
|
||
.t-table__header th {
|
||
font-weight: 600;
|
||
color: #4e5969;
|
||
background-color: #fafbff !important;
|
||
}
|
||
|
||
/* 主按钮:带品牌渐变,更出彩(跟随主题色) */
|
||
.t-button--theme-primary:not(.t-button--variant-outline):not(
|
||
.t-button--variant-text
|
||
):not(.t-button--variant-dashed) {
|
||
background: linear-gradient(
|
||
135deg,
|
||
var(--primary) 0%,
|
||
var(--primary-700) 100%
|
||
);
|
||
border: none;
|
||
box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 28%, transparent);
|
||
transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
|
||
}
|
||
|
||
.t-button--theme-primary:not(.t-button--variant-outline):not(
|
||
.t-button--variant-text
|
||
):not(.t-button--variant-dashed):hover {
|
||
box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 36%, transparent);
|
||
filter: brightness(1.05);
|
||
transform: translateY(-1px);
|
||
}
|
||
|
||
.t-button--theme-primary:not(.t-button--variant-outline):not(
|
||
.t-button--variant-text
|
||
):not(.t-button--variant-dashed):active {
|
||
transform: translateY(0);
|
||
}
|
||
|
||
/* 滚动条:纤细、克制 */
|
||
::-webkit-scrollbar {
|
||
width: 8px;
|
||
height: 8px;
|
||
}
|
||
|
||
::-webkit-scrollbar-thumb {
|
||
background: rgb(29 33 41 / 18%);
|
||
border-radius: 999px;
|
||
}
|
||
|
||
::-webkit-scrollbar-thumb:hover {
|
||
background: rgb(29 33 41 / 30%);
|
||
}
|
||
|
||
::-webkit-scrollbar-track {
|
||
background: transparent;
|
||
}
|
||
|
||
/* 暗色模式:收敛背景纵深,保持卡片质感 */
|
||
html[theme-mode='dark'] body {
|
||
background-color: #16171a;
|
||
background-image: radial-gradient(
|
||
1200px 600px at 100% -10%,
|
||
color-mix(in srgb, var(--primary) 14%, transparent),
|
||
transparent 60%
|
||
),
|
||
radial-gradient(
|
||
900px 500px at -10% 110%,
|
||
color-mix(in srgb, var(--primary) 12%, transparent),
|
||
transparent 55%
|
||
);
|
||
}
|
||
|
||
html[theme-mode='dark'] .t-card {
|
||
border-color: rgb(255 255 255 / 8%);
|
||
}
|
||
|
||
html[theme-mode='dark'] .t-card__header {
|
||
border-bottom-color: rgb(255 255 255 / 8%);
|
||
}
|
||
|
||
html[theme-mode='dark'] .t-table__header th {
|
||
background-color: rgb(255 255 255 / 4%) !important;
|
||
}
|
||
|
||
/* —— 业务页统一:页面标题 + 筛选/表格卡片 —— */
|
||
.wb-page-head {
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.wb-page-title {
|
||
margin: 0;
|
||
font-size: 18px;
|
||
font-weight: 600;
|
||
color: #1d2129;
|
||
}
|
||
|
||
.wb-page-sub {
|
||
margin: 4px 0 0;
|
||
font-size: 13px;
|
||
color: #86909c;
|
||
}
|
||
|
||
.wb-filter-card {
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.wb-filter-card .t-card__body {
|
||
padding: 16px 20px;
|
||
}
|
||
|
||
html[theme-mode='dark'] .wb-page-title {
|
||
color: rgb(255 255 255 / 90%);
|
||
}
|
||
|
||
html[theme-mode='dark'] .wb-page-sub {
|
||
color: rgb(255 255 255 / 50%);
|
||
}
|