feat:简化 ApiSelect 的 api 写法~
This commit is contained in:
@@ -23,7 +23,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
label: '商品',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSpuSimpleList(),
|
||||
api: getSpuSimpleList,
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择商品',
|
||||
|
||||
@@ -113,7 +113,7 @@ export function useValueFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: (values) => {
|
||||
return {
|
||||
api: () => getPropertySimpleList(),
|
||||
api: getPropertySimpleList,
|
||||
placeholder: '请选择属性',
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user