diff --git a/ecom-dmb-frontend/apps/web-antd/src/utils/sidebar-list-styles.ts b/ecom-dmb-frontend/apps/web-antd/src/utils/sidebar-list-styles.ts new file mode 100644 index 00000000..f9716fe3 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/utils/sidebar-list-styles.ts @@ -0,0 +1,20 @@ +/** + * 左侧两栏页:列表滚动区容器(灰底托盘,与 Card 白底、列表项卡片分层) + */ +export const SIDEBAR_LIST_SHELL_CLASS = + 'flex min-h-0 flex-1 flex-col gap-1.5 overflow-y-auto rounded-lg border border-border bg-slate-100 p-2 dark:border-border dark:bg-slate-900/55'; + +/** + * 左侧两栏页:列表项选中 / 未选中样式(每项为独立白卡片) + */ +export function sidebarListRowClass(active: boolean, extraClasses = '') { + return [ + 'rounded-lg border px-3 py-2.5 text-sm font-semibold transition-all', + extraClasses, + active + ? 'border-2 border-primary bg-card text-foreground shadow-md ring-2 ring-primary/30 dark:bg-primary/20 dark:ring-primary/40' + : 'border-border bg-card text-foreground shadow-sm hover:border-primary/50 hover:shadow-md dark:border-border/80', + ] + .filter(Boolean) + .join(' '); +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/common/welcome/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/common/welcome/index.vue index 0578c6d1..f8e144c9 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/common/welcome/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/common/welcome/index.vue @@ -22,7 +22,7 @@ const goWorkbench = () => { }; const goImportTask = () => { - router.push('/import'); + router.push('/import/order'); }; diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/brush-order/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/brush-order/index.vue index 8055f293..8290e016 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/brush-order/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/brush-order/index.vue @@ -33,6 +33,10 @@ import { getProductPageApi } from '#/api/ecommerce/product'; import { getShopPageApi } from '#/api/ecommerce/shop/apis'; import BrushOrderFormModal from './components/BrushOrderFormModal.vue'; +import { + SIDEBAR_LIST_SHELL_CLASS, + sidebarListRowClass, +} from '#/utils/sidebar-list-styles'; defineOptions({ name: 'BrushOrderManagement' }); @@ -289,12 +293,11 @@ function shopRowClass(id: number | 'all') { id === 'all' ? selectedShopId.value === undefined : selectedShopId.value === id; - return [ - 'flex cursor-pointer items-center gap-2 rounded-lg border px-3 py-2.5 text-sm font-semibold transition-colors', - active - ? 'border-primary bg-primary/8 text-primary' - : 'border-transparent bg-muted/30 text-foreground hover:bg-muted/60', - ].join(' '); + const layout = + id === 'all' + ? 'mb-1.5 flex w-full cursor-pointer items-center gap-2 text-left' + : 'group flex w-full cursor-pointer items-center gap-2'; + return sidebarListRowClass(active, layout); } const handleAdd = () => { @@ -375,11 +378,10 @@ const formatAmount = (amount: number) => `¥${amount.toFixed(2)}`; -
+