diff --git a/package.json b/package.json
index 5d76e2c..a476a1f 100644
--- a/package.json
+++ b/package.json
@@ -48,6 +48,7 @@
"@codemirror/state": "^6.5.4",
"@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.39.17",
+ "@fontsource/nunito": "^5.3.0",
"@handsontable/vue3": "^16.2.0",
"@types/lodash-es": "^4.17.12",
"@vueuse/core": "^9.3.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9130bea..316ef6e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -36,6 +36,9 @@ importers:
'@codemirror/view':
specifier: ^6.39.17
version: 6.39.17
+ '@fontsource/nunito':
+ specifier: ^5.3.0
+ version: 5.3.0
'@handsontable/vue3':
specifier: ^16.2.0
version: 16.2.0(handsontable@16.2.0)(vue@3.5.18(typescript@4.9.5))
@@ -932,6 +935,9 @@ packages:
'@floating-ui/utils@0.2.10':
resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==}
+ '@fontsource/nunito@5.3.0':
+ resolution: {integrity: sha512-vw9TaTQJ/zpEpKrsODuPmOvaVjXgdda6B+xXA4YqjrdeJ62MLgVoDerdRXFQHyBnSCt2yQ2nHKCHPP/Pv7Xq4Q==}
+
'@handsontable/pikaday@1.0.0':
resolution: {integrity: sha512-1VN6N38t5/DcjJ7y7XUYrDx1LuzvvzlrFdBdMG90Qo1xc8+LXHqbWbsTEm5Ec5gXTEbDEO53vUT35R+2COmOyg==}
@@ -7969,6 +7975,8 @@ snapshots:
'@floating-ui/utils@0.2.10': {}
+ '@fontsource/nunito@5.3.0': {}
+
'@handsontable/pikaday@1.0.0': {}
'@handsontable/vue3@16.2.0(handsontable@16.2.0)(vue@3.5.18(typescript@4.9.5))':
@@ -12984,7 +12992,7 @@ snapshots:
dependencies:
htmlparser2: 3.10.1
postcss: 7.0.39
- postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39)
+ postcss-syntax: 0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39)
postcss-html@1.8.0:
dependencies:
@@ -12997,7 +13005,7 @@ snapshots:
dependencies:
'@babel/core': 7.28.0
postcss: 7.0.39
- postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39)
+ postcss-syntax: 0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39)
transitivePeerDependencies:
- supports-color
@@ -13012,7 +13020,7 @@ snapshots:
postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39):
dependencies:
postcss: 7.0.39
- postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39)
+ postcss-syntax: 0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39)
remark: 10.0.1
unist-util-find-all-after: 1.0.5
@@ -13064,7 +13072,7 @@ snapshots:
dependencies:
postcss: 8.5.6
- postcss-syntax@0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39):
+ postcss-syntax@0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39):
dependencies:
postcss: 7.0.39
optionalDependencies:
@@ -14126,7 +14134,7 @@ snapshots:
postcss-sass: 0.3.5
postcss-scss: 2.1.1
postcss-selector-parser: 3.1.2
- postcss-syntax: 0.36.2(postcss-html@0.36.0(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-scss@2.1.1)(postcss@7.0.39)
+ postcss-syntax: 0.36.2(postcss-html@0.36.0)(postcss-jsx@0.36.4(postcss-syntax@0.36.2(postcss-html@1.8.0)(postcss@8.5.6))(postcss@7.0.39))(postcss-less@3.1.4)(postcss-markdown@0.36.0)(postcss-scss@2.1.1)(postcss@7.0.39)
postcss-value-parser: 3.3.1
resolve-from: 4.0.0
signal-exit: 3.0.7
diff --git a/src/components.d.ts b/src/components.d.ts
index c2cf86f..a9819b2 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -22,6 +22,7 @@ declare module 'vue' {
CodeMirror: typeof import('./components/CodeMirror/index.vue')['default']
CompleteContactModal: typeof import('./components/CompleteContactModal/index.vue')['default']
ContactService: typeof import('./components/ContactService/index.vue')['default']
+ CustomerPortalTopTools: typeof import('./components/customer-side-rail/CustomerPortalTopTools.vue')['default']
CustomerSideRail: typeof import('./components/customer-side-rail/index.vue')['default']
CustomLeftMenu: typeof import('./components/CustomLeftMenu/index.vue')['default']
CustomList: typeof import('./components/CustomList/index.vue')['default']
diff --git a/src/components/customer-side-rail/CustomerPortalTopTools.vue b/src/components/customer-side-rail/CustomerPortalTopTools.vue
new file mode 100644
index 0000000..a9341a0
--- /dev/null
+++ b/src/components/customer-side-rail/CustomerPortalTopTools.vue
@@ -0,0 +1,326 @@
+
+
+
+
+
+
+
diff --git a/src/components/customer-side-rail/index.vue b/src/components/customer-side-rail/index.vue
index 09ae7c2..3cee1f6 100644
--- a/src/components/customer-side-rail/index.vue
+++ b/src/components/customer-side-rail/index.vue
@@ -5,10 +5,11 @@
'is-collapsed': collapsed,
'is-compact': compactLayout,
'is-animating': animating,
+ 'is-resizing': resizing,
}"
:style="{
width: `${railWidth}px`,
- '--csr-shell-width': `${CUSTOMER_SIDE_RAIL_EXPANDED_WIDTH}px`,
+ '--csr-shell-width': `${expandedWidth}px`,
}"
aria-label="客户门户导航"
@transitionend="onRailTransitionEnd"
@@ -56,7 +57,6 @@
:key="navKey(item)"
:content="formatTitle(item)"
position="right"
- :disabled="!compactLayout"
>
-
+
-
-
-
-
-
-
-
- {{ printConnectionTitle }}
-
-
- {{ t('nav.printControl.download') }}
-
-
-
-
-
-
-
-
+
+
@@ -579,7 +453,7 @@ onUnmounted(() => {
--csr-radius: 16px;
--csr-panel-radius: 16px;
--csr-panel-inset: 16px;
- --csr-shell-width: 200px;
+ --csr-shell-width: 180px;
--csr-ease: cubic-bezier(0.32, 0.72, 0, 1);
--csr-dur: 0.3s;
@@ -592,15 +466,51 @@ onUnmounted(() => {
overflow: hidden;
background: var(--app-card-bg, #fff);
border-radius: var(--csr-panel-radius);
+ position: relative;
/* 外层只动画宽度;内容在 shell 内固定宽,不随变窄重排(Linear / Notion) */
transition: width var(--csr-dur) var(--csr-ease);
will-change: width;
z-index: 10;
+ &.is-resizing {
+ transition: none;
+ will-change: width;
+ }
+
@media (prefers-reduced-motion: reduce) {
--csr-dur: 0.01ms;
}
+ &__resize {
+ position: absolute;
+ top: 10px;
+ right: -3px;
+ bottom: 10px;
+ width: 6px;
+ z-index: 3;
+ cursor: col-resize;
+ touch-action: none;
+ border-radius: 999px;
+
+ &::after {
+ content: '';
+ position: absolute;
+ top: 50%;
+ left: 2px;
+ width: 2px;
+ height: 28px;
+ margin-top: -14px;
+ border-radius: 1px;
+ background: transparent;
+ transition: background-color 0.15s ease;
+ }
+
+ &:hover::after,
+ .customer-side-rail.is-resizing &::after {
+ background: color-mix(in srgb, var(--app-primary-color, #1d7281) 55%, transparent);
+ }
+ }
+
&__shell {
width: var(--csr-shell-width);
height: 100%;
@@ -644,33 +554,6 @@ onUnmounted(() => {
border-bottom: 1px solid var(--color-border-2, rgba(0, 0, 0, 0.06));
}
- &__message-slot {
- min-width: 0;
- display: flex;
- align-items: center;
- justify-content: center;
-
- :deep(.message-dropdown-trigger) {
- width: 32px;
- max-width: none;
- height: 32px;
- justify-content: center;
- padding: 0;
- border-radius: 6px;
- color: var(--color-text-2);
- gap: 0;
- }
-
- :deep(.message-dropdown-trigger:hover) {
- color: var(--color-text-1);
- background: rgba(255, 255, 255, 0.85);
- }
-
- :deep(.message-label) {
- display: none;
- }
- }
-
&__brand-logo {
display: block;
width: 40px;
@@ -783,10 +666,10 @@ onUnmounted(() => {
position: relative;
display: flex;
align-items: center;
- gap: 12px;
+ gap: 8px;
width: 100%;
min-height: var(--csr-item-h);
- padding: 0 12px 0 14px;
+ padding: 0 12px 0 8px;
border: none;
border-radius: 10px;
background: transparent;
@@ -803,29 +686,45 @@ onUnmounted(() => {
background: rgba(15, 23, 42, 0.04);
}
- /* 选中:实心主色胶囊(无描边框),白字 + 图标浅底 */
+ /* Linear 式:浅底 + 左侧选中点 */
&.active {
- color: #fff;
- background: var(--app-primary-color, #054f74);
+ color: var(--app-primary-color, #1d7281);
+ background: color-mix(in srgb, var(--app-primary-color, #1d7281) 10%, #fff);
font-weight: 600;
box-shadow: none;
+ .customer-side-rail__active-dot {
+ background: var(--app-primary-color, #1d7281);
+ box-shadow: 0 0 0 3px
+ color-mix(in srgb, var(--app-primary-color, #1d7281) 18%, transparent);
+ }
+
.customer-side-rail__icon {
- color: #fff;
- background: rgba(255, 255, 255, 0.16);
+ color: var(--app-primary-color, #1d7281);
+ background: color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, #fff);
}
.customer-side-rail__text {
- color: #fff;
+ color: var(--app-primary-color, #1d7281);
}
&:hover {
- color: #fff;
- background: color-mix(in srgb, var(--app-primary-color, #054f74) 88%, #000);
+ background: color-mix(in srgb, var(--app-primary-color, #1d7281) 14%, #fff);
}
}
}
+ &__active-dot {
+ flex-shrink: 0;
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: transparent;
+ transition:
+ background-color 0.16s ease,
+ box-shadow 0.16s ease;
+ }
+
&__icon {
display: inline-flex;
align-items: center;
@@ -861,76 +760,12 @@ onUnmounted(() => {
flex-shrink: 0;
display: flex;
flex-direction: column;
- gap: 6px;
+ gap: 0;
padding: 8px var(--csr-pad-x) 12px;
border-top: 1px solid var(--color-border-2, rgba(0, 0, 0, 0.06));
}
- /* 一级:当前仓 + 收起 同行 */
- &__warehouse-row {
- display: flex;
- align-items: center;
- gap: 2px;
- min-width: 0;
- width: 100%;
- }
-
- &__warehouse-chip {
- display: flex;
- align-items: center;
- gap: 8px;
- flex: 1;
- min-width: 0;
- height: 40px;
- padding: 0 10px;
- border: none;
- border-radius: 8px;
- background: transparent;
- box-shadow: none;
- color: var(--color-text-1);
- cursor: pointer;
- text-align: left;
- transition: background-color 0.14s ease;
-
- &:hover {
- background: color-mix(in srgb, var(--app-primary-color, #1d7281) 8%, transparent);
- }
-
- &.is-compact {
- flex: 0 0 auto;
- width: 40px;
- height: 40px;
- padding: 0;
- justify-content: center;
- gap: 0;
- }
- }
-
- &__warehouse-chip-icon {
- flex-shrink: 0;
- font-size: 16px;
- color: var(--color-text-3);
- }
-
- &__warehouse-chip-body {
- flex: 1;
- min-width: 0;
- display: flex;
- flex-direction: column;
- gap: 1px;
- }
-
- &__warehouse-chip-name {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: 13px;
- font-weight: 400;
- line-height: 1.25;
- color: var(--color-text-2);
- }
-
- /* 底栏:头像 + 消息 + 打印,三等分铺满 */
+ /* 底栏:头像 + 收起 */
&__toolbar {
display: flex;
align-items: center;
@@ -941,17 +776,6 @@ onUnmounted(() => {
padding: 2px 4px;
border-radius: 8px;
background: transparent;
- transition:
- background-color 0.14s ease,
- box-shadow 0.14s ease;
-
- > * {
- flex: 1 1 0;
- min-width: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- }
&.is-account-active {
:deep(.user-dropdown-trigger) {
@@ -960,73 +784,44 @@ onUnmounted(() => {
}
}
- &__tool {
- position: relative;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
- width: 32px;
- height: 32px;
- border: none;
- border-radius: 6px;
- background: transparent;
- color: var(--color-text-3);
- cursor: pointer;
- text-decoration: none;
- font-size: 14px;
- transition: color 0.14s ease, background-color 0.14s ease;
-
- &:hover {
- color: var(--color-text-1);
- background: rgba(255, 255, 255, 0.85);
- }
-
- &.is-enabled {
- color: var(--app-primary-color);
- }
-
- &.is-loading {
- opacity: 0.6;
- pointer-events: none;
- }
-
- &--print {
- opacity: 0.9;
- }
- }
-
- &__tool-dot {
- position: absolute;
- top: 5px;
- right: 5px;
- width: 5px;
- height: 5px;
- border-radius: 50%;
- background: var(--color-text-4, #c9cdd4);
- }
-
- &__tool.is-enabled &__tool-dot {
- background: rgb(var(--green-6));
- }
-
&__user {
display: flex;
align-items: center;
- justify-content: center;
+ flex: 1;
+ min-width: 0;
- :deep(.user-dropdown-trigger),
- :deep(.user-dropdown-trigger.is-compact) {
+ :deep(.user-dropdown-trigger) {
+ width: 100%;
+ max-width: none;
+ height: 40px;
+ padding: 0 8px 0 4px;
+ margin: 0;
+ gap: 10px;
+ justify-content: flex-start;
+ color: var(--color-text-1);
+ border-radius: 10px;
+ }
+
+ :deep(.user-avatar) {
width: 32px;
height: 32px;
- padding: 0;
- margin: 0;
- justify-content: center;
+ }
+
+ :deep(.user-avatar--fallback) {
+ font-size: 14px;
+ }
+
+ :deep(.user-name) {
+ max-width: none;
+ flex: 1;
+ min-width: 0;
+ font-size: 14px;
+ font-weight: 600;
color: var(--color-text-1);
}
:deep(.user-dropdown-trigger:hover) {
- background: rgba(255, 255, 255, 0.85);
+ background: rgba(15, 23, 42, 0.04);
}
}
@@ -1036,9 +831,9 @@ onUnmounted(() => {
justify-content: center;
flex-shrink: 0;
width: 32px;
- height: 32px;
+ height: 40px;
border: none;
- border-radius: 6px;
+ border-radius: 8px;
background: transparent;
color: var(--color-text-3);
cursor: pointer;
@@ -1046,7 +841,7 @@ onUnmounted(() => {
&:hover {
color: var(--app-primary-color);
- background: rgba(255, 255, 255, 0.65);
+ background: rgba(15, 23, 42, 0.04);
}
}
@@ -1109,87 +904,60 @@ onUnmounted(() => {
justify-content: center;
border-radius: var(--csr-radius);
- /* 收起态用整块高亮,不再用左边条(裁切后会偏) */
- &::before {
- display: none;
- }
-
&:hover {
background: color-mix(in srgb, var(--app-primary-color, #1d7281) 8%, #fff);
}
&.active {
- background: color-mix(in srgb, var(--app-primary-color, #1d7281) 14%, #fff);
- box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-primary-color, #1d7281) 22%, transparent);
+ background: color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, #fff);
+ box-shadow: none;
}
}
+ .customer-side-rail__active-dot {
+ position: absolute;
+ top: 5px;
+ right: 5px;
+ width: 5px;
+ height: 5px;
+ }
+
.customer-side-rail__text {
display: none;
}
.customer-side-rail__dock {
align-items: center;
- gap: 6px;
padding: 8px 0 10px;
}
- .customer-side-rail__warehouse-row {
- width: 40px;
- flex-direction: column;
- align-items: center;
- gap: 2px;
- }
-
- .customer-side-rail__warehouse-chip {
- width: 40px;
- height: 40px;
- padding: 0;
- justify-content: center;
- }
-
.customer-side-rail__toolbar {
width: 40px;
flex-direction: column;
align-items: center;
gap: 2px;
padding: 2px;
- background: transparent;
- box-shadow: none;
-
- &.is-account-active {
- background: transparent;
- box-shadow: none;
- }
}
.customer-side-rail__user {
- width: 32px;
+ width: 36px;
flex: 0 0 auto;
- }
+ justify-content: center;
- .customer-side-rail__message-slot {
- width: 32px;
- flex: 0 0 auto;
-
- :deep(.message-dropdown-trigger) {
- width: 32px;
- max-width: none;
- height: 32px;
+ :deep(.user-dropdown-trigger),
+ :deep(.user-dropdown-trigger.is-compact) {
+ width: 36px;
+ height: 36px;
padding: 0;
- background: transparent;
+ justify-content: center;
}
- :deep(.message-count) {
- display: none;
+ :deep(.user-avatar) {
+ width: 28px;
+ height: 28px;
}
}
- .customer-side-rail__tool {
- width: 32px;
- height: 32px;
- }
-
.customer-side-rail__toggle {
width: 32px;
height: 32px;
diff --git a/src/components/top-nav/RightTopUser.vue b/src/components/top-nav/RightTopUser.vue
index 61cfd4b..95eda12 100644
--- a/src/components/top-nav/RightTopUser.vue
+++ b/src/components/top-nav/RightTopUser.vue
@@ -18,116 +18,76 @@
{{ displayName }}
-
+
-
-
-
-
-
-
-
+
+ 账户
+
+
+
+
+ 设置
+
+
+
+
+
+