fix(@vben/web-antd): 商品详情移除类型编辑并停止提交kind字段
All checks were successful
Build and Deploy TenantUI / build-and-deploy (push) Successful in 48s

This commit is contained in:
2026-02-24 16:38:34 +08:00
parent 3e55697532
commit 2b485de5a8
3 changed files with 1 additions and 36 deletions

View File

@@ -232,7 +232,7 @@ export interface SaveProductDto {
id?: string; id?: string;
imageUrls?: string[]; imageUrls?: string[];
labelIds?: string[]; labelIds?: string[];
kind: ProductKind; kind?: ProductKind;
name: string; name: string;
originalPrice: null | number; originalPrice: null | number;
packingFee?: null | number; packingFee?: null | number;

View File

@@ -357,7 +357,6 @@ export function createProductDetailDataActions(
id: form.id, id: form.id,
storeId: storeId.value, storeId: storeId.value,
categoryId: form.categoryId, categoryId: form.categoryId,
kind: form.kind,
name: form.name.trim(), name: form.name.trim(),
subtitle: form.subtitle.trim(), subtitle: form.subtitle.trim(),
description: form.description.trim(), description: form.description.trim(),

View File

@@ -175,16 +175,6 @@ function updateActiveSectionByScroll() {
activeSectionId.value = current; activeSectionId.value = current;
} }
function onKindChange(value: unknown) {
if (value !== 'single' && value !== 'combo') return;
form.kind = value;
if (value === 'single') {
form.comboGroups = [];
} else if (form.comboGroups.length === 0) {
addComboGroup();
}
}
function formatPrice(value: null | number | string | undefined) { function formatPrice(value: null | number | string | undefined) {
return `¥${Number(value || 0).toFixed(2)}`; return `¥${Number(value || 0).toFixed(2)}`;
} }
@@ -781,30 +771,6 @@ watch(
<Card id="detail-shelf" :bordered="false" class="pd-section-card"> <Card id="detail-shelf" :bordered="false" class="pd-section-card">
<template #title>上架设置</template> <template #title>上架设置</template>
<div class="pd-row">
<label class="pd-label">商品类型</label>
<div class="pd-ctrl">
<div class="pd-kind-pills">
<button
type="button"
class="pd-kind-pill"
:class="{ active: form.kind === 'single' }"
@click="onKindChange('single')"
>
单品
</button>
<button
type="button"
class="pd-kind-pill"
:class="{ active: form.kind === 'combo' }"
@click="onKindChange('combo')"
>
套餐
</button>
</div>
</div>
</div>
<div class="pd-shelf-group"> <div class="pd-shelf-group">
<div <div
class="pd-shelf-opt" class="pd-shelf-opt"