mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 17:09:20 +08:00
feat(product): 商品卡片显示品类名称
- types.vo.ts: ProductVO.Info 新增 categoryId/categoryName 字段 - ProductCard.vue: 卡片信息区新增品类名称显示(蓝色)
This commit is contained in:
@@ -9,6 +9,10 @@ export namespace ProductVO {
|
|||||||
id: number;
|
id: number;
|
||||||
/** 公司ID */
|
/** 公司ID */
|
||||||
companyId: number;
|
companyId: number;
|
||||||
|
/** 类目ID */
|
||||||
|
categoryId?: number;
|
||||||
|
/** 类目名称 */
|
||||||
|
categoryName?: string;
|
||||||
/** 商品名称 */
|
/** 商品名称 */
|
||||||
name: string;
|
name: string;
|
||||||
/** 链接商品名称 */
|
/** 链接商品名称 */
|
||||||
|
|||||||
+9
-1
@@ -82,11 +82,19 @@ const goToDetails = (product: ProductVO.Info) => {
|
|||||||
<!-- 商品编码 -->
|
<!-- 商品编码 -->
|
||||||
<div
|
<div
|
||||||
v-if="product.productCode"
|
v-if="product.productCode"
|
||||||
class="mb-2 text-xs text-gray-500 dark:text-gray-400"
|
class="mb-1 text-xs text-gray-500 dark:text-gray-400"
|
||||||
>
|
>
|
||||||
编码: {{ product.productCode }}
|
编码: {{ product.productCode }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 品类 -->
|
||||||
|
<div
|
||||||
|
v-if="product.categoryName"
|
||||||
|
class="mb-2 text-xs text-blue-500 dark:text-blue-400"
|
||||||
|
>
|
||||||
|
{{ product.categoryName }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 规格数量标签(支持悬停显示详情) -->
|
<!-- 规格数量标签(支持悬停显示详情) -->
|
||||||
<div v-if="product.specs && product.specs.length > 0" class="mb-3">
|
<div v-if="product.specs && product.specs.length > 0" class="mb-3">
|
||||||
<Popover placement="right" trigger="hover">
|
<Popover placement="right" trigger="hover">
|
||||||
|
|||||||
Reference in New Issue
Block a user