refactor(web-antd): 超管账户与公司菜单/权限页改为两栏布局,并统一左侧列表托盘与卡片样式

This commit is contained in:
小蟑螂
2026-05-25 17:35:02 +08:00
parent 4fe8fb5846
commit 2f44eaa9d2
9 changed files with 830 additions and 525 deletions
@@ -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)}`;
</span>
</template>
<Spin :spinning="shopsLoading" class="flex min-h-0 flex-1 flex-col">
<div class="flex min-h-0 flex-1 flex-col overflow-y-auto">
<div :class="SIDEBAR_LIST_SHELL_CLASS">
<button
type="button"
:class="shopRowClass('all')"
class="mb-1 w-full text-left"
@click="selectShopAll"
>
<span class="min-w-0 flex-1 truncate">全部店铺</span>