feat(前端): 增加按钮级权限控制

This commit is contained in:
2026-08-27 22:20:02 +08:00
parent b6ed7d166d
commit 65c412d533
29 changed files with 1247 additions and 703 deletions
@@ -14,6 +14,7 @@ import {
getPddGoodsPageApi,
} from '#/api/channel/pdd/goods';
import { getPddShopPageApi } from '#/api/channel/pdd/shop';
import { PermissionGate } from '#/components/permission';
import PddShopColPage from '#/views/channel/pdd/components/PddShopColPage.vue';
import PddShopDetailModal from '#/views/channel/pdd/shop/components/PddShopDetailModal.vue';
import ProductDetailDrawer from '#/views/ec/product/list/components/ProductDetailDrawer.vue';
@@ -395,12 +396,14 @@ onMounted(async () => {
<Button type="link" size="small" @click="openDetail(row)">
详情
</Button>
<Popconfirm
title="确定删除该商品及全部 SKU 吗?"
@confirm="handleDelete(row)"
>
<Button type="link" size="small" danger>删除</Button>
</Popconfirm>
<PermissionGate code="channel:pdd:goods:delete">
<Popconfirm
title="确定删除该商品及全部 SKU 吗?"
@confirm="handleDelete(row)"
>
<Button type="link" size="small" danger>删除</Button>
</Popconfirm>
</PermissionGate>
</Space>
</template>
</Grid>