diff --git a/.cursor/rules/frontend-design-spec.mdc b/.cursor/rules/frontend-design-spec.mdc
index ffc0139..101990a 100644
--- a/.cursor/rules/frontend-design-spec.mdc
+++ b/.cursor/rules/frontend-design-spec.mdc
@@ -11,7 +11,7 @@ alwaysApply: true
## 关键规则速查
### 布局
-- 页面容器使用 `[class$='-container']` 或 `xxx-container`,`padding: 16px`
+- 页面容器使用 `[class$='-container']` 或 `xxx-container`,padding 用 `var(--app-page-padding)`(上 8 / 左右底 16;列表壳可用 `--app-page-padding-list`)
- 主背景 `#f0f3f4`,内容区 `#fff`
- 工具栏:`table-toolbar` + `toolbar-left` + `toolbar-right`
diff --git a/docs/前端页面设计规范.md b/docs/前端页面设计规范.md
index 9852214..0238ad1 100644
--- a/docs/前端页面设计规范.md
+++ b/docs/前端页面设计规范.md
@@ -38,15 +38,15 @@ a-layout (垂直)
**约定:**
-- 主内容背景色:`#f0f3f4`
-- 页面容器使用 `[class$='-container']`,统一 `padding: 16px`
+- 主内容背景色:`#f0f3f4`;日间另有极淡主色浅雾 `--app-page-bg-gradient`(`background-attachment: fixed`,顶栏与内容共用)
+- 页面容器使用 `[class$='-container']`,统一 `padding: var(--app-page-padding)`(上 **8px**,左右/底 **16px**;由 `--app-page-padding-top` 等变量控制)
- 内容区域使用 `overflow: hidden`、`height: 100%` 保证高度正确
**客户门户 vs 运营端导航(差异约定):**
| | 运营端 | 客户门户 |
|---|---|---|
-| 顶栏 | 一级模块 + hover 二级 + 右侧余额/打印/用户 | **无顶栏** |
+| 顶栏 | 左对齐半透明白菜单坞 + 右侧工具;选中约 9% 主色;页签降权并对齐菜单文字起点;磁吸滑块稳重缓动 | **无顶栏** |
| 页签 | TabBar 多页签 | **无多页签**(当前页仅由侧栏高亮表达) |
| 侧栏 | 无全局侧栏 | **全高可折叠左栏**(默认展开):顶 Logo;中按「常用 / 仓储 / 更多」浅分组;**资产与账户收进用户下拉**;底沉余额/打印(含下载)/消息/仓库;**语言收进用户菜单** |
| 高亮 | 路由最长路径匹配 | 侧栏最长路径匹配;账户类路由高亮底栏用户区 |
@@ -103,7 +103,7 @@ a-layout (垂直)
| 项目 | 约定 |
|------|------|
| 背景色 | `#f0f3f4`(与布局主内容区一致) |
-| 页面根容器 padding | **`16px 16px 24px`**:上/左/右 **16px**,**底 24px** —— 与视口底边留白,列表区随 flex 撑满后,整块内容与屏幕底边保持 **24px** 间距 |
+| 页面根容器 padding | **`8px 16px 16px`**(`var(--app-page-padding)` / 列表壳 `var(--app-page-padding-list)`):上 **8px**(贴紧顶栏页签),左/右/底 **16px**。透明顶栏后不再用上 16 / 底 24,避免页签与内容悬空 |
| 参与主内容区高度 | `flex: 1; min-height: 0; display: flex; flex-direction: column;`,与 `PageLayout` 子节点 flex 链衔接 |
| 纵向滚动 | 页面根容器宜 `overflow-y: hidden`(或仅最外层允许滚动),**表格/Handsontable 在内部 `.list-wrap` / `.wtHolder` 滚动**,避免整页与表格双滚动条 |
@@ -539,7 +539,7 @@ const { t } = useI18n();
### 13.2 容器类
-- 页面根容器:`xxx-container` / `xxx-page`(如 `role-page`、`track-order-container`),**列表类页面**推荐 `padding: 16px 16px 24px`,详见 **§2.5 页面壳、白卡片与列表区尺寸**
+- 页面根容器:`xxx-container` / `xxx-page`(如 `role-page`、`track-order-container`),**列表类页面**推荐 `padding: var(--app-page-padding-list)`(默认 `8px 16px 16px`),详见 **§2.5 页面壳、白卡片与列表区尺寸**
- 白卡片:`*-page-card`、`*-section` 等,与 `.list-wrap` 的 padding **勿重复叠加**
- 列表区:`.list-wrap`,**四边 16px**(相对分区后的内容边缘)
- 表格工具栏:`table-toolbar`、`toolbar-left`、`toolbar-right`,工具栏 **`padding: 16px 16px 0`** 与列表对齐
@@ -554,7 +554,7 @@ const { t } = useI18n();
## 十四、检查清单(新页面开发)
-- [ ] 使用 `xxx-container` / `xxx-page` 或等效布局结构;列表页见 **§2.5**:灰底 **`padding: 16px 16px 24px`**、`flex: 1; min-height: 0`
+- [ ] 使用 `xxx-container` / `xxx-page` 或等效布局结构;列表页见 **§2.5**:灰底 **`padding: var(--app-page-padding-list)`**、`flex: 1; min-height: 0`
- [ ] 白卡片与 **`.list-wrap`** 内边距勿重复叠加(推荐白卡片 `padding: 0` + 分区 padding)
- [ ] **`.list-wrap`**:`padding: 16px`、`flex: 1; min-height: 0`;需测高时 `ref` 挂在本层
- [ ] 工具栏使用 `table-toolbar`、`toolbar-left`、`toolbar-right`,工具栏 **`padding: 16px 16px 0`**
diff --git a/src/App.vue b/src/App.vue
index c6a96a0..83d91c8 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -326,6 +326,7 @@ html body .main-menu .menu-text {
.app-portal-stage {
min-height: 100%;
+ background: transparent;
}
.app-portal-stage--iris {
@@ -333,7 +334,7 @@ html body .main-menu .menu-text {
overflow: hidden;
min-height: 100vh;
min-height: 100dvh;
- /* 与登录页灰底一致,避免展开时露黑缝 */
+ /* 展开过渡仍用页面底色兜底,避免露黑缝 */
background: var(--app-page-bg, #f0f3f4);
}
diff --git a/src/assets/style/global.less b/src/assets/style/global.less
index 368e168..78d3a4d 100644
--- a/src/assets/style/global.less
+++ b/src/assets/style/global.less
@@ -3,9 +3,28 @@
--app-primary-color: #054f74;
--app-primary-color-hover: #054b6e;
--app-primary-color-light: #eef3f6;
- --app-navbar-bg: #054f74;
+ /* 日间透明顶栏:与页面同色;主题切换时由 themeColor 覆盖 */
+ --app-navbar-bg: #f0f3f4;
+ --app-navbar-item-active-bg: color-mix(in srgb, var(--app-primary-color, #054f74) 12%, #fff);
--app-sidebar-bg: #054f74;
--app-page-bg: #f0f3f4;
+ /*
+ * 极淡主色浅雾:上沿略提亮,约 220px 内回到灰底。
+ * 用 background-attachment: fixed 让顶栏与内容共享同一张底。
+ */
+ --app-page-bg-gradient: linear-gradient(
+ 180deg,
+ color-mix(in srgb, var(--app-primary-color, #054f74) 5%, #f5f8f9) 0%,
+ var(--app-page-bg, #f0f3f4) 220px,
+ var(--app-page-bg, #f0f3f4) 100%
+ );
+ /* 透明顶栏后:页面根容器上边距收紧,左右/底仍 16 */
+ --app-page-padding-top: 8px;
+ --app-page-padding-x: 16px;
+ --app-page-padding-bottom: 16px;
+ --app-page-padding: var(--app-page-padding-top) var(--app-page-padding-x)
+ var(--app-page-padding-bottom);
+ --app-page-padding-list: var(--app-page-padding-top) var(--app-page-padding-x) 16px;
--app-card-bg: #ffffff;
--app-card-border: #e5e6eb;
--app-elevated-bg: #ffffff;
@@ -306,11 +325,38 @@ body {
/* SimpleAdmin font stack */
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
"Microsoft YaHei", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
- background-color: var(--color-bg-1);
+ /* 固着浅雾底:顶栏与主内容看到同一张渐变 */
+ background-color: var(--app-page-bg, #f0f3f4);
+ background-image: var(--app-page-bg-gradient);
+ background-repeat: no-repeat;
+ background-attachment: fixed;
+ background-size: 100% 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
+#app {
+ min-height: 100%;
+ background: transparent;
+}
+
+/*
+ * 运营端主内容:全局收紧「顶栏页签 → 页面内容」间距;
+ * 根容器背景透出全局浅雾,避免各页实色灰底盖住渐变。
+ */
+.layout-content .page-layout-root > [class*='-container'],
+.layout-content .page-layout-root > [class*='-page'] {
+ padding-top: var(--app-page-padding-top, 8px) !important;
+ background-color: transparent !important;
+ background-image: none !important;
+}
+
+/* 夜间关闭浅雾,回到实色壳 */
+html[data-theme='dark'],
+html[data-theme='dark'] body {
+ background-image: none;
+}
+
div,
span,
input,
diff --git a/src/components/ContactService/index.vue b/src/components/ContactService/index.vue
index e0e8e52..3b49172 100644
--- a/src/components/ContactService/index.vue
+++ b/src/components/ContactService/index.vue
@@ -102,6 +102,7 @@ onMounted(() => {
{{ t('nav.contactService.shipWarehouse') }}
{{ labelText }}
+
{
}
&--navbar {
- color: #fff;
+ color: var(--color-text-2, #4e5969);
.contact-service__label {
display: inline-flex;
align-items: center;
- max-width: 180px;
+ gap: 4px;
+ max-width: 160px;
height: 28px;
- padding: 0 8px;
+ padding: 0 8px 0 10px;
border: none;
- border-radius: 6px;
+ border-radius: 999px;
background: transparent;
- font-size: 13px;
- line-height: 28px;
- color: #fff;
+ font-size: 12px;
+ font-weight: 500;
+ letter-spacing: 0.02em;
+ line-height: 1;
+ color: var(--color-text-2, #4e5969);
cursor: pointer;
overflow: hidden;
- text-overflow: ellipsis;
white-space: nowrap;
- transition: background-color 0.15s ease, opacity 0.15s ease;
+ transition:
+ color 0.16s ease,
+ background-color 0.16s ease;
&:hover {
- background-color: rgba(255, 255, 255, 0.12);
+ color: var(--color-text-1, #1d2129);
+ background-color: rgba(15, 23, 42, 0.045);
}
}
+
+ .contact-service__text {
+ min-width: 0;
+ }
+
+ .contact-service__caret {
+ flex-shrink: 0;
+ width: 0;
+ height: 0;
+ margin-left: 1px;
+ border-left: 3.5px solid transparent;
+ border-right: 3.5px solid transparent;
+ border-top: 4px solid currentColor;
+ opacity: 0.45;
+ }
}
&--sider {
diff --git a/src/components/tab-bar/index.vue b/src/components/tab-bar/index.vue
index 4afc7b0..e91fd97 100644
--- a/src/components/tab-bar/index.vue
+++ b/src/components/tab-bar/index.vue
@@ -414,7 +414,8 @@
display: flex;
align-items: center;
gap: 2px;
- padding: 0 6px 0 8px;
+ /* 与菜单坞内文字起点对齐:12 + 4 + 8(logo pad) + 32(logo) + 6 ≈ 62 */
+ padding: 0 12px 0 62px;
background: transparent;
&.is-overflow-left::before,
@@ -429,10 +430,10 @@
}
&.is-overflow-left::before {
- left: 26px;
+ left: 34px;
background: linear-gradient(
90deg,
- var(--color-fill-1, #f0f3f4) 10%,
+ var(--app-page-bg, #f0f3f4) 10%,
transparent
);
}
@@ -441,7 +442,7 @@
right: 72px;
background: linear-gradient(
270deg,
- var(--color-fill-1, #f0f3f4) 10%,
+ var(--app-page-bg, #f0f3f4) 10%,
transparent
);
}
@@ -456,7 +457,7 @@
height: 22px;
padding: 0;
border: none;
- border-radius: 4px;
+ border-radius: 6px;
background: transparent;
color: var(--color-text-4);
display: inline-flex;
@@ -468,13 +469,15 @@
&:hover {
color: var(--color-text-2);
- background: var(--color-fill-2);
+ background: rgba(0, 0, 0, 0.04);
}
}
.tab-bar-scroll {
- flex: 1;
+ flex: 0 1 auto;
min-width: 0;
+ width: max-content;
+ max-width: 100%;
height: 100%;
overflow-x: auto;
overflow-y: hidden;
@@ -490,22 +493,25 @@
height: 100%;
display: flex;
align-items: center;
- padding: 0 2px;
+ width: max-content;
+ padding: 0;
white-space: nowrap;
+ gap: 4px;
:deep(.arco-tag) {
display: inline-flex;
align-items: center;
- margin-right: 4px;
+ margin-right: 0;
cursor: pointer;
- border-radius: 4px;
- height: 26px;
- line-height: 26px;
+ border-radius: 8px;
+ height: 22px;
+ line-height: 22px;
padding: 0 8px;
- font-size: 12px;
+ font-size: 8px; /* 未选中:小 */
background: transparent;
border: 1px solid transparent;
- color: var(--color-text-2);
+ color: var(--color-text-3);
+ box-shadow: none;
transition:
background-color 0.15s ease,
color 0.15s ease,
@@ -530,8 +536,9 @@
}
&:not(.link-activated):hover {
- background-color: var(--color-fill-2);
+ background-color: rgba(0, 0, 0, 0.04);
border-color: transparent;
+ color: var(--color-text-1);
}
}
}
@@ -542,9 +549,9 @@
display: inline-flex;
align-items: center;
gap: 4px;
- margin-left: 4px;
+ margin-left: auto;
padding-left: 6px;
- border-left: 1px solid var(--color-border-1);
+ border-left: none;
}
.tab-bar-action {
@@ -552,20 +559,20 @@
align-items: center;
justify-content: center;
gap: 4px;
- height: 28px;
- min-width: 28px;
- padding: 0 8px;
+ height: 24px;
+ min-width: 24px;
+ padding: 0 6px;
border: none;
- border-radius: 4px;
+ border-radius: 8px;
background: transparent;
- color: var(--color-text-2);
- font-size: 13px;
+ color: var(--color-text-3);
+ font-size: 12px;
cursor: pointer;
transition: background-color 0.15s ease, color 0.15s ease;
&:hover:not(:disabled) {
color: var(--color-text-1);
- background: var(--color-fill-2);
+ background: rgba(0, 0, 0, 0.04);
}
&:disabled {
@@ -575,11 +582,11 @@
&--icon {
padding: 0;
- width: 28px;
+ width: 24px;
:deep(svg) {
- width: 18px;
- height: 18px;
+ width: 16px;
+ height: 16px;
}
}
diff --git a/src/components/tab-bar/tab-item.vue b/src/components/tab-bar/tab-item.vue
index 8c64439..8bf3601 100644
--- a/src/components/tab-bar/tab-item.vue
+++ b/src/components/tab-bar/tab-item.vue
@@ -277,17 +277,18 @@
}
.tag-link {
- color: var(--color-text-2);
+ color: inherit;
text-decoration: none;
}
.link-activated {
- background-color: color-mix(in srgb, var(--app-primary-color) 10%, transparent) !important;
- border-radius: 4px !important;
- color: var(--app-primary-color) !important;
+ /* 无色底:主色字 + 中等字重 */
+ background-color: transparent !important;
+ border-radius: 8px !important;
+ color: var(--app-primary-color, #054f74) !important;
padding: 0 8px !important;
- height: 26px !important;
- line-height: 26px !important;
+ height: 24px !important;
+ line-height: 24px !important;
border: 1px solid transparent !important;
box-shadow: none;
transition:
@@ -296,24 +297,40 @@
color 0.15s ease;
.tag-link {
- color: var(--app-primary-color) !important;
- font-weight: 600;
+ color: var(--app-primary-color, #054f74) !important;
+ font-weight: 500;
+ font-size: 13px; /* 选中:大 */
}
:deep(.arco-tag-close-btn),
:deep(.arco-tag-refresh-btn) {
- color: var(--app-primary-color) !important;
+ color: var(--color-text-3, #86909c) !important;
&:hover {
- color: var(--app-primary-color) !important;
- background-color: color-mix(in srgb, var(--app-primary-color) 12%, transparent);
+ color: var(--color-text-1, #1d2129) !important;
+ background-color: rgba(0, 0, 0, 0.06);
}
}
+ /* 刷新仅在悬停时出现,减少常显噪音 */
+ :deep(.arco-tag-refresh-btn) {
+ width: 0;
+ margin-right: 0;
+ opacity: 0;
+ overflow: hidden;
+ transition: width 0.12s ease, opacity 0.12s ease, margin 0.12s ease;
+ }
+
&:hover {
- background-color: color-mix(in srgb, var(--app-primary-color) 14%, transparent) !important;
+ background-color: rgba(0, 0, 0, 0.04) !important;
border-color: transparent !important;
box-shadow: none;
+
+ :deep(.arco-tag-refresh-btn) {
+ width: 16px;
+ margin-right: 4px;
+ opacity: 1;
+ }
}
}
@@ -335,12 +352,12 @@
}
:deep(.arco-tag-refresh-btn) {
- margin-right: 4px;
margin-left: 0;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
+ flex-shrink: 0;
}
.sperate-line {
diff --git a/src/components/top-nav/RightTopMessage.vue b/src/components/top-nav/RightTopMessage.vue
index ca857ed..ecb1ad4 100644
--- a/src/components/top-nav/RightTopMessage.vue
+++ b/src/components/top-nav/RightTopMessage.vue
@@ -114,14 +114,14 @@ const onMessageMenuClick = (event: { key?: string }) => {
min-width: 28px;
height: 28px;
padding: 0 6px;
- border-radius: 6px;
+ border-radius: 8px;
cursor: pointer;
color: inherit;
transition: background-color 0.15s ease, opacity 0.15s ease, color 0.15s ease;
}
.message-dropdown-trigger:hover {
- background-color: rgba(255, 255, 255, 0.12);
+ background-color: rgba(0, 0, 0, 0.05);
}
.message-dropdown-trigger.is-emphasized {
diff --git a/src/components/top-nav/RightTopUser.vue b/src/components/top-nav/RightTopUser.vue
index 07fb351..9fee8a0 100644
--- a/src/components/top-nav/RightTopUser.vue
+++ b/src/components/top-nav/RightTopUser.vue
@@ -634,7 +634,7 @@ const onMenuClick = async (event: { key: string }) => {
max-width: 180px;
height: 28px;
padding: 0 8px;
- border-radius: 6px;
+ border-radius: 8px;
white-space: nowrap;
cursor: pointer;
color: inherit;
@@ -644,14 +644,14 @@ const onMenuClick = async (event: { key: string }) => {
.user-dropdown-trigger.is-compact {
max-width: none;
- width: 32px;
- height: 32px;
+ width: 28px;
+ height: 28px;
padding: 0;
justify-content: center;
}
.user-dropdown-trigger:hover {
- background-color: rgba(255, 255, 255, 0.12);
+ background-color: rgba(0, 0, 0, 0.05);
}
.user-avatar {
@@ -660,7 +660,7 @@ const onMenuClick = async (event: { key: string }) => {
border-radius: 50%;
object-fit: cover;
flex-shrink: 0;
- background: rgba(255, 255, 255, 0.16);
+ background: var(--color-fill-3, #e5e6eb);
}
.user-avatar--fallback {
diff --git a/src/components/top-nav/SelectLang.vue b/src/components/top-nav/SelectLang.vue
index 872c7ae..93d5a79 100644
--- a/src/components/top-nav/SelectLang.vue
+++ b/src/components/top-nav/SelectLang.vue
@@ -35,7 +35,7 @@ const props = withDefaults(
quiet?: boolean;
/** 下拉位置;侧栏沉底用 tl */
dropdownPosition?: 'br' | 'bl' | 'tr' | 'tl' | 'rt' | 'rb';
- /** navbar:顶栏深色;sider:客户/代理侧栏浅底 */
+ /** navbar:透明浅顶栏;sider:客户/代理侧栏浅底 */
variant?: 'navbar' | 'sider';
}>(),
{ quiet: false, dropdownPosition: 'br', variant: 'navbar' },
@@ -79,11 +79,11 @@ function changeLang({ key }: { key: string }) {
justify-content: center;
width: 28px;
height: 28px;
- border-radius: 6px;
+ border-radius: 8px;
transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
&:hover {
- background-color: rgba(255, 255, 255, 0.12);
+ background-color: rgba(0, 0, 0, 0.05);
}
&.is-sider {
diff --git a/src/components/top-nav/index.vue b/src/components/top-nav/index.vue
index e15b833..c3969d6 100644
--- a/src/components/top-nav/index.vue
+++ b/src/components/top-nav/index.vue
@@ -1,28 +1,22 @@