296 lines
9.3 KiB
CSS
296 lines
9.3 KiB
CSS
/* iAOP 全站统一设计系统(Ant Design Pro 风格重构,2026-08)。
|
||||
|
|
*
|
|||
|
|
* 目标:整个 Web 前端(门户 / 登录 / 驾驶舱 / 配置台 / 管理台 / 助手 / 移动端)
|
|||
|
|
* 统一为 Ant Design Pro 视觉语言——浅灰页面底 + 白色卡片 + AntD 5 蓝色主色,
|
|||
|
|
* 字体 / 圆角 / 阴影 / 间距全部对齐 Ant Design 5 设计 token。
|
|||
|
|
*
|
|||
|
|
* 实现方式(纯静态、无构建链):
|
|||
|
|
* 各模块页原本就用 CSS 变量调色(--cockpit-* 与 --bg/--surface/--fg 两套命名),
|
|||
|
|
* 本文件在页面原有样式表【之后】加载,把这两套变量统一映射到 AntD 色板,
|
|||
|
|
* 并统一字体、顶栏、按钮、输入框、表格、标签等基础元素外观,
|
|||
|
|
* 各模块页业务逻辑与布局结构零改动。
|
|||
|
|
*
|
|||
|
|
* 色板来源:Ant Design 5 官方设计 token
|
|||
|
|
* (primary #1677ff / success #52c41a / warning #faad14 / error #ff4d4f)。
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
:root {
|
|||
|
|
/* ---- Ant Design 5 基础 token --------------------------------------- */
|
|||
|
|
--ant-primary: #1677ff;
|
|||
|
|
--ant-primary-hover: #4096ff;
|
|||
|
|
--ant-primary-active: #0958d9;
|
|||
|
|
--ant-success: #52c41a;
|
|||
|
|
--ant-warning: #faad14;
|
|||
|
|
--ant-error: #ff4d4f;
|
|||
|
|
--ant-text: rgba(0, 0, 0, 0.88);
|
|||
|
|
--ant-text-secondary: rgba(0, 0, 0, 0.65);
|
|||
|
|
--ant-text-tertiary: rgba(0, 0, 0, 0.45);
|
|||
|
|
--ant-border: #d9d9d9;
|
|||
|
|
--ant-split: rgba(5, 5, 5, 0.06);
|
|||
|
|
--ant-bg-layout: #f0f2f5;
|
|||
|
|
--ant-bg-container: #ffffff;
|
|||
|
|
--ant-bg-fill: rgba(0, 0, 0, 0.04);
|
|||
|
|
--ant-radius: 6px;
|
|||
|
|
--ant-radius-lg: 8px;
|
|||
|
|
--ant-shadow-card: 0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|||
|
|
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|||
|
|
0 2px 4px 0 rgba(0, 0, 0, 0.02);
|
|||
|
|
--ant-shadow-header: 0 1px 4px rgba(0, 21, 41, 0.08);
|
|||
|
|
--ant-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|||
|
|
"Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
|
|||
|
|
"Microsoft YaHei", "Noto Sans", sans-serif;
|
|||
|
|
|
|||
|
|
/* ---- iAOP 旧变量 → AntD 映射(cockpit/studio/mobile 用 --cockpit-*) -- */
|
|||
|
|
--cockpit-bg: var(--ant-bg-layout);
|
|||
|
|
--cockpit-surface: var(--ant-bg-container);
|
|||
|
|
--cockpit-fg: var(--ant-text);
|
|||
|
|
--cockpit-fg-muted: var(--ant-text-tertiary);
|
|||
|
|
--cockpit-accent: var(--ant-primary);
|
|||
|
|
--cockpit-warn: var(--ant-warning);
|
|||
|
|
--cockpit-grid-line: var(--ant-split);
|
|||
|
|
|
|||
|
|
/* ---- iAOP 旧变量 → AntD 映射(admin/assistant/users 用短名) -------- */
|
|||
|
|
--bg: var(--ant-bg-layout);
|
|||
|
|
--surface: var(--ant-bg-container);
|
|||
|
|
--surface-2: var(--ant-bg-fill);
|
|||
|
|
--fg: var(--ant-text);
|
|||
|
|
--fg-muted: var(--ant-text-tertiary);
|
|||
|
|
--muted: var(--ant-text-tertiary);
|
|||
|
|
--accent: var(--ant-primary);
|
|||
|
|
--warn: var(--ant-warning);
|
|||
|
|
--line: var(--ant-split);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* ---- 全局排版 ---------------------------------------------------------- */
|
|||
|
|
body {
|
|||
|
|
font-family: var(--ant-font) !important;
|
|||
|
|
-webkit-font-smoothing: antialiased;
|
|||
|
|
font-size: 14px;
|
|||
|
|
line-height: 1.5715;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* ---- 统一全站导航条(pro-header.js 注入) ------------------------------ */
|
|||
|
|
.pro-header {
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 16px;
|
|||
|
|
height: 48px;
|
|||
|
|
padding: 0 16px;
|
|||
|
|
background: var(--ant-bg-container);
|
|||
|
|
box-shadow: var(--ant-shadow-header);
|
|||
|
|
position: relative;
|
|||
|
|
z-index: 10;
|
|||
|
|
}
|
|||
|
|
.pro-header .pro-logo {
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 8px;
|
|||
|
|
text-decoration: none;
|
|||
|
|
flex-shrink: 0;
|
|||
|
|
}
|
|||
|
|
.pro-header .pro-logo-badge {
|
|||
|
|
width: 28px;
|
|||
|
|
height: 28px;
|
|||
|
|
border-radius: var(--ant-radius);
|
|||
|
|
background: var(--ant-primary);
|
|||
|
|
color: #fff;
|
|||
|
|
font-size: 13px;
|
|||
|
|
font-weight: 600;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
letter-spacing: 0.5px;
|
|||
|
|
}
|
|||
|
|
.pro-header .pro-logo-text {
|
|||
|
|
font-size: 16px;
|
|||
|
|
font-weight: 600;
|
|||
|
|
color: var(--ant-text);
|
|||
|
|
white-space: nowrap;
|
|||
|
|
}
|
|||
|
|
.pro-header .pro-page-title {
|
|||
|
|
font-size: 14px;
|
|||
|
|
color: var(--ant-text-tertiary);
|
|||
|
|
padding-left: 16px;
|
|||
|
|
border-left: 1px solid var(--ant-split);
|
|||
|
|
white-space: nowrap;
|
|||
|
|
overflow: hidden;
|
|||
|
|
text-overflow: ellipsis;
|
|||
|
|
}
|
|||
|
|
.pro-header .pro-header-right {
|
|||
|
|
margin-left: auto;
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 12px;
|
|||
|
|
font-size: 13px;
|
|||
|
|
color: var(--ant-text-secondary);
|
|||
|
|
}
|
|||
|
|
.pro-header .pro-user {
|
|||
|
|
display: flex;
|
|||
|
|
align-items: center;
|
|||
|
|
gap: 6px;
|
|||
|
|
}
|
|||
|
|
.pro-header .pro-avatar {
|
|||
|
|
width: 24px;
|
|||
|
|
height: 24px;
|
|||
|
|
border-radius: 50%;
|
|||
|
|
background: var(--ant-primary);
|
|||
|
|
color: #fff;
|
|||
|
|
font-size: 12px;
|
|||
|
|
display: inline-flex;
|
|||
|
|
align-items: center;
|
|||
|
|
justify-content: center;
|
|||
|
|
}
|
|||
|
|
.pro-header a.pro-nav-link {
|
|||
|
|
color: var(--ant-text-secondary);
|
|||
|
|
text-decoration: none;
|
|||
|
|
padding: 4px 8px;
|
|||
|
|
border-radius: var(--ant-radius);
|
|||
|
|
}
|
|||
|
|
.pro-header a.pro-nav-link:hover {
|
|||
|
|
color: var(--ant-primary);
|
|||
|
|
background: var(--ant-bg-fill);
|
|||
|
|
}
|
|||
|
|
.pro-header .pro-logout {
|
|||
|
|
border: none;
|
|||
|
|
background: none;
|
|||
|
|
color: var(--ant-text-tertiary);
|
|||
|
|
cursor: pointer;
|
|||
|
|
font-size: 13px;
|
|||
|
|
padding: 4px 8px;
|
|||
|
|
border-radius: var(--ant-radius);
|
|||
|
|
font-family: inherit;
|
|||
|
|
}
|
|||
|
|
.pro-header .pro-logout:hover {
|
|||
|
|
color: var(--ant-error);
|
|||
|
|
background: var(--ant-bg-fill);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* ---- AntD Tag(角色 / 状态标记) --------------------------------------- */
|
|||
|
|
.pro-tag {
|
|||
|
|
display: inline-block;
|
|||
|
|
font-size: 12px;
|
|||
|
|
line-height: 20px;
|
|||
|
|
padding: 0 7px;
|
|||
|
|
border-radius: 4px;
|
|||
|
|
border: 1px solid transparent;
|
|||
|
|
white-space: nowrap;
|
|||
|
|
}
|
|||
|
|
.pro-tag-blue { color: #1d39c4; background: #e6f4ff; border-color: #91caff; }
|
|||
|
|
.pro-tag-green { color: #237804; background: #f6ffed; border-color: #b7eb8f; }
|
|||
|
|
.pro-tag-gold { color: #ad6800; background: #fffbe6; border-color: #ffe58f; }
|
|||
|
|
.pro-tag-red { color: #cf1322; background: #fff1f0; border-color: #ffa39e; }
|
|||
|
|
.pro-tag-default{ color: var(--ant-text-secondary); background: #fafafa;
|
|||
|
|
border-color: var(--ant-border); }
|
|||
|
|
|
|||
|
|
/* ---- 各模块页页内顶栏 → AntD PageHeader 风格 --------------------------- */
|
|||
|
|
/* 覆盖 cockpit/studio/admin/users 的 #topbar(结构不变,外观统一) */
|
|||
|
|
#topbar {
|
|||
|
|
background: var(--ant-bg-container) !important;
|
|||
|
|
border-bottom: 1px solid var(--ant-split) !important;
|
|||
|
|
}
|
|||
|
|
#topbar h1, #topbar h1 .sub { color: var(--ant-text) !important; }
|
|||
|
|
#topbar h1 .sub { color: var(--ant-text-tertiary) !important; }
|
|||
|
|
|
|||
|
|
/* ---- 页内 tab(studio/admin)→ AntD Tabs 风格 -------------------------- */
|
|||
|
|
.tab {
|
|||
|
|
border: none !important;
|
|||
|
|
border-radius: 0 !important;
|
|||
|
|
background: transparent !important;
|
|||
|
|
color: var(--ant-text-secondary) !important;
|
|||
|
|
border-bottom: 2px solid transparent !important;
|
|||
|
|
padding: 8px 4px !important;
|
|||
|
|
margin: 0 12px;
|
|||
|
|
}
|
|||
|
|
.tab.active {
|
|||
|
|
color: var(--ant-primary) !important;
|
|||
|
|
background: transparent !important;
|
|||
|
|
border-bottom-color: var(--ant-primary) !important;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* ---- 表单控件 → AntD Input/Select 风格 --------------------------------- */
|
|||
|
|
input:not([type="checkbox"]):not([type="radio"]),
|
|||
|
|
select,
|
|||
|
|
textarea {
|
|||
|
|
font-family: inherit;
|
|||
|
|
border: 1px solid var(--ant-border) !important;
|
|||
|
|
border-radius: var(--ant-radius) !important;
|
|||
|
|
background: var(--ant-bg-container) !important;
|
|||
|
|
color: var(--ant-text) !important;
|
|||
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|||
|
|
}
|
|||
|
|
input:not([type="checkbox"]):not([type="radio"]):hover,
|
|||
|
|
select:hover,
|
|||
|
|
textarea:hover {
|
|||
|
|
border-color: var(--ant-primary-hover) !important;
|
|||
|
|
}
|
|||
|
|
input:not([type="checkbox"]):not([type="radio"]):focus,
|
|||
|
|
select:focus,
|
|||
|
|
textarea:focus {
|
|||
|
|
border-color: var(--ant-primary) !important;
|
|||
|
|
outline: none;
|
|||
|
|
box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* ---- 按钮 → AntD Button 风格 ------------------------------------------- */
|
|||
|
|
button {
|
|||
|
|
font-family: inherit;
|
|||
|
|
border-radius: var(--ant-radius) !important;
|
|||
|
|
border: 1px solid var(--ant-border);
|
|||
|
|
background: var(--ant-bg-container);
|
|||
|
|
color: var(--ant-text);
|
|||
|
|
cursor: pointer;
|
|||
|
|
transition: all 0.2s;
|
|||
|
|
}
|
|||
|
|
button:hover {
|
|||
|
|
color: var(--ant-primary);
|
|||
|
|
border-color: var(--ant-primary) !important;
|
|||
|
|
}
|
|||
|
|
button.primary, button.btn-primary, .btn-primary {
|
|||
|
|
background: var(--ant-primary) !important;
|
|||
|
|
border-color: var(--ant-primary) !important;
|
|||
|
|
color: #fff !important;
|
|||
|
|
}
|
|||
|
|
button.primary:hover, button.btn-primary:hover, .btn-primary:hover {
|
|||
|
|
background: var(--ant-primary-hover) !important;
|
|||
|
|
border-color: var(--ant-primary-hover) !important;
|
|||
|
|
}
|
|||
|
|
button.danger, .btn-danger {
|
|||
|
|
background: var(--ant-error) !important;
|
|||
|
|
border-color: var(--ant-error) !important;
|
|||
|
|
color: #fff !important;
|
|||
|
|
}
|
|||
|
|
button:disabled {
|
|||
|
|
opacity: 0.55;
|
|||
|
|
cursor: not-allowed;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* ---- 表格 → AntD Table 风格 --------------------------------------------- */
|
|||
|
|
table th {
|
|||
|
|
background: #fafafa;
|
|||
|
|
color: var(--ant-text-secondary) !important;
|
|||
|
|
font-weight: 600 !important;
|
|||
|
|
}
|
|||
|
|
table th, table td {
|
|||
|
|
border-bottom: 1px solid var(--ant-split) !important;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* ---- 通用卡片(各页 .panel/.card 已用 --surface,此处补阴影圆角) ------- */
|
|||
|
|
.panel, .card {
|
|||
|
|
border: 1px solid var(--ant-split) !important;
|
|||
|
|
border-radius: var(--ant-radius-lg) !important;
|
|||
|
|
box-shadow: var(--ant-shadow-card);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* ---- 对话助手气泡修正(亮底下的可读性) --------------------------------- */
|
|||
|
|
.user .text { background: var(--ant-primary) !important; color: #fff !important; }
|
|||
|
|
|
|||
|
|
/* ---- 状态点(推理服务在线/离线) ---------------------------------------- */
|
|||
|
|
.status-dot.ok, .dot.ok { color: var(--ant-success) !important; }
|
|||
|
|
.status-dot.down, .dot.down { color: var(--ant-error) !important; }
|
|||
|
|
|
|||
|
|
/* ---- 窄屏适配:导航条允许换行收缩 --------------------------------------- */
|
|||
|
|
@media (max-width: 720px) {
|
|||
|
|
.pro-header .pro-page-title { display: none; }
|
|||
|
|
.pro-header .pro-logo-text { font-size: 14px; }
|
|||
|
|
}
|