diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/product/components/ProductCard.vue b/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/product/components/ProductCard.vue index 670ac5ae..6e1b852d 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/product/components/ProductCard.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/product/components/ProductCard.vue @@ -79,9 +79,6 @@ const goToDetails = (product: ProductVO.Info) => { router.push(`/ecom/product/overview/${product.id}`); }; -const MAX_VISIBLE_SPECS = 4; -const visibleSpecs = computed(() => (props.product.specs || []).slice(0, MAX_VISIBLE_SPECS)); - /** id 仅来自后端的已有规格;新增行不传 id,用 _clientKey 做列表 key */ type EditableSpec = { id?: number; @@ -241,7 +238,7 @@ const displaySpecs = computed(() => { if (isEditing.value) { return draft.value.specs; } - return visibleSpecs.value; + return props.product.specs || []; }); const formatCost = (val?: number) => `¥${(val ?? 0).toFixed(2)}`; @@ -593,12 +590,6 @@ const saveEdit = async () => { -