fix(@vben/web-antd): 商品详情移除类型编辑并停止提交kind字段
All checks were successful
Build and Deploy TenantUI / build-and-deploy (push) Successful in 48s
All checks were successful
Build and Deploy TenantUI / build-and-deploy (push) Successful in 48s
This commit is contained in:
@@ -232,7 +232,7 @@ export interface SaveProductDto {
|
||||
id?: string;
|
||||
imageUrls?: string[];
|
||||
labelIds?: string[];
|
||||
kind: ProductKind;
|
||||
kind?: ProductKind;
|
||||
name: string;
|
||||
originalPrice: null | number;
|
||||
packingFee?: null | number;
|
||||
|
||||
@@ -357,7 +357,6 @@ export function createProductDetailDataActions(
|
||||
id: form.id,
|
||||
storeId: storeId.value,
|
||||
categoryId: form.categoryId,
|
||||
kind: form.kind,
|
||||
name: form.name.trim(),
|
||||
subtitle: form.subtitle.trim(),
|
||||
description: form.description.trim(),
|
||||
|
||||
@@ -175,16 +175,6 @@ function updateActiveSectionByScroll() {
|
||||
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) {
|
||||
return `¥${Number(value || 0).toFixed(2)}`;
|
||||
}
|
||||
@@ -781,30 +771,6 @@ watch(
|
||||
|
||||
<Card id="detail-shelf" :bordered="false" class="pd-section-card">
|
||||
<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-opt"
|
||||
|
||||
Reference in New Issue
Block a user