f1f8518985
feat(auth): 添加用户权限获取接口并完善JWT令牌角色信息 - 在JWT令牌中添加用户角色信息 - 新增get_my_permissions接口用于获取当前用户权限码列表 - 重构认证回调逻辑,增加错误日志记录 - 更新用户信息获取接口使用Authorization头验证 ```
825 lines
27 KiB
CSS
825 lines
27 KiB
CSS
/* ============================================================
|
|
H3C ONU 管理系统 — 全局主题
|
|
工业深色风格 · 深海蓝黑 + 青绿主调
|
|
============================================================ */
|
|
|
|
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');
|
|
|
|
:root {
|
|
/* ── 基础色板 ── */
|
|
--bg-base: #0a0e1a;
|
|
--bg-surface: #0f1525;
|
|
--bg-elevated: #141c30;
|
|
--bg-card: #18213a;
|
|
--bg-hover: #1e2a42;
|
|
--bg-active: #1a3050;
|
|
|
|
/* ── 边框 ── */
|
|
--border-subtle: rgba(255,255,255,0.05);
|
|
--border-default: rgba(255,255,255,0.10);
|
|
--border-strong: rgba(255,255,255,0.18);
|
|
--border-accent: rgba(0,210,180,0.35);
|
|
|
|
/* ── 主色调:青绿 ── */
|
|
--accent: #00d2b4;
|
|
--accent-dim: rgba(0,210,180,0.15);
|
|
--accent-glow: rgba(0,210,180,0.30);
|
|
--accent-dark: #009e88;
|
|
|
|
/* ── 状态色 ── */
|
|
--success: #22c55e;
|
|
--success-dim: rgba(34,197,94,0.15);
|
|
--danger: #ef4444;
|
|
--danger-dim: rgba(239,68,68,0.15);
|
|
--warning: #f59e0b;
|
|
--warning-dim: rgba(245,158,11,0.15);
|
|
--info: #3b82f6;
|
|
--info-dim: rgba(59,130,246,0.15);
|
|
|
|
/* ── 文字 ── */
|
|
--text-primary: #e8edf5;
|
|
--text-secondary: #8a9ab8;
|
|
--text-muted: #4a5a78;
|
|
--text-accent: #00d2b4;
|
|
|
|
/* ── 字体 ── */
|
|
--font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
--font-mono: 'JetBrains Mono', 'Consolas', monospace;
|
|
|
|
/* ── 圆角 ── */
|
|
--radius-sm: 4px;
|
|
--radius-md: 8px;
|
|
--radius-lg: 12px;
|
|
|
|
/* ── 阴影 ── */
|
|
--shadow-card: 0 4px 24px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);
|
|
--shadow-glow: 0 0 20px rgba(0,210,180,0.15);
|
|
}
|
|
|
|
/* ── 全局重置 ── */
|
|
*, *::before, *::after { box-sizing: border-box; }
|
|
|
|
html, body, #app {
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
background: var(--bg-base);
|
|
color: var(--text-primary);
|
|
font-family: var(--font-sans);
|
|
font-size: 14px;
|
|
-webkit-font-smoothing: antialiased;
|
|
/* iOS standalone 模式下禁止长按弹出菜单、文字选中 */
|
|
-webkit-touch-callout: none;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
/* ── Element Plus 深色覆盖 ── */
|
|
|
|
/* 容器 */
|
|
.el-container { background: var(--bg-base) !important; }
|
|
.el-main { background: var(--bg-base) !important; padding: 24px !important; }
|
|
|
|
/* 卡片 */
|
|
.el-card {
|
|
background: var(--bg-card) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
border-radius: var(--radius-lg) !important;
|
|
box-shadow: var(--shadow-card) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
.el-card__header {
|
|
background: transparent !important;
|
|
border-bottom: 1px solid var(--border-subtle) !important;
|
|
padding: 14px 20px !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
.el-card__body { color: var(--text-primary) !important; }
|
|
|
|
/* 表格 */
|
|
.el-table {
|
|
background: transparent !important;
|
|
color: var(--text-primary) !important;
|
|
border-radius: var(--radius-md) !important;
|
|
overflow: hidden !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
}
|
|
.el-table th.el-table__cell {
|
|
background: var(--bg-elevated) !important;
|
|
color: var(--text-secondary) !important;
|
|
font-size: 12px !important;
|
|
font-weight: 600 !important;
|
|
letter-spacing: 0.05em !important;
|
|
text-transform: uppercase !important;
|
|
border-bottom: 1px solid var(--border-default) !important;
|
|
}
|
|
.el-table td.el-table__cell {
|
|
background: transparent !important;
|
|
border-bottom: 1px solid var(--border-subtle) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
.el-table tr { background: transparent !important; }
|
|
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
|
|
background: rgba(255,255,255,0.02) !important;
|
|
}
|
|
.el-table__body tr:hover > td.el-table__cell {
|
|
background: var(--bg-hover) !important;
|
|
}
|
|
.el-table__empty-block { background: transparent !important; }
|
|
.el-table__empty-text { color: var(--text-muted) !important; }
|
|
.el-table__inner-wrapper::before { background: var(--border-default) !important; }
|
|
|
|
/* 分页 */
|
|
.el-pagination {
|
|
color: var(--text-secondary) !important;
|
|
}
|
|
.el-pagination .el-pager li {
|
|
background: var(--bg-elevated) !important;
|
|
color: var(--text-secondary) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
border-radius: var(--radius-sm) !important;
|
|
margin: 0 2px !important;
|
|
}
|
|
.el-pagination .el-pager li.is-active {
|
|
background: var(--accent-dim) !important;
|
|
color: var(--accent) !important;
|
|
border-color: var(--border-accent) !important;
|
|
}
|
|
.el-pagination .el-pager li:hover {
|
|
color: var(--accent) !important;
|
|
}
|
|
.el-pagination button {
|
|
background: var(--bg-elevated) !important;
|
|
color: var(--text-secondary) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
border-radius: var(--radius-sm) !important;
|
|
}
|
|
.el-pagination button:hover { color: var(--accent) !important; }
|
|
.el-pagination .el-select .el-input__wrapper {
|
|
background: var(--bg-elevated) !important;
|
|
border-color: var(--border-default) !important;
|
|
}
|
|
.el-pagination .el-select .el-input__inner { color: var(--text-secondary) !important; }
|
|
|
|
/* 输入框 */
|
|
.el-input__wrapper {
|
|
background: var(--bg-elevated) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
border-radius: var(--radius-sm) !important;
|
|
box-shadow: none !important;
|
|
transition: border-color 0.2s !important;
|
|
}
|
|
.el-input__wrapper:hover { border-color: var(--border-strong) !important; }
|
|
.el-input__wrapper.is-focus {
|
|
border-color: var(--accent) !important;
|
|
box-shadow: 0 0 0 2px var(--accent-dim) !important;
|
|
}
|
|
.el-input__inner {
|
|
color: var(--text-primary) !important;
|
|
background: transparent !important;
|
|
}
|
|
.el-input__inner::placeholder { color: var(--text-muted) !important; }
|
|
.el-textarea__inner {
|
|
background: var(--bg-elevated) !important;
|
|
border-color: var(--border-default) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
.el-textarea__inner:focus {
|
|
border-color: var(--accent) !important;
|
|
box-shadow: 0 0 0 2px var(--accent-dim) !important;
|
|
}
|
|
|
|
/* Select 下拉 */
|
|
.el-select-dropdown {
|
|
background: var(--bg-elevated) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
border-radius: var(--radius-md) !important;
|
|
box-shadow: var(--shadow-card) !important;
|
|
}
|
|
.el-select-dropdown__item {
|
|
color: var(--text-secondary) !important;
|
|
}
|
|
.el-select-dropdown__item:hover,
|
|
.el-select-dropdown__item.hover {
|
|
background: var(--bg-hover) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
.el-select-dropdown__item.selected {
|
|
color: var(--accent) !important;
|
|
background: var(--accent-dim) !important;
|
|
}
|
|
|
|
/* 按钮 */
|
|
.el-button {
|
|
border-radius: var(--radius-sm) !important;
|
|
font-family: var(--font-sans) !important;
|
|
font-weight: 500 !important;
|
|
transition: all 0.2s !important;
|
|
}
|
|
.el-button--default {
|
|
background: var(--bg-elevated) !important;
|
|
border-color: var(--border-default) !important;
|
|
color: var(--text-secondary) !important;
|
|
}
|
|
.el-button--default:hover {
|
|
background: var(--bg-hover) !important;
|
|
border-color: var(--border-strong) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
.el-button--primary {
|
|
background: var(--accent) !important;
|
|
border-color: var(--accent) !important;
|
|
color: #0a0e1a !important;
|
|
font-weight: 600 !important;
|
|
}
|
|
.el-button--primary:hover {
|
|
background: #00f0cc !important;
|
|
border-color: #00f0cc !important;
|
|
box-shadow: 0 0 12px var(--accent-glow) !important;
|
|
}
|
|
.el-button--success {
|
|
background: var(--success) !important;
|
|
border-color: var(--success) !important;
|
|
color: #fff !important;
|
|
}
|
|
.el-button--danger {
|
|
background: var(--danger) !important;
|
|
border-color: var(--danger) !important;
|
|
color: #fff !important;
|
|
}
|
|
.el-button--warning {
|
|
background: var(--warning) !important;
|
|
border-color: var(--warning) !important;
|
|
color: #0a0e1a !important;
|
|
}
|
|
.el-button--info {
|
|
background: var(--info) !important;
|
|
border-color: var(--info) !important;
|
|
color: #fff !important;
|
|
}
|
|
.el-button.is-plain.el-button--danger {
|
|
background: var(--danger-dim) !important;
|
|
border-color: var(--danger) !important;
|
|
color: var(--danger) !important;
|
|
}
|
|
.el-button.is-plain.el-button--warning {
|
|
background: var(--warning-dim) !important;
|
|
border-color: var(--warning) !important;
|
|
color: var(--warning) !important;
|
|
}
|
|
.el-button.is-plain.el-button--primary {
|
|
background: var(--accent-dim) !important;
|
|
border-color: var(--accent) !important;
|
|
color: var(--accent) !important;
|
|
}
|
|
|
|
/* 标签 */
|
|
.el-tag {
|
|
border-radius: var(--radius-sm) !important;
|
|
font-size: 11px !important;
|
|
font-weight: 600 !important;
|
|
letter-spacing: 0.03em !important;
|
|
}
|
|
.el-tag--success {
|
|
background: var(--success-dim) !important;
|
|
border-color: rgba(34,197,94,0.3) !important;
|
|
color: var(--success) !important;
|
|
}
|
|
.el-tag--danger {
|
|
background: var(--danger-dim) !important;
|
|
border-color: rgba(239,68,68,0.3) !important;
|
|
color: var(--danger) !important;
|
|
}
|
|
.el-tag--warning {
|
|
background: var(--warning-dim) !important;
|
|
border-color: rgba(245,158,11,0.3) !important;
|
|
color: var(--warning) !important;
|
|
}
|
|
.el-tag--info {
|
|
background: rgba(255,255,255,0.06) !important;
|
|
border-color: var(--border-default) !important;
|
|
color: var(--text-secondary) !important;
|
|
}
|
|
|
|
/* 对话框 */
|
|
.el-dialog {
|
|
background: var(--bg-card) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
border-radius: var(--radius-lg) !important;
|
|
box-shadow: 0 24px 64px rgba(0,0,0,0.6) !important;
|
|
}
|
|
.el-dialog__header {
|
|
background: var(--bg-elevated) !important;
|
|
border-bottom: 1px solid var(--border-subtle) !important;
|
|
padding: 16px 20px !important;
|
|
border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
|
|
}
|
|
.el-dialog__title {
|
|
color: var(--text-primary) !important;
|
|
font-weight: 600 !important;
|
|
font-size: 15px !important;
|
|
}
|
|
.el-dialog__headerbtn .el-dialog__close { color: var(--text-muted) !important; }
|
|
.el-dialog__headerbtn:hover .el-dialog__close { color: var(--text-primary) !important; }
|
|
.el-dialog__body { color: var(--text-primary) !important; padding: 20px !important; }
|
|
.el-dialog__footer {
|
|
border-top: 1px solid var(--border-subtle) !important;
|
|
padding: 14px 20px !important;
|
|
}
|
|
.el-overlay { background: rgba(0,0,0,0.7) !important; }
|
|
|
|
/* 表单 */
|
|
.el-form-item__label { color: var(--text-secondary) !important; }
|
|
.el-form--inline .el-form-item { margin-bottom: 0 !important; }
|
|
|
|
/* 描述列表 */
|
|
.el-descriptions__header { color: var(--text-primary) !important; }
|
|
.el-descriptions__body { background: transparent !important; }
|
|
.el-descriptions__body .el-descriptions__table { background: transparent !important; }
|
|
.el-descriptions__cell { background: transparent !important; }
|
|
.el-descriptions--bordered .el-descriptions__cell {
|
|
border-color: var(--border-default) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
.el-descriptions--bordered .el-descriptions__label {
|
|
background: var(--bg-elevated) !important;
|
|
color: var(--text-secondary) !important;
|
|
font-size: 12px !important;
|
|
}
|
|
|
|
/* 进度条 */
|
|
.el-progress-bar__outer {
|
|
background: var(--bg-elevated) !important;
|
|
border-radius: 2px !important;
|
|
}
|
|
|
|
/* 统计数字 */
|
|
.el-statistic__head { color: var(--text-muted) !important; font-size: 12px !important; }
|
|
.el-statistic__content { color: var(--text-primary) !important; }
|
|
.el-statistic__number { color: var(--text-primary) !important; }
|
|
|
|
/* 警告框 */
|
|
.el-alert {
|
|
border-radius: var(--radius-md) !important;
|
|
border: 1px solid !important;
|
|
}
|
|
.el-alert--success {
|
|
background: var(--success-dim) !important;
|
|
border-color: rgba(34,197,94,0.3) !important;
|
|
}
|
|
.el-alert--error {
|
|
background: var(--danger-dim) !important;
|
|
border-color: rgba(239,68,68,0.3) !important;
|
|
}
|
|
.el-alert--warning {
|
|
background: var(--warning-dim) !important;
|
|
border-color: rgba(245,158,11,0.3) !important;
|
|
}
|
|
.el-alert__title { color: var(--text-primary) !important; }
|
|
.el-alert__description { color: var(--text-secondary) !important; }
|
|
|
|
/* 链接 */
|
|
.el-link { font-weight: 500 !important; }
|
|
.el-link--primary { color: var(--accent) !important; }
|
|
.el-link--primary:hover { color: #00f0cc !important; }
|
|
|
|
/* 分割线 */
|
|
.el-divider { border-color: var(--border-subtle) !important; }
|
|
.el-divider__text {
|
|
background: var(--bg-card) !important;
|
|
color: var(--text-muted) !important;
|
|
font-size: 11px !important;
|
|
}
|
|
|
|
/* 消息提示 */
|
|
.el-message {
|
|
background: var(--bg-elevated) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
border-radius: var(--radius-md) !important;
|
|
box-shadow: var(--shadow-card) !important;
|
|
}
|
|
.el-message__content { color: var(--text-primary) !important; }
|
|
|
|
/* 确认框 */
|
|
.el-message-box {
|
|
background: var(--bg-card) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
border-radius: var(--radius-lg) !important;
|
|
}
|
|
.el-message-box__header { background: var(--bg-elevated) !important; border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; }
|
|
.el-message-box__title { color: var(--text-primary) !important; }
|
|
.el-message-box__content { color: var(--text-secondary) !important; }
|
|
|
|
/* 滚动条 */
|
|
::-webkit-scrollbar { width: 6px; height: 6px; }
|
|
::-webkit-scrollbar-track { background: transparent; }
|
|
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
|
|
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
|
|
|
|
/* 上传 */
|
|
.el-upload { display: inline-block !important; }
|
|
|
|
/* 徽章 */
|
|
.el-badge__content { font-size: 10px !important; }
|
|
|
|
|
|
/* ============================================================
|
|
浅色主题 — 精工白瓷 · 云白 + 深青绿主调
|
|
[data-theme="light"] 挂载在 <html> 上,覆盖 :root 变量
|
|
============================================================ */
|
|
|
|
[data-theme="light"] {
|
|
/* ── 基础色板 ── */
|
|
--bg-base: #f4f6f9;
|
|
--bg-surface: #ffffff;
|
|
--bg-elevated: #f0f2f7;
|
|
--bg-card: #ffffff;
|
|
--bg-hover: #e8ecf4;
|
|
--bg-active: #dde5f5;
|
|
|
|
/* ── 边框 ── */
|
|
--border-subtle: rgba(0,0,0,0.06);
|
|
--border-default: rgba(0,0,0,0.10);
|
|
--border-strong: rgba(0,0,0,0.18);
|
|
--border-accent: rgba(0,160,140,0.35);
|
|
|
|
/* ── 主色调:深青绿(比深色版略深,在白底上有足够对比) ── */
|
|
--accent: #00a08c;
|
|
--accent-dim: rgba(0,160,140,0.10);
|
|
--accent-glow: rgba(0,160,140,0.25);
|
|
--accent-dark: #007a6b;
|
|
|
|
/* ── 状态色(加深版,确保白底可读性) ── */
|
|
--success: #16a34a;
|
|
--success-dim: rgba(22,163,74,0.10);
|
|
--danger: #dc2626;
|
|
--danger-dim: rgba(220,38,38,0.08);
|
|
--warning: #d97706;
|
|
--warning-dim: rgba(217,119,6,0.10);
|
|
--info: #2563eb;
|
|
--info-dim: rgba(37,99,235,0.10);
|
|
|
|
/* ── 文字 ── */
|
|
--text-primary: #111827;
|
|
--text-secondary: #374151;
|
|
--text-muted: #9ca3af;
|
|
--text-accent: #00a08c;
|
|
|
|
/* ── 阴影(浅色版用更细腻的阴影) ── */
|
|
--shadow-card: 0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
|
|
--shadow-glow: 0 0 16px rgba(0,160,140,0.12);
|
|
}
|
|
|
|
/* ── 浅色主题下的全局背景 ── */
|
|
[data-theme="light"] body,
|
|
[data-theme="light"] #app {
|
|
background: var(--bg-base);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
/* ── 浅色主题下的 Element Plus 覆盖 ── */
|
|
|
|
/* 容器 */
|
|
[data-theme="light"] .el-container { background: var(--bg-base) !important; }
|
|
[data-theme="light"] .el-main { background: var(--bg-base) !important; }
|
|
|
|
/* 卡片 */
|
|
[data-theme="light"] .el-card {
|
|
background: var(--bg-card) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
box-shadow: var(--shadow-card) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
[data-theme="light"] .el-card__header {
|
|
border-bottom: 1px solid var(--border-subtle) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
[data-theme="light"] .el-card__body { color: var(--text-primary) !important; }
|
|
|
|
/* 表格 */
|
|
[data-theme="light"] .el-table {
|
|
background: var(--bg-card) !important;
|
|
color: var(--text-primary) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
}
|
|
[data-theme="light"] .el-table th.el-table__cell {
|
|
background: var(--bg-elevated) !important;
|
|
color: var(--text-secondary) !important;
|
|
border-bottom: 1px solid var(--border-default) !important;
|
|
}
|
|
[data-theme="light"] .el-table td.el-table__cell {
|
|
background: var(--bg-card) !important;
|
|
border-bottom: 1px solid var(--border-subtle) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
[data-theme="light"] .el-table tr { background: var(--bg-card) !important; }
|
|
[data-theme="light"] .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
|
|
background: #f8fafc !important;
|
|
}
|
|
[data-theme="light"] .el-table__body tr:hover > td.el-table__cell {
|
|
background: var(--bg-hover) !important;
|
|
}
|
|
[data-theme="light"] .el-table__empty-block { background: var(--bg-card) !important; }
|
|
[data-theme="light"] .el-table__empty-text { color: var(--text-muted) !important; }
|
|
[data-theme="light"] .el-table__inner-wrapper::before { background: var(--border-default) !important; }
|
|
|
|
/* 分页 */
|
|
[data-theme="light"] .el-pagination { color: var(--text-secondary) !important; }
|
|
[data-theme="light"] .el-pagination .el-pager li {
|
|
background: var(--bg-card) !important;
|
|
color: var(--text-secondary) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
}
|
|
[data-theme="light"] .el-pagination .el-pager li.is-active {
|
|
background: var(--accent-dim) !important;
|
|
color: var(--accent) !important;
|
|
border-color: var(--border-accent) !important;
|
|
}
|
|
[data-theme="light"] .el-pagination .el-pager li:hover { color: var(--accent) !important; }
|
|
[data-theme="light"] .el-pagination button {
|
|
background: var(--bg-card) !important;
|
|
color: var(--text-secondary) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
}
|
|
[data-theme="light"] .el-pagination button:hover { color: var(--accent) !important; }
|
|
[data-theme="light"] .el-pagination .el-select .el-input__wrapper {
|
|
background: var(--bg-card) !important;
|
|
border-color: var(--border-default) !important;
|
|
}
|
|
[data-theme="light"] .el-pagination .el-select .el-input__inner { color: var(--text-secondary) !important; }
|
|
|
|
/* 输入框 */
|
|
[data-theme="light"] .el-input__wrapper {
|
|
background: var(--bg-card) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
box-shadow: none !important;
|
|
}
|
|
[data-theme="light"] .el-input__wrapper:hover { border-color: var(--border-strong) !important; }
|
|
[data-theme="light"] .el-input__wrapper.is-focus {
|
|
border-color: var(--accent) !important;
|
|
box-shadow: 0 0 0 2px var(--accent-dim) !important;
|
|
}
|
|
[data-theme="light"] .el-input__inner {
|
|
color: var(--text-primary) !important;
|
|
background: transparent !important;
|
|
}
|
|
[data-theme="light"] .el-input__inner::placeholder { color: var(--text-muted) !important; }
|
|
[data-theme="light"] .el-textarea__inner {
|
|
background: var(--bg-card) !important;
|
|
border-color: var(--border-default) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
[data-theme="light"] .el-textarea__inner:focus {
|
|
border-color: var(--accent) !important;
|
|
box-shadow: 0 0 0 2px var(--accent-dim) !important;
|
|
}
|
|
|
|
/* Select 下拉 */
|
|
[data-theme="light"] .el-select-dropdown {
|
|
background: var(--bg-card) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
|
|
}
|
|
[data-theme="light"] .el-select-dropdown__item { color: var(--text-secondary) !important; }
|
|
[data-theme="light"] .el-select-dropdown__item:hover,
|
|
[data-theme="light"] .el-select-dropdown__item.hover {
|
|
background: var(--bg-hover) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
[data-theme="light"] .el-select-dropdown__item.selected {
|
|
color: var(--accent) !important;
|
|
background: var(--accent-dim) !important;
|
|
}
|
|
|
|
/* 按钮 */
|
|
[data-theme="light"] .el-button--default {
|
|
background: var(--bg-card) !important;
|
|
border-color: var(--border-default) !important;
|
|
color: var(--text-secondary) !important;
|
|
}
|
|
[data-theme="light"] .el-button--default:hover {
|
|
background: var(--bg-hover) !important;
|
|
border-color: var(--border-strong) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
[data-theme="light"] .el-button--primary {
|
|
background: var(--accent) !important;
|
|
border-color: var(--accent) !important;
|
|
color: #ffffff !important;
|
|
}
|
|
[data-theme="light"] .el-button--primary:hover {
|
|
background: #00c4aa !important;
|
|
border-color: #00c4aa !important;
|
|
box-shadow: 0 0 10px var(--accent-glow) !important;
|
|
}
|
|
[data-theme="light"] .el-button.is-plain.el-button--danger {
|
|
background: var(--danger-dim) !important;
|
|
border-color: var(--danger) !important;
|
|
color: var(--danger) !important;
|
|
}
|
|
[data-theme="light"] .el-button.is-plain.el-button--warning {
|
|
background: var(--warning-dim) !important;
|
|
border-color: var(--warning) !important;
|
|
color: var(--warning) !important;
|
|
}
|
|
[data-theme="light"] .el-button.is-plain.el-button--primary {
|
|
background: var(--accent-dim) !important;
|
|
border-color: var(--accent) !important;
|
|
color: var(--accent) !important;
|
|
}
|
|
|
|
/* 标签 */
|
|
[data-theme="light"] .el-tag--info {
|
|
background: rgba(0,0,0,0.04) !important;
|
|
border-color: var(--border-default) !important;
|
|
color: var(--text-secondary) !important;
|
|
}
|
|
|
|
/* 对话框 */
|
|
[data-theme="light"] .el-dialog {
|
|
background: var(--bg-card) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
box-shadow: 0 24px 64px rgba(0,0,0,0.15) !important;
|
|
}
|
|
[data-theme="light"] .el-dialog__header {
|
|
background: var(--bg-elevated) !important;
|
|
border-bottom: 1px solid var(--border-subtle) !important;
|
|
}
|
|
[data-theme="light"] .el-dialog__title { color: var(--text-primary) !important; }
|
|
[data-theme="light"] .el-dialog__headerbtn .el-dialog__close { color: var(--text-muted) !important; }
|
|
[data-theme="light"] .el-dialog__headerbtn:hover .el-dialog__close { color: var(--text-primary) !important; }
|
|
[data-theme="light"] .el-dialog__body { color: var(--text-primary) !important; }
|
|
[data-theme="light"] .el-dialog__footer { border-top: 1px solid var(--border-subtle) !important; }
|
|
[data-theme="light"] .el-overlay { background: rgba(0,0,0,0.4) !important; }
|
|
|
|
/* 表单 */
|
|
[data-theme="light"] .el-form-item__label { color: var(--text-secondary) !important; }
|
|
|
|
/* 描述列表 */
|
|
[data-theme="light"] .el-descriptions__body { background: transparent !important; }
|
|
[data-theme="light"] .el-descriptions__body .el-descriptions__table { background: transparent !important; }
|
|
[data-theme="light"] .el-descriptions--bordered .el-descriptions__cell {
|
|
border-color: var(--border-default) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
[data-theme="light"] .el-descriptions--bordered .el-descriptions__label {
|
|
background: var(--bg-elevated) !important;
|
|
color: var(--text-secondary) !important;
|
|
}
|
|
|
|
/* 进度条 */
|
|
[data-theme="light"] .el-progress-bar__outer { background: var(--bg-elevated) !important; }
|
|
|
|
/* 统计数字 */
|
|
[data-theme="light"] .el-statistic__head { color: var(--text-muted) !important; }
|
|
[data-theme="light"] .el-statistic__content { color: var(--text-primary) !important; }
|
|
[data-theme="light"] .el-statistic__number { color: var(--text-primary) !important; }
|
|
|
|
/* 警告框 */
|
|
[data-theme="light"] .el-alert__title { color: var(--text-primary) !important; }
|
|
[data-theme="light"] .el-alert__description { color: var(--text-secondary) !important; }
|
|
[data-theme="light"] .el-alert--success {
|
|
background: var(--success-dim) !important;
|
|
border-color: rgba(22,163,74,0.25) !important;
|
|
}
|
|
[data-theme="light"] .el-alert--error {
|
|
background: var(--danger-dim) !important;
|
|
border-color: rgba(220,38,38,0.25) !important;
|
|
}
|
|
[data-theme="light"] .el-alert--warning {
|
|
background: var(--warning-dim) !important;
|
|
border-color: rgba(217,119,6,0.25) !important;
|
|
}
|
|
|
|
/* 链接 */
|
|
[data-theme="light"] .el-link--primary { color: var(--accent) !important; }
|
|
[data-theme="light"] .el-link--primary:hover { color: var(--accent-dark) !important; }
|
|
|
|
/* 分割线 */
|
|
[data-theme="light"] .el-divider { border-color: var(--border-subtle) !important; }
|
|
[data-theme="light"] .el-divider__text {
|
|
background: var(--bg-card) !important;
|
|
color: var(--text-muted) !important;
|
|
}
|
|
|
|
/* 消息提示 */
|
|
[data-theme="light"] .el-message {
|
|
background: var(--bg-card) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
box-shadow: 0 4px 20px rgba(0,0,0,0.12) !important;
|
|
}
|
|
[data-theme="light"] .el-message__content { color: var(--text-primary) !important; }
|
|
|
|
/* 确认框 */
|
|
[data-theme="light"] .el-message-box {
|
|
background: var(--bg-card) !important;
|
|
border: 1px solid var(--border-default) !important;
|
|
}
|
|
[data-theme="light"] .el-message-box__header {
|
|
background: var(--bg-elevated) !important;
|
|
}
|
|
[data-theme="light"] .el-message-box__title { color: var(--text-primary) !important; }
|
|
[data-theme="light"] .el-message-box__content { color: var(--text-secondary) !important; }
|
|
|
|
/* 滚动条(浅色版) */
|
|
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }
|
|
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }
|
|
|
|
/* 主题过渡动画 */
|
|
html {
|
|
transition: background-color 0.25s ease, color 0.25s ease;
|
|
}
|
|
*, *::before, *::after {
|
|
transition-property: background-color, border-color, color, box-shadow;
|
|
transition-duration: 0.2s;
|
|
transition-timing-function: ease;
|
|
}
|
|
|
|
/* ============================================================
|
|
移动端全局适配
|
|
============================================================ */
|
|
|
|
/* 防止 iOS 双击缩放 */
|
|
html {
|
|
touch-action: manipulation;
|
|
}
|
|
|
|
/* 移动端 Element Plus 对话框全屏适配 */
|
|
@media (max-width: 767px) {
|
|
/* overlay 容器整体下移,避开固定顶栏(52px)并留出安全间距 */
|
|
.el-overlay-dialog {
|
|
padding-top: 60px !important;
|
|
padding-bottom: 72px !important; /* 底部导航 64px + 8px 间距 */
|
|
box-sizing: border-box !important;
|
|
}
|
|
|
|
.el-dialog {
|
|
width: calc(100vw - 24px) !important;
|
|
max-width: 100% !important;
|
|
margin: 0 auto !important;
|
|
border-radius: var(--radius-lg) !important;
|
|
/* 最大高度 = 视口 - 顶栏 - 底导航 - 上下间距 */
|
|
max-height: calc(100vh - 60px - 72px) !important;
|
|
display: flex !important;
|
|
flex-direction: column !important;
|
|
}
|
|
|
|
.el-dialog__body {
|
|
padding: 16px !important;
|
|
flex: 1 !important;
|
|
overflow-y: auto !important;
|
|
-webkit-overflow-scrolling: touch;
|
|
/* 不再写死 max-height,由父容器控制 */
|
|
max-height: none !important;
|
|
}
|
|
|
|
.el-dialog__footer {
|
|
padding: 12px 16px !important;
|
|
flex-shrink: 0 !important;
|
|
}
|
|
|
|
/* 表格在移动端允许横向滚动 */
|
|
.el-table {
|
|
overflow-x: auto !important;
|
|
}
|
|
|
|
/* 分页在移动端居中 */
|
|
.el-pagination {
|
|
justify-content: center !important;
|
|
flex-wrap: wrap !important;
|
|
}
|
|
|
|
/* 按钮最小触摸区域 */
|
|
.el-button {
|
|
min-height: 36px !important;
|
|
}
|
|
|
|
/* 输入框高度 */
|
|
.el-input__wrapper {
|
|
min-height: 36px !important;
|
|
}
|
|
|
|
/* 消息提示位置 */
|
|
.el-message {
|
|
min-width: 240px !important;
|
|
max-width: calc(100vw - 32px) !important;
|
|
}
|
|
}
|
|
|
|
/* ── iOS 主屏幕 standalone 模式:弹窗和消息额外下移刘海高度 ── */
|
|
/* --sat 由 main.js 在 standalone 模式下动态写入,Safari 中不存在默认为 0 */
|
|
@media (display-mode: standalone) and (max-width: 767px) {
|
|
.el-overlay-dialog {
|
|
padding-top: calc(60px + var(--sat, 0px)) !important;
|
|
padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
|
|
}
|
|
|
|
.el-dialog {
|
|
max-height: calc(100vh - 60px - 72px - var(--sat, 0px) - env(safe-area-inset-bottom)) !important;
|
|
}
|
|
|
|
/* 消息提示下移 */
|
|
.el-message-list {
|
|
top: calc(20px + var(--sat, 0px)) !important;
|
|
}
|
|
}
|