refine: 管理端顶栏透明坞与右侧工具条收束
All checks were successful
Build and Deploy Front / deploy (push) Successful in 10m35s
All checks were successful
Build and Deploy Front / deploy (push) Successful in 10m35s
统一菜单坞、页签字号与右侧分组触控态,去掉用户名展示并优化仓库入口,避免再加第二坞。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
74a30cd78d
commit
188675e9bf
@ -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`
|
- 主背景 `#f0f3f4`,内容区 `#fff`
|
||||||
- 工具栏:`table-toolbar` + `toolbar-left` + `toolbar-right`
|
- 工具栏:`table-toolbar` + `toolbar-left` + `toolbar-right`
|
||||||
|
|
||||||
|
|||||||
@ -38,15 +38,15 @@ a-layout (垂直)
|
|||||||
|
|
||||||
**约定:**
|
**约定:**
|
||||||
|
|
||||||
- 主内容背景色:`#f0f3f4`
|
- 主内容背景色:`#f0f3f4`;日间另有极淡主色浅雾 `--app-page-bg-gradient`(`background-attachment: fixed`,顶栏与内容共用)
|
||||||
- 页面容器使用 `[class$='-container']`,统一 `padding: 16px`
|
- 页面容器使用 `[class$='-container']`,统一 `padding: var(--app-page-padding)`(上 **8px**,左右/底 **16px**;由 `--app-page-padding-top` 等变量控制)
|
||||||
- 内容区域使用 `overflow: hidden`、`height: 100%` 保证高度正确
|
- 内容区域使用 `overflow: hidden`、`height: 100%` 保证高度正确
|
||||||
|
|
||||||
**客户门户 vs 运营端导航(差异约定):**
|
**客户门户 vs 运营端导航(差异约定):**
|
||||||
|
|
||||||
| | 运营端 | 客户门户 |
|
| | 运营端 | 客户门户 |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| 顶栏 | 一级模块 + hover 二级 + 右侧余额/打印/用户 | **无顶栏** |
|
| 顶栏 | 左对齐半透明白菜单坞 + 右侧工具;选中约 9% 主色;页签降权并对齐菜单文字起点;磁吸滑块稳重缓动 | **无顶栏** |
|
||||||
| 页签 | TabBar 多页签 | **无多页签**(当前页仅由侧栏高亮表达) |
|
| 页签 | TabBar 多页签 | **无多页签**(当前页仅由侧栏高亮表达) |
|
||||||
| 侧栏 | 无全局侧栏 | **全高可折叠左栏**(默认展开):顶 Logo;中按「常用 / 仓储 / 更多」浅分组;**资产与账户收进用户下拉**;底沉余额/打印(含下载)/消息/仓库;**语言收进用户菜单** |
|
| 侧栏 | 无全局侧栏 | **全高可折叠左栏**(默认展开):顶 Logo;中按「常用 / 仓储 / 更多」浅分组;**资产与账户收进用户下拉**;底沉余额/打印(含下载)/消息/仓库;**语言收进用户菜单** |
|
||||||
| 高亮 | 路由最长路径匹配 | 侧栏最长路径匹配;账户类路由高亮底栏用户区 |
|
| 高亮 | 路由最长路径匹配 | 侧栏最长路径匹配;账户类路由高亮底栏用户区 |
|
||||||
@ -103,7 +103,7 @@ a-layout (垂直)
|
|||||||
| 项目 | 约定 |
|
| 项目 | 约定 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| 背景色 | `#f0f3f4`(与布局主内容区一致) |
|
| 背景色 | `#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 链衔接 |
|
| 参与主内容区高度 | `flex: 1; min-height: 0; display: flex; flex-direction: column;`,与 `PageLayout` 子节点 flex 链衔接 |
|
||||||
| 纵向滚动 | 页面根容器宜 `overflow-y: hidden`(或仅最外层允许滚动),**表格/Handsontable 在内部 `.list-wrap` / `.wtHolder` 滚动**,避免整页与表格双滚动条 |
|
| 纵向滚动 | 页面根容器宜 `overflow-y: hidden`(或仅最外层允许滚动),**表格/Handsontable 在内部 `.list-wrap` / `.wtHolder` 滚动**,避免整页与表格双滚动条 |
|
||||||
|
|
||||||
@ -539,7 +539,7 @@ const { t } = useI18n();
|
|||||||
|
|
||||||
### 13.2 容器类
|
### 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 **勿重复叠加**
|
- 白卡片:`*-page-card`、`*-section` 等,与 `.list-wrap` 的 padding **勿重复叠加**
|
||||||
- 列表区:`.list-wrap`,**四边 16px**(相对分区后的内容边缘)
|
- 列表区:`.list-wrap`,**四边 16px**(相对分区后的内容边缘)
|
||||||
- 表格工具栏:`table-toolbar`、`toolbar-left`、`toolbar-right`,工具栏 **`padding: 16px 16px 0`** 与列表对齐
|
- 表格工具栏:`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: 0` + 分区 padding)
|
||||||
- [ ] **`.list-wrap`**:`padding: 16px`、`flex: 1; min-height: 0`;需测高时 `ref` 挂在本层
|
- [ ] **`.list-wrap`**:`padding: 16px`、`flex: 1; min-height: 0`;需测高时 `ref` 挂在本层
|
||||||
- [ ] 工具栏使用 `table-toolbar`、`toolbar-left`、`toolbar-right`,工具栏 **`padding: 16px 16px 0`**
|
- [ ] 工具栏使用 `table-toolbar`、`toolbar-left`、`toolbar-right`,工具栏 **`padding: 16px 16px 0`**
|
||||||
|
|||||||
@ -326,6 +326,7 @@ html body .main-menu .menu-text {
|
|||||||
|
|
||||||
.app-portal-stage {
|
.app-portal-stage {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-portal-stage--iris {
|
.app-portal-stage--iris {
|
||||||
@ -333,7 +334,7 @@ html body .main-menu .menu-text {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
min-height: 100dvh;
|
min-height: 100dvh;
|
||||||
/* 与登录页灰底一致,避免展开时露黑缝 */
|
/* 展开过渡仍用页面底色兜底,避免露黑缝 */
|
||||||
background: var(--app-page-bg, #f0f3f4);
|
background: var(--app-page-bg, #f0f3f4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,9 +3,28 @@
|
|||||||
--app-primary-color: #054f74;
|
--app-primary-color: #054f74;
|
||||||
--app-primary-color-hover: #054b6e;
|
--app-primary-color-hover: #054b6e;
|
||||||
--app-primary-color-light: #eef3f6;
|
--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-sidebar-bg: #054f74;
|
||||||
--app-page-bg: #f0f3f4;
|
--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-bg: #ffffff;
|
||||||
--app-card-border: #e5e6eb;
|
--app-card-border: #e5e6eb;
|
||||||
--app-elevated-bg: #ffffff;
|
--app-elevated-bg: #ffffff;
|
||||||
@ -306,11 +325,38 @@ body {
|
|||||||
/* SimpleAdmin font stack */
|
/* SimpleAdmin font stack */
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
|
||||||
"Microsoft YaHei", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
|
"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;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
-webkit-font-smoothing: antialiased;
|
-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,
|
div,
|
||||||
span,
|
span,
|
||||||
input,
|
input,
|
||||||
|
|||||||
@ -102,6 +102,7 @@ onMounted(() => {
|
|||||||
{{ t('nav.contactService.shipWarehouse') }}
|
{{ t('nav.contactService.shipWarehouse') }}
|
||||||
</span>
|
</span>
|
||||||
<span class="contact-service__text">{{ labelText }}</span>
|
<span class="contact-service__text">{{ labelText }}</span>
|
||||||
|
<span v-if="variant === 'navbar'" class="contact-service__caret" aria-hidden="true" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<a-select
|
<a-select
|
||||||
@ -146,30 +147,50 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&--navbar {
|
&--navbar {
|
||||||
color: #fff;
|
color: var(--color-text-2, #4e5969);
|
||||||
|
|
||||||
.contact-service__label {
|
.contact-service__label {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
max-width: 180px;
|
gap: 4px;
|
||||||
|
max-width: 160px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
padding: 0 8px;
|
padding: 0 8px 0 10px;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 6px;
|
border-radius: 999px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
font-size: 13px;
|
font-size: 12px;
|
||||||
line-height: 28px;
|
font-weight: 500;
|
||||||
color: #fff;
|
letter-spacing: 0.02em;
|
||||||
|
line-height: 1;
|
||||||
|
color: var(--color-text-2, #4e5969);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
transition: background-color 0.15s ease, opacity 0.15s ease;
|
transition:
|
||||||
|
color 0.16s ease,
|
||||||
|
background-color 0.16s ease;
|
||||||
|
|
||||||
&:hover {
|
&: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 {
|
&--sider {
|
||||||
|
|||||||
@ -414,7 +414,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
padding: 0 6px 0 8px;
|
/* 与菜单坞内文字起点对齐:12 + 4 + 8(logo pad) + 32(logo) + 6 ≈ 62 */
|
||||||
|
padding: 0 12px 0 62px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
|
||||||
&.is-overflow-left::before,
|
&.is-overflow-left::before,
|
||||||
@ -429,10 +430,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.is-overflow-left::before {
|
&.is-overflow-left::before {
|
||||||
left: 26px;
|
left: 34px;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
90deg,
|
90deg,
|
||||||
var(--color-fill-1, #f0f3f4) 10%,
|
var(--app-page-bg, #f0f3f4) 10%,
|
||||||
transparent
|
transparent
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -441,7 +442,7 @@
|
|||||||
right: 72px;
|
right: 72px;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
270deg,
|
270deg,
|
||||||
var(--color-fill-1, #f0f3f4) 10%,
|
var(--app-page-bg, #f0f3f4) 10%,
|
||||||
transparent
|
transparent
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -456,7 +457,7 @@
|
|||||||
height: 22px;
|
height: 22px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 4px;
|
border-radius: 6px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--color-text-4);
|
color: var(--color-text-4);
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
@ -468,13 +469,15 @@
|
|||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--color-text-2);
|
color: var(--color-text-2);
|
||||||
background: var(--color-fill-2);
|
background: rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-bar-scroll {
|
.tab-bar-scroll {
|
||||||
flex: 1;
|
flex: 0 1 auto;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
width: max-content;
|
||||||
|
max-width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
@ -490,22 +493,25 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 2px;
|
width: max-content;
|
||||||
|
padding: 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
gap: 4px;
|
||||||
|
|
||||||
:deep(.arco-tag) {
|
:deep(.arco-tag) {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-right: 4px;
|
margin-right: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 4px;
|
border-radius: 8px;
|
||||||
height: 26px;
|
height: 22px;
|
||||||
line-height: 26px;
|
line-height: 22px;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
font-size: 12px;
|
font-size: 8px; /* 未选中:小 */
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
color: var(--color-text-2);
|
color: var(--color-text-3);
|
||||||
|
box-shadow: none;
|
||||||
transition:
|
transition:
|
||||||
background-color 0.15s ease,
|
background-color 0.15s ease,
|
||||||
color 0.15s ease,
|
color 0.15s ease,
|
||||||
@ -530,8 +536,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:not(.link-activated):hover {
|
&:not(.link-activated):hover {
|
||||||
background-color: var(--color-fill-2);
|
background-color: rgba(0, 0, 0, 0.04);
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
|
color: var(--color-text-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -542,9 +549,9 @@
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
margin-left: 4px;
|
margin-left: auto;
|
||||||
padding-left: 6px;
|
padding-left: 6px;
|
||||||
border-left: 1px solid var(--color-border-1);
|
border-left: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-bar-action {
|
.tab-bar-action {
|
||||||
@ -552,20 +559,20 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
height: 28px;
|
height: 24px;
|
||||||
min-width: 28px;
|
min-width: 24px;
|
||||||
padding: 0 8px;
|
padding: 0 6px;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 4px;
|
border-radius: 8px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--color-text-2);
|
color: var(--color-text-3);
|
||||||
font-size: 13px;
|
font-size: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color 0.15s ease, color 0.15s ease;
|
transition: background-color 0.15s ease, color 0.15s ease;
|
||||||
|
|
||||||
&:hover:not(:disabled) {
|
&:hover:not(:disabled) {
|
||||||
color: var(--color-text-1);
|
color: var(--color-text-1);
|
||||||
background: var(--color-fill-2);
|
background: rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:disabled {
|
&:disabled {
|
||||||
@ -575,11 +582,11 @@
|
|||||||
|
|
||||||
&--icon {
|
&--icon {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 28px;
|
width: 24px;
|
||||||
|
|
||||||
:deep(svg) {
|
:deep(svg) {
|
||||||
width: 18px;
|
width: 16px;
|
||||||
height: 18px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -277,17 +277,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tag-link {
|
.tag-link {
|
||||||
color: var(--color-text-2);
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-activated {
|
.link-activated {
|
||||||
background-color: color-mix(in srgb, var(--app-primary-color) 10%, transparent) !important;
|
/* 无色底:主色字 + 中等字重 */
|
||||||
border-radius: 4px !important;
|
background-color: transparent !important;
|
||||||
color: var(--app-primary-color) !important;
|
border-radius: 8px !important;
|
||||||
|
color: var(--app-primary-color, #054f74) !important;
|
||||||
padding: 0 8px !important;
|
padding: 0 8px !important;
|
||||||
height: 26px !important;
|
height: 24px !important;
|
||||||
line-height: 26px !important;
|
line-height: 24px !important;
|
||||||
border: 1px solid transparent !important;
|
border: 1px solid transparent !important;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
transition:
|
transition:
|
||||||
@ -296,24 +297,40 @@
|
|||||||
color 0.15s ease;
|
color 0.15s ease;
|
||||||
|
|
||||||
.tag-link {
|
.tag-link {
|
||||||
color: var(--app-primary-color) !important;
|
color: var(--app-primary-color, #054f74) !important;
|
||||||
font-weight: 600;
|
font-weight: 500;
|
||||||
|
font-size: 13px; /* 选中:大 */
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.arco-tag-close-btn),
|
:deep(.arco-tag-close-btn),
|
||||||
:deep(.arco-tag-refresh-btn) {
|
:deep(.arco-tag-refresh-btn) {
|
||||||
color: var(--app-primary-color) !important;
|
color: var(--color-text-3, #86909c) !important;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--app-primary-color) !important;
|
color: var(--color-text-1, #1d2129) !important;
|
||||||
background-color: color-mix(in srgb, var(--app-primary-color) 12%, transparent);
|
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 {
|
&: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;
|
border-color: transparent !important;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
|
||||||
|
:deep(.arco-tag-refresh-btn) {
|
||||||
|
width: 16px;
|
||||||
|
margin-right: 4px;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -335,12 +352,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
:deep(.arco-tag-refresh-btn) {
|
:deep(.arco-tag-refresh-btn) {
|
||||||
margin-right: 4px;
|
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sperate-line {
|
.sperate-line {
|
||||||
|
|||||||
@ -114,14 +114,14 @@ const onMessageMenuClick = (event: { key?: string }) => {
|
|||||||
min-width: 28px;
|
min-width: 28px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
padding: 0 6px;
|
padding: 0 6px;
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
transition: background-color 0.15s ease, opacity 0.15s ease, color 0.15s ease;
|
transition: background-color 0.15s ease, opacity 0.15s ease, color 0.15s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-dropdown-trigger:hover {
|
.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 {
|
.message-dropdown-trigger.is-emphasized {
|
||||||
|
|||||||
@ -634,7 +634,7 @@ const onMenuClick = async (event: { key: string }) => {
|
|||||||
max-width: 180px;
|
max-width: 180px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
@ -644,14 +644,14 @@ const onMenuClick = async (event: { key: string }) => {
|
|||||||
|
|
||||||
.user-dropdown-trigger.is-compact {
|
.user-dropdown-trigger.is-compact {
|
||||||
max-width: none;
|
max-width: none;
|
||||||
width: 32px;
|
width: 28px;
|
||||||
height: 32px;
|
height: 28px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-dropdown-trigger:hover {
|
.user-dropdown-trigger:hover {
|
||||||
background-color: rgba(255, 255, 255, 0.12);
|
background-color: rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
@ -660,7 +660,7 @@ const onMenuClick = async (event: { key: string }) => {
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
background: rgba(255, 255, 255, 0.16);
|
background: var(--color-fill-3, #e5e6eb);
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-avatar--fallback {
|
.user-avatar--fallback {
|
||||||
|
|||||||
@ -35,7 +35,7 @@ const props = withDefaults(
|
|||||||
quiet?: boolean;
|
quiet?: boolean;
|
||||||
/** 下拉位置;侧栏沉底用 tl */
|
/** 下拉位置;侧栏沉底用 tl */
|
||||||
dropdownPosition?: 'br' | 'bl' | 'tr' | 'tl' | 'rt' | 'rb';
|
dropdownPosition?: 'br' | 'bl' | 'tr' | 'tl' | 'rt' | 'rb';
|
||||||
/** navbar:顶栏深色;sider:客户/代理侧栏浅底 */
|
/** navbar:透明浅顶栏;sider:客户/代理侧栏浅底 */
|
||||||
variant?: 'navbar' | 'sider';
|
variant?: 'navbar' | 'sider';
|
||||||
}>(),
|
}>(),
|
||||||
{ quiet: false, dropdownPosition: 'br', variant: 'navbar' },
|
{ quiet: false, dropdownPosition: 'br', variant: 'navbar' },
|
||||||
@ -79,11 +79,11 @@ function changeLang({ key }: { key: string }) {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 28px;
|
width: 28px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
|
transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgba(255, 255, 255, 0.12);
|
background-color: rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-sider {
|
&.is-sider {
|
||||||
|
|||||||
@ -1,28 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="top-nav" class="top-nav" :class="{ tabNavEnable: tabNavEnable }">
|
<div id="top-nav" class="top-nav" :class="{ tabNavEnable: tabNavEnable }">
|
||||||
<div class="top-nav-header">
|
<div class="top-nav-header">
|
||||||
<!-- Logo 区域:点击跳转官网首页 -->
|
<!-- 左对齐菜单坞(与下方页签左缘对齐) -->
|
||||||
<a
|
|
||||||
v-if="navLogoSrc"
|
|
||||||
class="top-nav-logo"
|
|
||||||
href="/"
|
|
||||||
:title="brandCopy.navFullName"
|
|
||||||
@click="goOfficialSite"
|
|
||||||
>
|
|
||||||
<img :src="navLogoSrc" :alt="brandCopy.navName" />
|
|
||||||
<div class="top-nav-logo__brand">
|
|
||||||
<span class="top-nav-logo__name">{{ brandCopy.navName }}</span>
|
|
||||||
<span class="top-nav-logo__full">{{ brandCopy.navFullName }}</span>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- 顶部水平菜单:磁吸滑块 + 极速 hover 下拉 -->
|
|
||||||
<div
|
<div
|
||||||
class="top-nav-menu"
|
class="top-nav-menu"
|
||||||
ref="topMenuCon"
|
ref="topMenuCon"
|
||||||
@wheel="onMenuWheel"
|
@wheel="onMenuWheel"
|
||||||
@pointerleave="onMenuBarPointerLeave"
|
@pointerleave="onMenuBarPointerLeave"
|
||||||
>
|
>
|
||||||
|
<a
|
||||||
|
v-if="navLogoSrc"
|
||||||
|
class="top-nav-logo"
|
||||||
|
href="/"
|
||||||
|
:title="brandCopy.navFullName"
|
||||||
|
@click="goOfficialSite"
|
||||||
|
>
|
||||||
|
<img :src="navLogoSrc" :alt="brandCopy.navName" />
|
||||||
|
</a>
|
||||||
<div
|
<div
|
||||||
v-show="indicatorVisible"
|
v-show="indicatorVisible"
|
||||||
class="top-nav-menu-indicator"
|
class="top-nav-menu-indicator"
|
||||||
@ -125,7 +119,7 @@
|
|||||||
:data-menu-key="MORE_MENU_KEY"
|
:data-menu-key="MORE_MENU_KEY"
|
||||||
@pointerenter="onMenuItemPointerEnter(MORE_MENU_KEY)"
|
@pointerenter="onMenuItemPointerEnter(MORE_MENU_KEY)"
|
||||||
>
|
>
|
||||||
更多
|
{{ t('nav.more', '更多') }}
|
||||||
</span>
|
</span>
|
||||||
<template #content>
|
<template #content>
|
||||||
<!-- 客户扁平导航:溢出项直接列表,不按一级分组 -->
|
<!-- 客户扁平导航:溢出项直接列表,不按一级分组 -->
|
||||||
@ -179,93 +173,106 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 右侧操作区 -->
|
<!-- 右侧操作区:无坞;分组 + 细分割线,工具条感 -->
|
||||||
<div class="top-nav-right">
|
<div class="top-nav-right">
|
||||||
<!-- 余额(仅客户门户):放在打印图标左侧 -->
|
<!-- 余额(仅客户门户) -->
|
||||||
<div v-if="showBalanceNav" class="top-nav-right-item">
|
<div v-if="showBalanceNav" class="top-nav-right-cluster">
|
||||||
<a-dropdown trigger="hover" position="br">
|
<div class="top-nav-right-item">
|
||||||
<div class="balance-dropdown-trigger">
|
<a-dropdown trigger="hover" position="br">
|
||||||
<span class="balance-label">{{ t('nav.balance.label') }}:</span>
|
<div class="balance-dropdown-trigger">
|
||||||
<span class="balance-value">{{ balanceDisplay }}</span>
|
<span class="balance-label">{{ t('nav.balance.label') }}</span>
|
||||||
</div>
|
<span class="balance-value">{{ balanceDisplay }}</span>
|
||||||
<template #content>
|
</div>
|
||||||
<a-doption @click="() => onBalanceMenuClick({ key: 'recharge' })">
|
<template #content>
|
||||||
{{ t('nav.balance.recharge') }}
|
<a-doption @click="() => onBalanceMenuClick({ key: 'recharge' })">
|
||||||
</a-doption>
|
{{ t('nav.balance.recharge') }}
|
||||||
<a-doption @click="() => onBalanceMenuClick({ key: 'rechargeRecord' })">
|
</a-doption>
|
||||||
{{ t('nav.balance.rechargeRecord') }}
|
<a-doption @click="() => onBalanceMenuClick({ key: 'rechargeRecord' })">
|
||||||
</a-doption>
|
{{ t('nav.balance.rechargeRecord') }}
|
||||||
<a-doption @click="() => onBalanceMenuClick({ key: 'accountFlow' })">
|
</a-doption>
|
||||||
{{ t('nav.balance.accountFlow') }}
|
<a-doption @click="() => onBalanceMenuClick({ key: 'accountFlow' })">
|
||||||
</a-doption>
|
{{ t('nav.balance.accountFlow') }}
|
||||||
<a-doption :disabled="balanceRefreshing" @click="onRefreshBalance">
|
</a-doption>
|
||||||
{{ t('nav.balance.refresh') }}
|
<a-doption :disabled="balanceRefreshing" @click="onRefreshBalance">
|
||||||
</a-doption>
|
{{ t('nav.balance.refresh') }}
|
||||||
</template>
|
</a-doption>
|
||||||
</a-dropdown>
|
</template>
|
||||||
|
</a-dropdown>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span v-if="showBalanceNav" class="top-nav-right-sep" aria-hidden="true" />
|
||||||
|
|
||||||
|
<div class="top-nav-right-cluster top-nav-right-cluster--meta">
|
||||||
|
<div class="top-nav-right-item top-nav-right-item--warehouse">
|
||||||
|
<ContactService variant="navbar" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="top-nav-right-item top-nav-right-item--icon">
|
<span class="top-nav-right-sep" aria-hidden="true" />
|
||||||
<a-tooltip
|
|
||||||
position="bottom"
|
<div class="top-nav-right-cluster">
|
||||||
:disabled="printConnectionState.connecting"
|
<div class="top-nav-right-item top-nav-right-item--icon">
|
||||||
:mouse-enter-delay="0"
|
<a-tooltip
|
||||||
:mouse-leave-delay="0"
|
position="bottom"
|
||||||
>
|
:disabled="printConnectionState.connecting"
|
||||||
<template #content>
|
:mouse-enter-delay="0"
|
||||||
<span>{{ printConnectionTitle }}</span>
|
:mouse-leave-delay="0"
|
||||||
</template>
|
|
||||||
<span
|
|
||||||
class="print-connection-trigger"
|
|
||||||
role="button"
|
|
||||||
tabindex="0"
|
|
||||||
:class="{
|
|
||||||
'is-enabled': printConnectionState.enabled,
|
|
||||||
'is-loading': printConnectionState.connecting,
|
|
||||||
}"
|
|
||||||
@click.prevent="onPrintConnectionClick"
|
|
||||||
@keydown.enter.prevent="onPrintConnectionClick"
|
|
||||||
>
|
>
|
||||||
<icon-printer class="print-connection-icon" />
|
<template #content>
|
||||||
<span class="print-connection-dot" aria-hidden="true" />
|
<span>{{ printConnectionTitle }}</span>
|
||||||
</span>
|
</template>
|
||||||
</a-tooltip>
|
<span
|
||||||
|
class="print-connection-trigger"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
:class="{
|
||||||
|
'is-enabled': printConnectionState.enabled,
|
||||||
|
'is-loading': printConnectionState.connecting,
|
||||||
|
}"
|
||||||
|
@click.prevent="onPrintConnectionClick"
|
||||||
|
@keydown.enter.prevent="onPrintConnectionClick"
|
||||||
|
>
|
||||||
|
<icon-printer class="print-connection-icon" />
|
||||||
|
<span class="print-connection-dot" aria-hidden="true" />
|
||||||
|
</span>
|
||||||
|
</a-tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="top-nav-right-item top-nav-right-item--icon">
|
||||||
|
<a-tooltip position="bottom" :mouse-enter-delay="0" :mouse-leave-delay="0">
|
||||||
|
<template #content>
|
||||||
|
<span>{{ t('nav.printControl.download') }}</span>
|
||||||
|
</template>
|
||||||
|
<a
|
||||||
|
class="print-connection-trigger print-control-download"
|
||||||
|
:href="PRINT_CONTROL_DOWNLOAD_URL"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
:aria-label="t('nav.printControl.download')"
|
||||||
|
>
|
||||||
|
<icon-download class="print-connection-icon" />
|
||||||
|
</a>
|
||||||
|
</a-tooltip>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="top-nav-right-item top-nav-right-item--icon">
|
<span class="top-nav-right-sep" aria-hidden="true" />
|
||||||
<a-tooltip position="bottom" :mouse-enter-delay="0" :mouse-leave-delay="0">
|
|
||||||
<template #content>
|
<div class="top-nav-right-cluster">
|
||||||
<span>{{ t('nav.printControl.download') }}</span>
|
<div class="top-nav-right-item top-nav-right-item--icon">
|
||||||
</template>
|
<RightTopMessage />
|
||||||
<a
|
</div>
|
||||||
class="print-connection-trigger print-control-download"
|
<div class="top-nav-right-item top-nav-right-item--icon">
|
||||||
:href="PRINT_CONTROL_DOWNLOAD_URL"
|
<SelectLang />
|
||||||
target="_blank"
|
</div>
|
||||||
rel="noopener noreferrer"
|
|
||||||
:aria-label="t('nav.printControl.download')"
|
|
||||||
>
|
|
||||||
<icon-download class="print-connection-icon" />
|
|
||||||
</a>
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="top-nav-right-item top-nav-right-item--warehouse">
|
<span class="top-nav-right-sep" aria-hidden="true" />
|
||||||
<ContactService variant="navbar" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 消息:站内信 / 公告 -->
|
<div class="top-nav-right-cluster top-nav-right-cluster--user">
|
||||||
<div class="top-nav-right-item top-nav-right-item--icon">
|
<div class="top-nav-right-item user-menu-item">
|
||||||
<RightTopMessage />
|
<RightTopUser compact />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 语言 -->
|
|
||||||
<div class="top-nav-right-item top-nav-right-item--icon">
|
|
||||||
<SelectLang />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 用户 -->
|
|
||||||
<div class="top-nav-right-item user-menu-item">
|
|
||||||
<RightTopUser />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -678,7 +685,7 @@ const visibleTopMenus = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const MORE_MENU_KEY = '__more__';
|
const MORE_MENU_KEY = '__more__';
|
||||||
const MORE_BTN_RESERVE = 88;
|
const MORE_BTN_RESERVE = 64;
|
||||||
const fittedTopMenus = ref<any[]>([]);
|
const fittedTopMenus = ref<any[]>([]);
|
||||||
const overflowTopMenus = ref<any[]>([]);
|
const overflowTopMenus = ref<any[]>([]);
|
||||||
const isOverflowActive = computed(() =>
|
const isOverflowActive = computed(() =>
|
||||||
@ -716,14 +723,17 @@ async function recalcMenuOverflow() {
|
|||||||
const wrap = topMenuCon.value;
|
const wrap = topMenuCon.value;
|
||||||
if (!wrap) return;
|
if (!wrap) return;
|
||||||
|
|
||||||
const itemMargin = 32; // margin: 0 16px
|
const itemMargin = 6; // margin: 0 3px(程序坞内)
|
||||||
|
const logoEl = wrap.querySelector('.top-nav-logo') as HTMLElement | null;
|
||||||
|
const logoReserve = logoEl ? logoEl.offsetWidth + 8 : 0;
|
||||||
const widths = menus.map((item) => {
|
const widths = menus.map((item) => {
|
||||||
const el = menuItemEls.get(menuKey(item));
|
const el = menuItemEls.get(menuKey(item));
|
||||||
return (el?.offsetWidth || 72) + itemMargin;
|
return (el?.offsetWidth || 56) + itemMargin;
|
||||||
});
|
});
|
||||||
const totalNeeded = widths.reduce((sum, w) => sum + w, 0);
|
const totalNeeded = widths.reduce((sum, w) => sum + w, 0);
|
||||||
|
const menuBudget = Math.max(80, wrap.clientWidth - logoReserve);
|
||||||
|
|
||||||
if (totalNeeded <= wrap.clientWidth + 1) {
|
if (totalNeeded <= menuBudget + 1) {
|
||||||
fittedTopMenus.value = [...menus];
|
fittedTopMenus.value = [...menus];
|
||||||
overflowTopMenus.value = [];
|
overflowTopMenus.value = [];
|
||||||
await nextTick();
|
await nextTick();
|
||||||
@ -731,7 +741,7 @@ async function recalcMenuOverflow() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const available = Math.max(80, wrap.clientWidth - MORE_BTN_RESERVE);
|
const available = Math.max(80, menuBudget - MORE_BTN_RESERVE);
|
||||||
let used = 0;
|
let used = 0;
|
||||||
let fitCount = 0;
|
let fitCount = 0;
|
||||||
for (let i = 0; i < menus.length; i++) {
|
for (let i = 0; i < menus.length; i++) {
|
||||||
@ -1363,8 +1373,10 @@ onUnmounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@headerHeight: 50px;
|
@headerInsetTop: 6px;
|
||||||
@headerTabNavHeight: 36px;
|
@headerBarHeight: 52px;
|
||||||
|
@headerHeight: (@headerInsetTop + @headerBarHeight); // 58:容纳 44px 菜单坞
|
||||||
|
@headerTabNavHeight: 28px;
|
||||||
|
|
||||||
.top-nav {
|
.top-nav {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -1372,139 +1384,146 @@ onUnmounted(() => {
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: @headerHeight;
|
height: @headerHeight;
|
||||||
box-shadow: 0 1px 4px rgba(114, 115, 116, 0.08);
|
padding-top: @headerInsetTop;
|
||||||
|
box-sizing: border-box;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
background: var(--app-navbar-bg);
|
/* 透出全局固着浅雾,与主内容同一张底 */
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
border-bottom: none;
|
||||||
|
|
||||||
&.tabNavEnable {
|
&.tabNavEnable {
|
||||||
height: (@headerHeight + @headerTabNavHeight);
|
height: (@headerHeight + @headerTabNavHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-nav-header {
|
.top-nav-header {
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: @headerHeight;
|
height: @headerBarHeight;
|
||||||
background: var(--app-navbar-bg) !important;
|
padding: 0 12px;
|
||||||
background-color: var(--app-navbar-bg) !important;
|
box-sizing: border-box;
|
||||||
color: #fff;
|
background: transparent !important;
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: var(--color-text-1, #1d2129);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
|
||||||
.top-nav-logo {
|
/* 左对齐白坞:宽随内容,与页签左缘同起点 */
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
padding: 0 16px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
img {
|
|
||||||
height: 36px;
|
|
||||||
width: 36px;
|
|
||||||
object-fit: contain;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-logo__brand {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
min-width: 0;
|
|
||||||
line-height: 1.15;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-logo__name {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 400;
|
|
||||||
letter-spacing: 0.08em;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-logo__full {
|
|
||||||
margin-top: 2px;
|
|
||||||
font-size: 10px;
|
|
||||||
font-weight: 500;
|
|
||||||
letter-spacing: 0.02em;
|
|
||||||
color: rgba(255, 255, 255, 0.72);
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-menu {
|
.top-nav-menu {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: @headerHeight;
|
z-index: 1;
|
||||||
line-height: @headerHeight;
|
flex: 0 1 auto;
|
||||||
flex: 1;
|
min-width: 0;
|
||||||
|
width: max-content;
|
||||||
|
max-width: calc(100% - 280px);
|
||||||
|
height: 44px;
|
||||||
|
margin-left: 4px;
|
||||||
|
padding: 0 12px 0 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
scroll-behavior: smooth;
|
scroll-behavior: smooth;
|
||||||
|
background: rgba(255, 255, 255, 0.94);
|
||||||
|
border-radius: 22px;
|
||||||
|
/* 单层短阴影 + 淡描边,避免多层发糊 */
|
||||||
|
border: 1px solid rgba(15, 23, 42, 0.06);
|
||||||
|
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
|
||||||
|
|
||||||
|
.top-nav-logo {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
margin-right: 6px;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 28px;
|
||||||
|
width: 28px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
object-fit: contain;
|
||||||
|
display: block;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.top-nav-menu-indicator {
|
.top-nav-menu-indicator {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
height: 32px;
|
height: 30px;
|
||||||
margin-top: -16px;
|
margin-top: -15px;
|
||||||
border-radius: 16px;
|
border-radius: 15px;
|
||||||
background-color: var(
|
/* 选中态克制:约 9% 主色,偏状态感而非按钮 */
|
||||||
--app-navbar-item-active-bg,
|
background-color: color-mix(
|
||||||
color-mix(in srgb, #ffffff 26%, var(--app-navbar-bg))
|
in srgb,
|
||||||
|
var(--app-primary-color, #054f74) 9%,
|
||||||
|
#fff
|
||||||
);
|
);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
will-change: transform, width;
|
will-change: transform, width;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
||||||
&.is-ready {
|
&.is-ready {
|
||||||
|
/* 稳重缓动,少弹跳 */
|
||||||
transition:
|
transition:
|
||||||
transform 0.14s cubic-bezier(0.22, 1, 0.36, 1),
|
transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
|
||||||
width 0.14s cubic-bezier(0.22, 1, 0.36, 1),
|
width 0.22s cubic-bezier(0.4, 0, 0.2, 1),
|
||||||
opacity 0.12s ease,
|
opacity 0.16s ease,
|
||||||
background-color 0.12s ease;
|
background-color 0.16s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 悬停非当前路由项:稍淡,强调「跟手预览」 */
|
|
||||||
&.is-hover {
|
&.is-hover {
|
||||||
opacity: 0.72;
|
opacity: 1;
|
||||||
background-color: color-mix(in srgb, #ffffff 18%, var(--app-navbar-bg));
|
background-color: rgba(0, 0, 0, 0.035);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-nav-menu-item {
|
.top-nav-menu-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
padding: 6px 16px;
|
align-items: center;
|
||||||
height: auto;
|
justify-content: center;
|
||||||
line-height: 1.5;
|
height: 30px;
|
||||||
|
padding: 0 14px;
|
||||||
|
line-height: 1;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #fff;
|
color: var(--color-text-2, #4e5969);
|
||||||
font-size: 16px;
|
font-size: 13px;
|
||||||
border-radius: 20px;
|
border-radius: 15px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
transition:
|
margin: 0 3px;
|
||||||
color 0.1s ease,
|
|
||||||
opacity 0.1s ease,
|
|
||||||
transform 0.1s cubic-bezier(0.22, 1, 0.36, 1);
|
|
||||||
margin: 0 10px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
transition: color 0.16s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #fff;
|
color: var(--color-text-1, #1d2129);
|
||||||
opacity: 0.95;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
transform: scale(0.97);
|
opacity: 0.85;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active,
|
&.active,
|
||||||
&.is-open {
|
&.is-open {
|
||||||
color: #fff;
|
color: var(--app-primary-color, #054f74);
|
||||||
|
font-weight: 600;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1515,36 +1534,52 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.top-nav-right {
|
.top-nav-right {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
white-space: nowrap;
|
justify-content: flex-end;
|
||||||
height: @headerHeight;
|
flex: 0 0 auto;
|
||||||
|
gap: 0;
|
||||||
|
margin-left: auto;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
|
height: @headerBarHeight;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
.top-nav-right-cluster {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 2px;
|
||||||
|
min-width: 0;
|
||||||
|
|
||||||
|
&--meta {
|
||||||
|
gap: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--user {
|
||||||
|
gap: 0;
|
||||||
|
padding-left: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-nav-right-sep {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 1px;
|
||||||
|
height: 14px;
|
||||||
|
margin: 0 8px;
|
||||||
|
background: rgba(15, 23, 42, 0.1);
|
||||||
|
border-radius: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
.top-nav-right-item {
|
.top-nav-right-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 10px;
|
padding: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&:not(:first-child)::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 32%;
|
|
||||||
width: 1px;
|
|
||||||
height: 36%;
|
|
||||||
background-color: rgba(255, 255, 255, 0.14);
|
|
||||||
}
|
|
||||||
|
|
||||||
&--icon {
|
|
||||||
padding: 0 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--warehouse {
|
&--warehouse {
|
||||||
padding: 0 8px;
|
max-width: 180px;
|
||||||
max-width: 240px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1553,43 +1588,46 @@ onUnmounted(() => {
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 28px;
|
width: 30px;
|
||||||
height: 28px;
|
height: 30px;
|
||||||
border-radius: 6px;
|
border-radius: 9px;
|
||||||
color: rgba(255, 255, 255, 0.72);
|
color: var(--color-text-3, #86909c);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
outline: none;
|
outline: none;
|
||||||
transition: color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
|
transition:
|
||||||
|
color 0.16s ease,
|
||||||
|
background-color 0.16s ease,
|
||||||
|
opacity 0.16s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #fff;
|
color: var(--color-text-1, #1d2129);
|
||||||
background-color: rgba(255, 255, 255, 0.12);
|
background-color: rgba(15, 23, 42, 0.045);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-enabled {
|
&.is-enabled {
|
||||||
color: #fff;
|
color: var(--color-text-1, #1d2129);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-loading {
|
&.is-loading {
|
||||||
opacity: 0.55;
|
opacity: 0.5;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-connection-icon {
|
.print-connection-icon {
|
||||||
font-size: 16px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-connection-dot {
|
.print-connection-dot {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 3px;
|
right: 5px;
|
||||||
bottom: 3px;
|
bottom: 5px;
|
||||||
width: 7px;
|
width: 6px;
|
||||||
height: 7px;
|
height: 6px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: rgba(255, 255, 255, 0.45);
|
background: var(--color-text-4, #c9cdd4);
|
||||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
|
box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.92);
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-connection-trigger.is-enabled .print-connection-dot {
|
.print-connection-trigger.is-enabled .print-connection-dot {
|
||||||
@ -1597,45 +1635,124 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.balance-dropdown-trigger {
|
.balance-dropdown-trigger {
|
||||||
display: flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: baseline;
|
||||||
|
gap: 6px;
|
||||||
|
height: 30px;
|
||||||
|
padding: 0 10px;
|
||||||
|
border-radius: 999px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 0 4px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: opacity 0.2s;
|
transition: background-color 0.16s ease;
|
||||||
font-weight: 500;
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: 0.8;
|
background-color: rgba(15, 23, 42, 0.045);
|
||||||
}
|
}
|
||||||
|
|
||||||
.balance-label {
|
.balance-label {
|
||||||
margin-right: 4px;
|
font-size: 11px;
|
||||||
opacity: 0.85;
|
font-weight: 500;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
color: var(--color-text-3, #86909c);
|
||||||
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
.balance-value {
|
.balance-value {
|
||||||
color: #fff;
|
font-size: 13px;
|
||||||
font-size: 14px;
|
font-weight: 600;
|
||||||
|
letter-spacing: -0.01em;
|
||||||
|
color: var(--color-text-1, #1d2129);
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-menu-item {
|
.user-menu-item {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
padding-right: 12px;
|
padding-right: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 统一消息 / 语言触控态 */
|
||||||
|
:deep(.dropDown) {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
min-width: 30px;
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 9px;
|
||||||
|
color: var(--color-text-3, #86909c);
|
||||||
|
transition:
|
||||||
|
color 0.16s ease,
|
||||||
|
background-color 0.16s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--color-text-1, #1d2129);
|
||||||
|
background-color: rgba(15, 23, 42, 0.045);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.message-dropdown-trigger) {
|
||||||
|
min-width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
padding: 0 6px;
|
||||||
|
border-radius: 9px;
|
||||||
|
color: var(--color-text-3, #86909c);
|
||||||
|
transition:
|
||||||
|
color 0.16s ease,
|
||||||
|
background-color 0.16s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--color-text-1, #1d2129);
|
||||||
|
background-color: rgba(15, 23, 42, 0.045);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.message-icon),
|
||||||
|
:deep(.lang-icon) {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.message-count) {
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
opacity: 0.85;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 用户头像:右侧锚点,轻描边即可,不做坞 */
|
||||||
|
:deep(.user-dropdown-trigger.is-compact) {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
border-radius: 50%;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.user-avatar) {
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
box-shadow:
|
||||||
|
0 0 0 1px rgba(15, 23, 42, 0.08),
|
||||||
|
0 1px 2px rgba(15, 23, 42, 0.06);
|
||||||
|
transition: box-shadow 0.16s ease, transform 0.16s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.user-dropdown-trigger:hover .user-avatar) {
|
||||||
|
box-shadow:
|
||||||
|
0 0 0 1px rgba(15, 23, 42, 0.12),
|
||||||
|
0 2px 6px rgba(15, 23, 42, 0.1);
|
||||||
|
transform: translateY(-0.5px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-nav-tabs {
|
.top-nav-tabs {
|
||||||
height: @headerTabNavHeight;
|
height: @headerTabNavHeight;
|
||||||
/* 与主内容区同色,避免单独「白条」容器感 */
|
/* 与顶栏/页面同色,去掉分隔线,页签像浮在同一块底上 */
|
||||||
background: var(--color-fill-1, #f0f3f4);
|
background: transparent;
|
||||||
border-bottom: 1px solid var(--color-border-1);
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1881,25 +1998,14 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 滚动条样式
|
// 程序坞内隐藏滚动条,溢出靠「更多」与滚轮
|
||||||
.top-nav-menu {
|
.top-nav-menu {
|
||||||
|
scrollbar-width: none;
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
height: 4px;
|
height: 0;
|
||||||
}
|
|
||||||
|
|
||||||
&::-webkit-scrollbar-thumb {
|
|
||||||
background-color: rgba(255, 255, 255, 0.3);
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-webkit-scrollbar-thumb:hover {
|
|
||||||
background-color: rgba(255, 255, 255, 0.5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 1100px) {
|
|
||||||
.top-nav-header .top-nav-logo__full {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -78,15 +78,16 @@
|
|||||||
|
|
||||||
// 仅运营端需要为 fixed 顶栏留白
|
// 仅运营端需要为 fixed 顶栏留白
|
||||||
const adminContentStyle = computed(() => {
|
const adminContentStyle = computed(() => {
|
||||||
const headerHeight = 50;
|
// 与 top-nav:上边距 6 + 栏高 52(+ 页签 28)对齐
|
||||||
const tabNavHeight = appStore.tabBar ? 36 : 0;
|
const headerHeight = 58;
|
||||||
|
const tabNavHeight = appStore.tabBar ? 28 : 0;
|
||||||
return { paddingTop: `${headerHeight + tabNavHeight}px` };
|
return { paddingTop: `${headerHeight + tabNavHeight}px` };
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
[class$='-container'] {
|
[class$='-container'] {
|
||||||
padding: 16px;
|
padding: var(--app-page-padding, 8px 16px 16px);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -99,13 +100,14 @@
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 运营端:与改前一致 */
|
/* 运营端:与改前一致 */
|
||||||
.layout-content {
|
.layout-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: var(--app-page-bg);
|
background-color: transparent;
|
||||||
transition: padding 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
transition: padding 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -4,16 +4,26 @@ import type { Component } from 'vue'
|
|||||||
/** 一级菜单默认图标(按 locale key) */
|
/** 一级菜单默认图标(按 locale key) */
|
||||||
export const TOP_MENU_DEFAULT_ICONS: Record<string, string> = {
|
export const TOP_MENU_DEFAULT_ICONS: Record<string, string> = {
|
||||||
'menu.home': 'IconDashboard',
|
'menu.home': 'IconDashboard',
|
||||||
|
'menu.assistant': 'IconRobot',
|
||||||
'menu.user': 'IconUser',
|
'menu.user': 'IconUser',
|
||||||
'menu.finance': 'IconStorage',
|
'menu.finance': 'IconStorage',
|
||||||
'menu.order': 'IconFile',
|
'menu.order': 'IconFile',
|
||||||
'menu.channel': 'IconLink',
|
'menu.channel': 'IconLink',
|
||||||
'menu.track': 'IconComputer',
|
'menu.track': 'IconLocation',
|
||||||
'menu.operation': 'IconSettings',
|
'menu.operation': 'IconSettings',
|
||||||
'menu.api': 'IconComputer',
|
'menu.warehouse': 'IconHome',
|
||||||
|
'menu.marketing': 'IconGift',
|
||||||
|
'menu.api': 'IconCode',
|
||||||
'menu.system': 'IconSettings',
|
'menu.system': 'IconSettings',
|
||||||
'menu.kb': 'IconBook',
|
'menu.kb': 'IconBook',
|
||||||
'menu.xhs': 'IconBook',
|
'menu.xhs': 'IconBook',
|
||||||
|
'menu.agentAdmin': 'IconUserGroup',
|
||||||
|
'menu.list': 'IconList',
|
||||||
|
'menu.form': 'IconEdit',
|
||||||
|
'menu.result': 'IconCheckCircle',
|
||||||
|
'menu.exception': 'IconExclamationCircle',
|
||||||
|
'menu.demo': 'IconApps',
|
||||||
|
'menu.example': 'IconApps',
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 子菜单默认图标(按 locale key) */
|
/** 子菜单默认图标(按 locale key) */
|
||||||
|
|||||||
@ -119,12 +119,15 @@ export function applyThemeColor(primaryHex: string): void {
|
|||||||
root.style.setProperty('--app-primary-color-light', primaryLight);
|
root.style.setProperty('--app-primary-color-light', primaryLight);
|
||||||
root.style.setProperty('--color-primary-light-1', primaryLight);
|
root.style.setProperty('--color-primary-light-1', primaryLight);
|
||||||
|
|
||||||
// 顶栏:日间用主色;夜间用深色壳(由 applyThemeMode / 下方分支写入)
|
// 顶栏:日间透明浅底(与页面同色),选中胶囊用主色淡底;夜间深色壳
|
||||||
if (isDark) {
|
if (isDark) {
|
||||||
applyNavbarDarkTokens();
|
applyNavbarDarkTokens();
|
||||||
} else {
|
} else {
|
||||||
root.style.setProperty('--app-navbar-bg', primary);
|
root.style.setProperty('--app-navbar-bg', 'var(--app-page-bg, #f0f3f4)');
|
||||||
root.style.setProperty('--app-navbar-item-active-bg', lightenHex(hex, 0.16));
|
root.style.setProperty(
|
||||||
|
'--app-navbar-item-active-bg',
|
||||||
|
`color-mix(in srgb, ${primary} 12%, #fff)`,
|
||||||
|
);
|
||||||
root.style.setProperty('--app-sidebar-bg', primary);
|
root.style.setProperty('--app-sidebar-bg', primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,6 +162,7 @@ export function applyThemeMode(mode: ThemeMode): void {
|
|||||||
root.setAttribute('data-theme', 'dark');
|
root.setAttribute('data-theme', 'dark');
|
||||||
// 同步写到 :root,避免仅依赖 body 变量时列表壳仍读到 global.less 的浅色默认值
|
// 同步写到 :root,避免仅依赖 body 变量时列表壳仍读到 global.less 的浅色默认值
|
||||||
root.style.setProperty('--app-page-bg', 'var(--color-bg-1)');
|
root.style.setProperty('--app-page-bg', 'var(--color-bg-1)');
|
||||||
|
root.style.setProperty('--app-page-bg-gradient', 'none');
|
||||||
root.style.setProperty('--app-card-bg', 'var(--color-bg-2)');
|
root.style.setProperty('--app-card-bg', 'var(--color-bg-2)');
|
||||||
root.style.setProperty('--app-card-border', 'var(--color-border-2)');
|
root.style.setProperty('--app-card-border', 'var(--color-border-2)');
|
||||||
root.style.setProperty('--app-elevated-bg', 'var(--color-bg-3)');
|
root.style.setProperty('--app-elevated-bg', 'var(--color-bg-3)');
|
||||||
@ -167,15 +171,19 @@ export function applyThemeMode(mode: ThemeMode): void {
|
|||||||
document.body.removeAttribute('arco-theme');
|
document.body.removeAttribute('arco-theme');
|
||||||
root.setAttribute('data-theme', 'light');
|
root.setAttribute('data-theme', 'light');
|
||||||
root.style.removeProperty('--app-page-bg');
|
root.style.removeProperty('--app-page-bg');
|
||||||
|
root.style.removeProperty('--app-page-bg-gradient');
|
||||||
root.style.removeProperty('--app-card-bg');
|
root.style.removeProperty('--app-card-bg');
|
||||||
root.style.removeProperty('--app-card-border');
|
root.style.removeProperty('--app-card-border');
|
||||||
root.style.removeProperty('--app-elevated-bg');
|
root.style.removeProperty('--app-elevated-bg');
|
||||||
// 恢复日间主色顶栏
|
// 恢复日间透明浅顶栏
|
||||||
const primary =
|
const primary =
|
||||||
getComputedStyle(root).getPropertyValue('--app-primary-color').trim() ||
|
getComputedStyle(root).getPropertyValue('--app-primary-color').trim() ||
|
||||||
DEFAULT_THEME_COLOR;
|
DEFAULT_THEME_COLOR;
|
||||||
root.style.setProperty('--app-navbar-bg', primary);
|
root.style.setProperty('--app-navbar-bg', 'var(--app-page-bg, #f0f3f4)');
|
||||||
root.style.setProperty('--app-navbar-item-active-bg', lightenHex(primary, 0.16));
|
root.style.setProperty(
|
||||||
|
'--app-navbar-item-active-bg',
|
||||||
|
`color-mix(in srgb, ${primary} 12%, #fff)`,
|
||||||
|
);
|
||||||
root.style.setProperty('--app-sidebar-bg', primary);
|
root.style.setProperty('--app-sidebar-bg', primary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2663,7 +2663,7 @@
|
|||||||
.waybill-manage-container {
|
.waybill-manage-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 16px 16px 24px;
|
padding: var(--app-page-padding-list, 8px 16px 16px);
|
||||||
background-color: var(--app-page-bg);
|
background-color: var(--app-page-bg);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
@ -2687,7 +2687,7 @@
|
|||||||
.tabs-actions-section {
|
.tabs-actions-section {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
padding: 10px 16px;
|
padding: 6px 16px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
border-bottom: 1px solid var(--color-border-2);
|
border-bottom: 1px solid var(--color-border-2);
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -2696,7 +2696,7 @@
|
|||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
min-height: 52px;
|
min-height: 44px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.tabs-slot {
|
.tabs-slot {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user