fix: getAreaTree
parent
693595b334
commit
564fd5b64c
|
@ -8,6 +8,7 @@ import { h } from 'vue';
|
||||||
import { useAccess } from '@vben/access';
|
import { useAccess } from '@vben/access';
|
||||||
import { formatDateTime } from '@vben/utils';
|
import { formatDateTime } from '@vben/utils';
|
||||||
|
|
||||||
|
import { getAreaTree } from '#/api/system/area';
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
||||||
|
|
||||||
|
@ -92,9 +93,10 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
{
|
{
|
||||||
fieldName: 'areaId',
|
fieldName: 'areaId',
|
||||||
label: '地址',
|
label: '地址',
|
||||||
component: 'Cascader',
|
component: 'ApiTreeSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: 'getAreaTree',
|
api: () => getAreaTree(),
|
||||||
|
fieldNames: { label: 'name', value: 'id', children: 'children' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { h } from 'vue';
|
||||||
import { useAccess } from '@vben/access';
|
import { useAccess } from '@vben/access';
|
||||||
import { formatDateTime } from '@vben/utils';
|
import { formatDateTime } from '@vben/utils';
|
||||||
|
|
||||||
|
import { getAreaTree } from '#/api/system/area';
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
||||||
|
|
||||||
|
@ -92,9 +93,10 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||||
{
|
{
|
||||||
fieldName: 'areaId',
|
fieldName: 'areaId',
|
||||||
label: '地址',
|
label: '地址',
|
||||||
component: 'Cascader',
|
component: 'ApiTreeSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: 'getAreaTree',
|
api: () => getAreaTree(),
|
||||||
|
fieldNames: { label: 'name', value: 'id', children: 'children' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue