diff --git a/src/components/AppLayout/AppLayout.vue b/src/components/AppLayout/AppLayout.vue index 56a3681..4e06020 100644 --- a/src/components/AppLayout/AppLayout.vue +++ b/src/components/AppLayout/AppLayout.vue @@ -356,7 +356,7 @@ onMounted(loadBadges) .rr-layout { display: flex; height: 100vh; - background: var(--rr-page-bg, #F1F5F9); + background: var(--bg-soft); transition: background 0.3s; &.collapsed .rr-sidebar { width: 64px; } } @@ -457,7 +457,7 @@ onMounted(loadBadges) transition: all 0.12s; white-space: nowrap; - &:hover { background: var(--rr-page-bg, #F1F5F9); color: var(--ink); } + &:hover { background: var(--bg-soft); color: var(--ink); } &.active { background: var(--brand-soft); color: var(--brand); @@ -475,7 +475,7 @@ onMounted(loadBadges) font-weight: 600; padding: 1px 7px; border-radius: 10px; - background: var(--rr-page-bg, #F1F5F9); + background: var(--bg-soft); color: var(--ink-3); .rr-sidebar-item.active & { background: rgba(255,255,255,0.18); color: var(--brand); } @@ -501,7 +501,7 @@ onMounted(loadBadges) margin-bottom: 1px; white-space: nowrap; - &:hover { background: var(--rr-page-bg, #F1F5F9); color: var(--ink); } + &:hover { background: var(--bg-soft); color: var(--ink); } &.active { background: var(--brand-soft); color: var(--brand); @@ -602,7 +602,7 @@ onMounted(loadBadges) justify-content: center; cursor: pointer; color: var(--ink-2); - &:hover { background: var(--rr-page-bg, #F1F5F9); color: var(--brand); } + &:hover { background: var(--bg-soft); color: var(--brand); } } .rr-topbar-breadcrumb { font-size: 13px; } @@ -627,7 +627,7 @@ onMounted(loadBadges) padding: 4px 8px; border-radius: 16px; cursor: pointer; - &:hover { background: var(--rr-page-bg, #F1F5F9); } + &:hover { background: var(--bg-soft); } } .rr-topbar-avatar { width: 26px; @@ -652,7 +652,7 @@ onMounted(loadBadges) flex: 1; overflow: auto; padding: 24px 28px; - background: var(--rr-page-bg, #F1F5F9); + background: var(--bg-soft); } /* ===== W5.x v2 Design Language 新增样式 ===== */ @@ -662,7 +662,7 @@ onMounted(loadBadges) width: 28px; height: 28px; border-radius: 6px; - background: var(--rr-page-bg, #F1F5F9); + background: var(--bg-soft); display: flex; align-items: center; justify-content: center; @@ -691,7 +691,7 @@ img.rr-sidebar-logo { transition: all 0.2s var(--ease); } .rr-topbar-notification:hover { - background: var(--rr-page-bg, #F1F5F9); + background: var(--bg-soft); color: var(--brand); } .rr-topbar-notification-icon { @@ -733,7 +733,7 @@ img.rr-sidebar-logo { width: 28px; height: 28px; border-radius: 6px; - background: var(--rr-page-bg, #F1F5F9); + background: var(--bg-soft); display: flex; align-items: center; justify-content: center; @@ -762,7 +762,7 @@ img.rr-sidebar-logo { transition: all 0.2s var(--ease); } .rr-topbar-notification:hover { - background: var(--rr-page-bg, #F1F5F9); + background: var(--bg-soft); color: var(--brand); } .rr-topbar-notification-icon { diff --git a/src/components/DataTable/DataTable.vue b/src/components/DataTable/DataTable.vue index b1ba1a0..e79bd2d 100644 --- a/src/components/DataTable/DataTable.vue +++ b/src/components/DataTable/DataTable.vue @@ -143,12 +143,12 @@ watch(() => props.columns, () => autoFillTable(), { flush: 'post' }) row-class-name="rr-clickable-row" :header-row-style="{ height: '48px' }" :header-cell-style="{ - background: 'var(--rr-table-header-bg, #F8FAFC)', - color: 'var(--rr-text-secondary, #64748B)', + background: 'var(--surface-2)', + color: 'var(--ink-3)', fontWeight: '600', fontSize: '12px', padding: '14px 16px', - borderBottom: '1px solid var(--rr-border-color, #E2E8F0)', + borderBottom: '1px solid var(--border)', textTransform: 'uppercase', letterSpacing: '0.04em', whiteSpace: 'nowrap', @@ -157,8 +157,8 @@ watch(() => props.columns, () => autoFillTable(), { flush: 'post' }) }" :cell-style="{ padding: '10px 16px', - borderBottom: '1px solid var(--rr-border-color, #E2E8F0)', - color: 'var(--rr-text-secondary, #334155)', + borderBottom: '1px solid var(--border)', + color: 'var(--ink-2)', fontSize: '13px', textAlign: 'left', verticalAlign: 'middle' @@ -228,8 +228,8 @@ watch(() => props.columns, () => autoFillTable(), { flush: 'post' }) \ No newline at end of file diff --git a/src/modules/openapi/ApplyApiKeyDialog.vue b/src/modules/openapi/ApplyApiKeyDialog.vue index c6c3f57..8b24c8c 100644 --- a/src/modules/openapi/ApplyApiKeyDialog.vue +++ b/src/modules/openapi/ApplyApiKeyDialog.vue @@ -231,7 +231,7 @@ function notifyContact() { :loading="loadingCustomers" :row-style="{ height: '36px' }" :cell-style="{ padding: '4px 8px', fontSize: '12.5px' }" - :header-cell-style="{ padding: '6px 8px', fontSize: '12px', height: '32px', background: '#F8FAFC' }" + :header-cell-style="{ padding: '6px 8px', fontSize: '12px', height: '32px', background: 'var(--surface-2)' }" @selection-change="onSelectionChange" > diff --git a/src/modules/openapi/OpenAppListView.vue b/src/modules/openapi/OpenAppListView.vue index e9a4ce2..a3eedbe 100644 --- a/src/modules/openapi/OpenAppListView.vue +++ b/src/modules/openapi/OpenAppListView.vue @@ -580,10 +580,10 @@ onMounted(() => { load(); loadCustomers() }) font-size: 11.5px; font-weight: 500; line-height: 17.25px; height: 21.25px; box-sizing: border-box; } -.rr-badge-0 { background: #FEF3C7; color: #D97706; } /* 待激活 amber */ -.rr-badge-1 { background: #D1FAE5; color: #059669; } /* 已激活 green */ -.rr-badge-2 { background: #DBEAFE; color: #2563EB; } /* 已撤销 blue */ -.rr-badge-3 { background: #E2E8F0; color: #64748B; } /* 已过期 gray */ +.rr-badge-0 { background: var(--amber-soft); color: var(--amber); } /* 待激活 amber */ +.rr-badge-1 { background: var(--green-soft); color: var(--green); } /* 已激活 green */ +.rr-badge-2 { background: var(--brand-soft); color: var(--brand); } /* 已撤销 blue */ +.rr-badge-3 { background: var(--surface-2); color: var(--ink-3); } /* 已过期 gray */ /* 危险文字按钮(撤销/删除 - 老 vue 用 style color: #ff4d4f) */ :deep(.rr-danger-text) { @@ -606,7 +606,7 @@ onMounted(() => { load(); loadCustomers() }) :deep(.el-input__inner), :deep(.el-select__wrapper) { border-radius: 8px !important; - background: #F8FAFC; + background: var(--surface-2); } /* 弹窗圆角 12px + 紧凑(套设计规范 §7.1 + §17 v3) */ diff --git a/src/modules/sys/LogErrorView.vue b/src/modules/sys/LogErrorView.vue index d0b2689..493c31f 100644 --- a/src/modules/sys/LogErrorView.vue +++ b/src/modules/sys/LogErrorView.vue @@ -211,10 +211,10 @@ onMounted(load) font-weight: 600; font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace; } -.rr-method-get { background: #DBEAFE; color: #2563EB; } -.rr-method-post { background: #D1FAE5; color: #059669; } -.rr-method-put { background: #FEF3C7; color: #D97706; } -.rr-method-delete { background: #FEE2E2; color: #DC2626; } +.rr-method-get { background: var(--brand-soft); color: var(--brand); } +.rr-method-post { background: var(--green-soft); color: var(--green); } +.rr-method-put { background: var(--amber-soft); color: var(--amber); } +.rr-method-delete { background: var(--red-soft); color: var(--red); } .rr-error-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; } .rr-detail-row { display: flex; flex-direction: column; gap: 4px; } .rr-detail-full { grid-column: 1 / -1; } diff --git a/src/modules/sys/LogOperationView.vue b/src/modules/sys/LogOperationView.vue index 78a16dc..c8179cd 100644 --- a/src/modules/sys/LogOperationView.vue +++ b/src/modules/sys/LogOperationView.vue @@ -189,8 +189,8 @@ onMounted(load) font-weight: 600; font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace; } -.rr-method-get { background: #DBEAFE; color: #2563EB; } -.rr-method-post { background: #D1FAE5; color: #059669; } -.rr-method-put { background: #FEF3C7; color: #D97706; } -.rr-method-delete { background: #FEE2E2; color: #DC2626; } +.rr-method-get { background: var(--brand-soft); color: var(--brand); } +.rr-method-post { background: var(--green-soft); color: var(--green); } +.rr-method-put { background: var(--amber-soft); color: var(--amber); } +.rr-method-delete { background: var(--red-soft); color: var(--red); } \ No newline at end of file diff --git a/src/theme/themes.scss b/src/theme/themes.scss index b8fc90f..db41e35 100644 --- a/src/theme/themes.scss +++ b/src/theme/themes.scss @@ -191,4 +191,17 @@ --el-color-primary-light-8: var(--brand-soft); --el-color-primary-light-9: var(--brand-soft); --el-color-primary-dark-2: var(--brand-hover); + + // W18 dark 主题适配:EP 内部 SCSS 常量重写 + // :root 块里 --el-color-white 解析为 var(--surface), 但解析时 surface 还未被 dark 块重写 + // 这里用 dark 主题的实际值硬编码, 不依赖 var() 链 + --el-color-white: #1E293B; /* surface */ + --el-color-black: #F8FAFC; /* ink */ + --el-fill-color-blank: #1E293B; /* surface */ + --el-fill-color-light: #0F172A; /* bg-soft (row hover) */ + --el-table-tr-bg-color: #1E293B; /* surface */ + --el-table-bg-color: #1E293B; /* surface */ + --el-table-expanded-cell-bg-color: #1E293B; + --el-table-header-bg-color: #283449; /* surface-2 (表头略亮区分) */ + --el-table-row-hover-bg-color: #0F172A; /* bg-soft */ } diff --git a/src/theme/tokens.scss b/src/theme/tokens.scss index cf1b074..a160d63 100644 --- a/src/theme/tokens.scss +++ b/src/theme/tokens.scss @@ -13,7 +13,7 @@ :root { // ===== 圆角(沿用 v1.3) ===== --radius-sm: 6px; - --radius: 6px; + --radius: 8px; --radius-lg: 10px; --radius-xl: 16px; --radius-pill: 9999px; @@ -120,4 +120,12 @@ // ===== v2 新增:主按钮渐变(从主题 brand 自动组合) ===== --brand-gradient: linear-gradient(135deg, var(--brand), var(--brand-2)); + + // ===== W18 暗主题适配:补齐 EP 缺失 token (dark 下表格背景/边框自适应) ===== + // EP 内部用 --el-color-white / black, 未重定向, dark 下仍是 #FFFFFF + --el-color-white: var(--surface); + --el-color-black: var(--ink); + // el-table 表格体/展开行背景 + --el-table-tr-bg-color: var(--surface); + --el-table-expanded-cell-bg-color: var(--surface); }