From 6df938431ee3d68938f81c5ad2b8644ca6734358 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Fri, 20 Jun 2025 14:50:47 +0800 Subject: [PATCH] fix: ImageUpload config --- apps/web-antd/src/views/ai/model/chatRole/data.ts | 3 --- apps/web-antd/src/views/mall/product/brand/data.ts | 3 --- apps/web-antd/src/views/mall/product/category/data.ts | 3 --- apps/web-antd/src/views/mall/product/comment/data.ts | 5 +---- .../src/views/mall/promotion/article/category/data.ts | 3 --- apps/web-antd/src/views/mall/promotion/article/data.ts | 3 --- apps/web-antd/src/views/mall/promotion/banner/data.ts | 3 --- .../src/views/mall/promotion/bargain/activity/data.ts | 2 +- .../src/views/mall/promotion/combination/activity/data.ts | 8 ++++++++ .../src/views/mall/promotion/discountActivity/data.ts | 8 ++++++++ apps/web-antd/src/views/mall/trade/config/data.ts | 3 --- .../src/views/mall/trade/delivery/express/data.ts | 3 --- .../src/views/mall/trade/delivery/pickUpStore/data.ts | 3 --- apps/web-antd/src/views/member/level/data.ts | 6 ------ apps/web-antd/src/views/member/user/data.ts | 3 --- apps/web-antd/src/views/system/oauth2/client/data.ts | 3 --- 16 files changed, 18 insertions(+), 44 deletions(-) diff --git a/apps/web-antd/src/views/ai/model/chatRole/data.ts b/apps/web-antd/src/views/ai/model/chatRole/data.ts index a20434ba..d579df3d 100644 --- a/apps/web-antd/src/views/ai/model/chatRole/data.ts +++ b/apps/web-antd/src/views/ai/model/chatRole/data.ts @@ -40,9 +40,6 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ImageUpload', fieldName: 'avatar', label: '角色头像', - componentProps: { - maxSize: 1, - }, rules: 'required', }, { diff --git a/apps/web-antd/src/views/mall/product/brand/data.ts b/apps/web-antd/src/views/mall/product/brand/data.ts index e2202ee8..654809ac 100644 --- a/apps/web-antd/src/views/mall/product/brand/data.ts +++ b/apps/web-antd/src/views/mall/product/brand/data.ts @@ -30,9 +30,6 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'picUrl', label: '品牌图片', component: 'ImageUpload', - componentProps: { - maxSize: 1, - }, rules: 'required', }, { diff --git a/apps/web-antd/src/views/mall/product/category/data.ts b/apps/web-antd/src/views/mall/product/category/data.ts index b2f016e9..5efa27c0 100644 --- a/apps/web-antd/src/views/mall/product/category/data.ts +++ b/apps/web-antd/src/views/mall/product/category/data.ts @@ -57,9 +57,6 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'picUrl', label: '移动端分类图', component: 'ImageUpload', - componentProps: { - maxSize: 1, - }, rules: 'required', }, { 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 f422155d..fb4d87cf 100644 --- a/apps/web-antd/src/views/mall/product/comment/data.ts +++ b/apps/web-antd/src/views/mall/product/comment/data.ts @@ -31,9 +31,6 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'userAvatar', label: '用户头像', component: 'ImageUpload', - componentProps: { - maxSize: 1, - }, rules: 'required', }, { @@ -65,7 +62,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '评论图片', component: 'ImageUpload', componentProps: { - maxSize: 9, + maxNumber: 9, }, rules: 'required', }, diff --git a/apps/web-antd/src/views/mall/promotion/article/category/data.ts b/apps/web-antd/src/views/mall/promotion/article/category/data.ts index 10c49344..09656926 100644 --- a/apps/web-antd/src/views/mall/promotion/article/category/data.ts +++ b/apps/web-antd/src/views/mall/promotion/article/category/data.ts @@ -29,9 +29,6 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'picUrl', label: '图标地址', component: 'ImageUpload', - componentProps: { - maxSize: 1, - }, }, { fieldName: 'sort', diff --git a/apps/web-antd/src/views/mall/promotion/article/data.ts b/apps/web-antd/src/views/mall/promotion/article/data.ts index e4476977..5b03258f 100644 --- a/apps/web-antd/src/views/mall/promotion/article/data.ts +++ b/apps/web-antd/src/views/mall/promotion/article/data.ts @@ -52,9 +52,6 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'picUrl', label: '文章封面', component: 'ImageUpload', - componentProps: { - maxSize: 1, - }, rules: 'required', }, { diff --git a/apps/web-antd/src/views/mall/promotion/banner/data.ts b/apps/web-antd/src/views/mall/promotion/banner/data.ts index fd3abd14..a94930b7 100644 --- a/apps/web-antd/src/views/mall/promotion/banner/data.ts +++ b/apps/web-antd/src/views/mall/promotion/banner/data.ts @@ -29,9 +29,6 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'picUrl', label: '图片地址', component: 'ImageUpload', - componentProps: { - maxSize: 1, - }, rules: 'required', }, { diff --git a/apps/web-antd/src/views/mall/promotion/bargain/activity/data.ts b/apps/web-antd/src/views/mall/promotion/bargain/activity/data.ts index 2637d771..80285f23 100644 --- a/apps/web-antd/src/views/mall/promotion/bargain/activity/data.ts +++ b/apps/web-antd/src/views/mall/promotion/bargain/activity/data.ts @@ -9,8 +9,8 @@ import { DICT_TYPE, getDictOptions } from '#/utils'; export function useFormSchema(): VbenFormSchema[] { return [ { - component: 'Input', fieldName: 'id', + component: 'Input', dependencies: { triggerFields: [''], show: () => false, diff --git a/apps/web-antd/src/views/mall/promotion/combination/activity/data.ts b/apps/web-antd/src/views/mall/promotion/combination/activity/data.ts index 19a3b752..8ac9a0e6 100644 --- a/apps/web-antd/src/views/mall/promotion/combination/activity/data.ts +++ b/apps/web-antd/src/views/mall/promotion/combination/activity/data.ts @@ -8,6 +8,14 @@ import { DICT_TYPE, getDictOptions } from '#/utils'; /** 表单配置 */ export function useFormSchema(): VbenFormSchema[] { return [ + { + fieldName: 'id', + component: 'Input', + dependencies: { + triggerFields: [''], + show: () => false, + }, + }, { fieldName: 'name', label: '活动名称', diff --git a/apps/web-antd/src/views/mall/promotion/discountActivity/data.ts b/apps/web-antd/src/views/mall/promotion/discountActivity/data.ts index b7d7d8c1..e0319d86 100644 --- a/apps/web-antd/src/views/mall/promotion/discountActivity/data.ts +++ b/apps/web-antd/src/views/mall/promotion/discountActivity/data.ts @@ -8,6 +8,14 @@ import { DICT_TYPE, getDictOptions } from '#/utils'; /** 表单配置 */ export function useFormSchema(): VbenFormSchema[] { return [ + { + fieldName: 'id', + component: 'Input', + dependencies: { + triggerFields: [''], + show: () => false, + }, + }, { fieldName: 'name', label: '活动名称', diff --git a/apps/web-antd/src/views/mall/trade/config/data.ts b/apps/web-antd/src/views/mall/trade/config/data.ts index a66e4495..9c35219f 100644 --- a/apps/web-antd/src/views/mall/trade/config/data.ts +++ b/apps/web-antd/src/views/mall/trade/config/data.ts @@ -137,9 +137,6 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'brokeragePosterUrls', label: '分销海报图', component: 'ImageUpload', - componentProps: { - maxSize: 1, - }, dependencies: { triggerFields: ['type'], show: (values) => values.type === 'brokerage', diff --git a/apps/web-antd/src/views/mall/trade/delivery/express/data.ts b/apps/web-antd/src/views/mall/trade/delivery/express/data.ts index 514b776e..908cf3e1 100644 --- a/apps/web-antd/src/views/mall/trade/delivery/express/data.ts +++ b/apps/web-antd/src/views/mall/trade/delivery/express/data.ts @@ -31,9 +31,6 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ImageUpload', fieldName: 'logo', label: '公司 logo', - componentProps: { - maxSize: 1, - }, rules: 'required', }, { diff --git a/apps/web-antd/src/views/mall/trade/delivery/pickUpStore/data.ts b/apps/web-antd/src/views/mall/trade/delivery/pickUpStore/data.ts index 65d1f0fb..4442201b 100644 --- a/apps/web-antd/src/views/mall/trade/delivery/pickUpStore/data.ts +++ b/apps/web-antd/src/views/mall/trade/delivery/pickUpStore/data.ts @@ -26,9 +26,6 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ImageUpload', fieldName: 'logo', label: '门店logo', - componentProps: { - maxSize: 1, - }, rules: 'required', }, { diff --git a/apps/web-antd/src/views/member/level/data.ts b/apps/web-antd/src/views/member/level/data.ts index f9597b32..d60a180d 100644 --- a/apps/web-antd/src/views/member/level/data.ts +++ b/apps/web-antd/src/views/member/level/data.ts @@ -52,17 +52,11 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ImageUpload', fieldName: 'icon', label: '等级图标', - componentProps: { - maxSize: 1, - }, }, { component: 'ImageUpload', fieldName: 'backgroundUrl', label: '等级背景图', - componentProps: { - maxSize: 1, - }, }, { fieldName: 'status', diff --git a/apps/web-antd/src/views/member/user/data.ts b/apps/web-antd/src/views/member/user/data.ts index f934f1a4..ee18ddda 100644 --- a/apps/web-antd/src/views/member/user/data.ts +++ b/apps/web-antd/src/views/member/user/data.ts @@ -56,9 +56,6 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ImageUpload', fieldName: 'avatar', label: '头像', - componentProps: { - maxSize: 1, - }, }, { component: 'Input', diff --git a/apps/web-antd/src/views/system/oauth2/client/data.ts b/apps/web-antd/src/views/system/oauth2/client/data.ts index c510f8fd..1994bc0e 100644 --- a/apps/web-antd/src/views/system/oauth2/client/data.ts +++ b/apps/web-antd/src/views/system/oauth2/client/data.ts @@ -46,9 +46,6 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'logo', label: '应用图标', component: 'ImageUpload', - componentProps: { - limit: 1, - }, rules: 'required', }, {