fix: ImageUpload config
							parent
							
								
									e2561593d9
								
							
						
					
					
						commit
						6df938431e
					
				|  | @ -40,9 +40,6 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       fieldName: 'avatar', |       fieldName: 'avatar', | ||||||
|       label: '角色头像', |       label: '角色头像', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|       rules: 'required', |       rules: 'required', | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -30,9 +30,6 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       fieldName: 'picUrl', |       fieldName: 'picUrl', | ||||||
|       label: '品牌图片', |       label: '品牌图片', | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|       rules: 'required', |       rules: 'required', | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -57,9 +57,6 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       fieldName: 'picUrl', |       fieldName: 'picUrl', | ||||||
|       label: '移动端分类图', |       label: '移动端分类图', | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|       rules: 'required', |       rules: 'required', | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -31,9 +31,6 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       fieldName: 'userAvatar', |       fieldName: 'userAvatar', | ||||||
|       label: '用户头像', |       label: '用户头像', | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|       rules: 'required', |       rules: 'required', | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|  | @ -65,7 +62,7 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       label: '评论图片', |       label: '评论图片', | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       componentProps: { |       componentProps: { | ||||||
|         maxSize: 9, |         maxNumber: 9, | ||||||
|       }, |       }, | ||||||
|       rules: 'required', |       rules: 'required', | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|  | @ -29,9 +29,6 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       fieldName: 'picUrl', |       fieldName: 'picUrl', | ||||||
|       label: '图标地址', |       label: '图标地址', | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       fieldName: 'sort', |       fieldName: 'sort', | ||||||
|  |  | ||||||
|  | @ -52,9 +52,6 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       fieldName: 'picUrl', |       fieldName: 'picUrl', | ||||||
|       label: '文章封面', |       label: '文章封面', | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|       rules: 'required', |       rules: 'required', | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -29,9 +29,6 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       fieldName: 'picUrl', |       fieldName: 'picUrl', | ||||||
|       label: '图片地址', |       label: '图片地址', | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|       rules: 'required', |       rules: 'required', | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -9,8 +9,8 @@ import { DICT_TYPE, getDictOptions } from '#/utils'; | ||||||
| export function useFormSchema(): VbenFormSchema[] { | export function useFormSchema(): VbenFormSchema[] { | ||||||
|   return [ |   return [ | ||||||
|     { |     { | ||||||
|       component: 'Input', |  | ||||||
|       fieldName: 'id', |       fieldName: 'id', | ||||||
|  |       component: 'Input', | ||||||
|       dependencies: { |       dependencies: { | ||||||
|         triggerFields: [''], |         triggerFields: [''], | ||||||
|         show: () => false, |         show: () => false, | ||||||
|  |  | ||||||
|  | @ -8,6 +8,14 @@ import { DICT_TYPE, getDictOptions } from '#/utils'; | ||||||
| /** 表单配置 */ | /** 表单配置 */ | ||||||
| export function useFormSchema(): VbenFormSchema[] { | export function useFormSchema(): VbenFormSchema[] { | ||||||
|   return [ |   return [ | ||||||
|  |     { | ||||||
|  |       fieldName: 'id', | ||||||
|  |       component: 'Input', | ||||||
|  |       dependencies: { | ||||||
|  |         triggerFields: [''], | ||||||
|  |         show: () => false, | ||||||
|  |       }, | ||||||
|  |     }, | ||||||
|     { |     { | ||||||
|       fieldName: 'name', |       fieldName: 'name', | ||||||
|       label: '活动名称', |       label: '活动名称', | ||||||
|  |  | ||||||
|  | @ -8,6 +8,14 @@ import { DICT_TYPE, getDictOptions } from '#/utils'; | ||||||
| /** 表单配置 */ | /** 表单配置 */ | ||||||
| export function useFormSchema(): VbenFormSchema[] { | export function useFormSchema(): VbenFormSchema[] { | ||||||
|   return [ |   return [ | ||||||
|  |     { | ||||||
|  |       fieldName: 'id', | ||||||
|  |       component: 'Input', | ||||||
|  |       dependencies: { | ||||||
|  |         triggerFields: [''], | ||||||
|  |         show: () => false, | ||||||
|  |       }, | ||||||
|  |     }, | ||||||
|     { |     { | ||||||
|       fieldName: 'name', |       fieldName: 'name', | ||||||
|       label: '活动名称', |       label: '活动名称', | ||||||
|  |  | ||||||
|  | @ -137,9 +137,6 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       fieldName: 'brokeragePosterUrls', |       fieldName: 'brokeragePosterUrls', | ||||||
|       label: '分销海报图', |       label: '分销海报图', | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|       dependencies: { |       dependencies: { | ||||||
|         triggerFields: ['type'], |         triggerFields: ['type'], | ||||||
|         show: (values) => values.type === 'brokerage', |         show: (values) => values.type === 'brokerage', | ||||||
|  |  | ||||||
|  | @ -31,9 +31,6 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       fieldName: 'logo', |       fieldName: 'logo', | ||||||
|       label: '公司 logo', |       label: '公司 logo', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|       rules: 'required', |       rules: 'required', | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -26,9 +26,6 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       fieldName: 'logo', |       fieldName: 'logo', | ||||||
|       label: '门店logo', |       label: '门店logo', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|       rules: 'required', |       rules: 'required', | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -52,17 +52,11 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       fieldName: 'icon', |       fieldName: 'icon', | ||||||
|       label: '等级图标', |       label: '等级图标', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       fieldName: 'backgroundUrl', |       fieldName: 'backgroundUrl', | ||||||
|       label: '等级背景图', |       label: '等级背景图', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       fieldName: 'status', |       fieldName: 'status', | ||||||
|  |  | ||||||
|  | @ -56,9 +56,6 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       fieldName: 'avatar', |       fieldName: 'avatar', | ||||||
|       label: '头像', |       label: '头像', | ||||||
|       componentProps: { |  | ||||||
|         maxSize: 1, |  | ||||||
|       }, |  | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       component: 'Input', |       component: 'Input', | ||||||
|  |  | ||||||
|  | @ -46,9 +46,6 @@ export function useFormSchema(): VbenFormSchema[] { | ||||||
|       fieldName: 'logo', |       fieldName: 'logo', | ||||||
|       label: '应用图标', |       label: '应用图标', | ||||||
|       component: 'ImageUpload', |       component: 'ImageUpload', | ||||||
|       componentProps: { |  | ||||||
|         limit: 1, |  | ||||||
|       }, |  | ||||||
|       rules: 'required', |       rules: 'required', | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 xingyu4j
						xingyu4j