diff --git a/apps/web-antd/src/views/crm/clue/data.ts b/apps/web-antd/src/views/crm/clue/data.ts index 74edf0faf..28e561915 100644 --- a/apps/web-antd/src/views/crm/clue/data.ts +++ b/apps/web-antd/src/views/crm/clue/data.ts @@ -8,6 +8,7 @@ import { h } from 'vue'; import { useAccess } from '@vben/access'; import { formatDateTime } from '@vben/utils'; +import { getAreaTree } from '#/api/system/area'; import { DictTag } from '#/components/dict-tag'; import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils'; @@ -92,9 +93,10 @@ export function useFormSchema(): VbenFormSchema[] { { fieldName: 'areaId', label: '地址', - component: 'Cascader', + component: 'ApiTreeSelect', componentProps: { - api: 'getAreaTree', + api: () => getAreaTree(), + fieldNames: { label: 'name', value: 'id', children: 'children' }, }, }, { diff --git a/apps/web-antd/src/views/crm/customer/data.ts b/apps/web-antd/src/views/crm/customer/data.ts index 87cdb42df..6ca6636ff 100644 --- a/apps/web-antd/src/views/crm/customer/data.ts +++ b/apps/web-antd/src/views/crm/customer/data.ts @@ -8,6 +8,7 @@ import { h } from 'vue'; import { useAccess } from '@vben/access'; import { formatDateTime } from '@vben/utils'; +import { getAreaTree } from '#/api/system/area'; import { DictTag } from '#/components/dict-tag'; import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils'; @@ -92,9 +93,10 @@ export function useFormSchema(): VbenFormSchema[] { { fieldName: 'areaId', label: '地址', - component: 'Cascader', + component: 'ApiTreeSelect', componentProps: { - api: 'getAreaTree', + api: () => getAreaTree(), + fieldNames: { label: 'name', value: 'id', children: 'children' }, }, }, {