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

@@ -86,7 +86,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '所在地',
component: 'ApiTreeSelect',
componentProps: {
api: () => getAreaTree(),
api: getAreaTree,
labelField: 'name',
valueField: 'id',
childrenField: 'children',
@@ -98,7 +98,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '用户标签',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleTagList(),
api: getSimpleTagList,
labelField: 'name',
valueField: 'id',
multiple: true,
@@ -110,7 +110,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '用户分组',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleGroupList(),
api: getSimpleGroupList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择用户分组',
@@ -171,7 +171,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '用户标签',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleTagList(),
api: getSimpleTagList,
labelField: 'name',
valueField: 'id',
multiple: true,
@@ -184,7 +184,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '用户等级',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleLevelList(),
api: getSimpleLevelList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择用户等级',
@@ -196,7 +196,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '用户分组',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleGroupList(),
api: getSimpleGroupList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择用户分组',
@@ -325,7 +325,7 @@ export function useLevelFormSchema(): VbenFormSchema[] {
label: '用户等级',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleLevelList(),
api: getSimpleLevelList,
labelField: 'name',
valueField: 'id',
placeholder: '请选择用户等级',

View File

@@ -104,7 +104,7 @@ const [Grid] = useVbenVxeGrid({
component: 'ApiSelect',
componentProps: {
clearable: true,
api: () => getSimpleDeliveryExpressList(),
api: getSimpleDeliveryExpressList,
labelField: 'name',
valueField: 'id',
placeholder: '全部',
@@ -120,7 +120,7 @@ const [Grid] = useVbenVxeGrid({
label: '自提门店',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleDeliveryPickUpStoreList(),
api: getSimpleDeliveryPickUpStoreList,
labelField: 'name',
valueField: 'id',
},