From c6ef772f9311f99cdf2ff3fc99a783ff0c27709b Mon Sep 17 00:00:00 2001 From: puhui999 Date: Tue, 25 Nov 2025 23:36:17 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E3=80=90antd=E3=80=91=E3=80=90mall?= =?UTF-8?q?=E3=80=91=E5=AE=8C=E5=96=84=E8=AF=84=E8=AE=BA=E5=95=86=E5=93=81?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/mall/product/comment/data.ts | 12 +- .../mall/product/comment/modules/form.vue | 104 +++++++++++++++++- .../spu/components/sku-table-select.vue | 59 ++++++---- .../spu/components/spu-table-select.vue | 48 ++++---- 4 files changed, 168 insertions(+), 55 deletions(-) diff --git a/apps/web-antd/src/views/mall/product/comment/data.ts b/apps/web-antd/src/views/mall/product/comment/data.ts index 62f9f956d..71d88a8a6 100644 --- a/apps/web-antd/src/views/mall/product/comment/data.ts +++ b/apps/web-antd/src/views/mall/product/comment/data.ts @@ -3,7 +3,6 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { MallCommentApi } from '#/api/mall/product/comment'; import { z } from '#/adapter/form'; -import { getSpuSimpleList } from '#/api/mall/product/spu'; import { getRangePickerDefaultProps } from '#/utils'; /** 新增/修改的表单 */ @@ -21,13 +20,13 @@ export function useFormSchema(): VbenFormSchema[] { { fieldName: 'spuId', label: '商品', - component: 'ApiSelect', + component: 'Input', componentProps: { - api: getSpuSimpleList, - labelField: 'name', - valueField: 'id', placeholder: '请选择商品', }, + renderComponentContent: () => ({ + default: () => null, + }), rules: 'required', }, { @@ -41,6 +40,9 @@ export function useFormSchema(): VbenFormSchema[] { triggerFields: ['spuId'], show: (values) => !!values.spuId, }, + renderComponentContent: () => ({ + default: () => null, + }), rules: 'required', }, { diff --git a/apps/web-antd/src/views/mall/product/comment/modules/form.vue b/apps/web-antd/src/views/mall/product/comment/modules/form.vue index e00983689..b756e00d4 100644 --- a/apps/web-antd/src/views/mall/product/comment/modules/form.vue +++ b/apps/web-antd/src/views/mall/product/comment/modules/form.vue @@ -1,21 +1,31 @@