feat:简化 ApiSelect 的 api 写法~

This commit is contained in:
YunaiV
2025-10-21 09:06:17 +08:00
parent 3b4c01cedf
commit ad00cf839c
103 changed files with 224 additions and 238 deletions

View File

@@ -23,7 +23,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '商品',
component: 'ApiSelect',
componentProps: {
api: () => getSpuSimpleList(),
api: getSpuSimpleList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择商品',

View File

@@ -113,7 +113,7 @@ export function useValueFormSchema(): VbenFormSchema[] {
component: 'ApiSelect',
componentProps: (values) => {
return {
api: () => getPropertySimpleList(),
api: getPropertySimpleList,
placeholder: '请选择属性',
labelField: 'name',
valueField: 'id',

View File

@@ -50,7 +50,7 @@ export function useInfoFormSchema(): VbenFormSchema[] {
label: '商品品牌',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleBrandList(),
api: getSimpleBrandList,
labelField: 'name',
valueField: 'id',
allowClear: true,
@@ -181,7 +181,7 @@ export function useDeliveryFormSchema(): VbenFormSchema[] {
label: '运费模板',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleTemplateList(),
api: getSimpleTemplateList,
labelField: 'name',
valueField: 'id',
},