优化
This commit is contained in:
@@ -43,6 +43,8 @@ const visibleNavigation = computed(() => filterNavigationByPermissions(clientNav
|
|||||||
|
|
||||||
const activeParentKeys = computed(() => new Set(getNavigationParentKeys(visibleNavigation.value, props.activePath)))
|
const activeParentKeys = computed(() => new Set(getNavigationParentKeys(visibleNavigation.value, props.activePath)))
|
||||||
const openedKeys = ref<ReadonlySet<string>>(new Set(activeParentKeys.value))
|
const openedKeys = ref<ReadonlySet<string>>(new Set(activeParentKeys.value))
|
||||||
|
// Expand the order group by default so the three customer order shortcuts are visible.
|
||||||
|
openedKeys.value = new Set([...openedKeys.value, 'order-center'])
|
||||||
|
|
||||||
function handleToggle(key: string) {
|
function handleToggle(key: string) {
|
||||||
const next = new Set(openedKeys.value)
|
const next = new Set(openedKeys.value)
|
||||||
|
|||||||
@@ -52,13 +52,13 @@ test('keeps standalone business pages at the client sidebar root', () => {
|
|||||||
{ title: '首页', children: undefined },
|
{ title: '首页', children: undefined },
|
||||||
{
|
{
|
||||||
title: '订单中心',
|
title: '订单中心',
|
||||||
children: ['头程订单', '入库订单', '派送订单', '海外采购', '美国本土卡', '美本土散板'],
|
children: ['头程订单', '入库订单', '派送订单'],
|
||||||
},
|
},
|
||||||
{ title: '报关资料', children: undefined },
|
{ title: '报关资料', children: undefined },
|
||||||
{ title: '船期价格', children: undefined },
|
{ title: '船期价格', children: undefined },
|
||||||
{
|
{
|
||||||
title: '海外仓',
|
title: '海外仓',
|
||||||
children: ['贴标申请', '仓储转运', '货物废弃', '退货换标'],
|
children: ['贴标申请', '仓储转运', '货物废弃', '退货换标', '海外采购', '美国本土卡', '美本土散板'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '费用与账单',
|
title: '费用与账单',
|
||||||
@@ -90,15 +90,15 @@ test('flattens visible leaves with unique paths', () => {
|
|||||||
'/orders/first-leg',
|
'/orders/first-leg',
|
||||||
'/orders/inbound',
|
'/orders/inbound',
|
||||||
'/orders/delivery',
|
'/orders/delivery',
|
||||||
'/cross-border/procurement',
|
|
||||||
'/cross-border/domestic-trucking',
|
|
||||||
'/cross-border/pallet-shipping',
|
|
||||||
'/first-leg/customs-documents',
|
'/first-leg/customs-documents',
|
||||||
'/first-leg/sailing-prices',
|
'/first-leg/sailing-prices',
|
||||||
'/overseas-warehouse/labeling',
|
'/overseas-warehouse/labeling',
|
||||||
'/overseas-warehouse/storage-transfer',
|
'/overseas-warehouse/storage-transfer',
|
||||||
'/overseas-warehouse/cargo-disposal',
|
'/overseas-warehouse/cargo-disposal',
|
||||||
'/overseas-warehouse/return-relabel',
|
'/overseas-warehouse/return-relabel',
|
||||||
|
'/cross-border/procurement',
|
||||||
|
'/cross-border/domestic-trucking',
|
||||||
|
'/cross-border/pallet-shipping',
|
||||||
'/finance/account',
|
'/finance/account',
|
||||||
'/finance/bills',
|
'/finance/bills',
|
||||||
'/company/profile',
|
'/company/profile',
|
||||||
|
|||||||
@@ -54,9 +54,6 @@ export const clientNavigation: ClientNavigationNode[] = [
|
|||||||
requireLeaf('first-leg-orders', '头程订单'),
|
requireLeaf('first-leg-orders', '头程订单'),
|
||||||
requireLeaf('orders-inbound', '入库订单'),
|
requireLeaf('orders-inbound', '入库订单'),
|
||||||
requireLeaf('orders-delivery', '派送订单'),
|
requireLeaf('orders-delivery', '派送订单'),
|
||||||
requireLeaf('cross-border-procurement'),
|
|
||||||
requireLeaf('cross-border-domestic-trucking'),
|
|
||||||
requireLeaf('cross-border-pallet-shipping'),
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
requireLeaf('first-leg-customs-documents', '报关资料'),
|
requireLeaf('first-leg-customs-documents', '报关资料'),
|
||||||
@@ -70,6 +67,9 @@ export const clientNavigation: ClientNavigationNode[] = [
|
|||||||
requireLeaf('overseas-storage-transfer'),
|
requireLeaf('overseas-storage-transfer'),
|
||||||
requireLeaf('overseas-cargo-disposal'),
|
requireLeaf('overseas-cargo-disposal'),
|
||||||
requireLeaf('overseas-return-relabel', '退货换标'),
|
requireLeaf('overseas-return-relabel', '退货换标'),
|
||||||
|
requireLeaf('cross-border-procurement'),
|
||||||
|
requireLeaf('cross-border-domestic-trucking'),
|
||||||
|
requireLeaf('cross-border-pallet-shipping'),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user