Browse Source
feat(type->api): resultField推断api的返回值应该包含recordbale类型 (#3699)
* feat(type->api): resultField推断api的返回值应该包含object类型
* perf(format): simplify type about api response
pull/3704/head
Electrolux
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
4 additions and
4 deletions
-
src/components/Form/src/components/ApiCascader.vue
-
src/components/Form/src/components/ApiRadioGroup.vue
-
src/components/Form/src/components/ApiSelect.vue
-
src/components/Form/src/components/ApiTransfer.vue
|
|
|
@ -46,7 +46,7 @@ |
|
|
|
type: Array, |
|
|
|
}, |
|
|
|
api: { |
|
|
|
type: Function as PropType<(arg?: any) => Promise<Option[]>>, |
|
|
|
type: Function as PropType<(arg?: any) => Promise<Option[] | Recordable<any>>> , |
|
|
|
default: null, |
|
|
|
}, |
|
|
|
numberToString: propTypes.bool, |
|
|
|
|
|
|
|
@ -38,7 +38,7 @@ |
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
api: { |
|
|
|
type: Function as PropType<(arg?: any) => Promise<OptionsItem[]>>, |
|
|
|
type: Function as PropType<(arg?: any) => Promise<OptionsItem[] | Recordable<any>>>, |
|
|
|
default: null, |
|
|
|
}, |
|
|
|
params: { |
|
|
|
|
|
|
|
@ -39,7 +39,7 @@ |
|
|
|
value: { type: [Array, Object, String, Number] as PropType<SelectValue> }, |
|
|
|
numberToString: propTypes.bool, |
|
|
|
api: { |
|
|
|
type: Function as PropType<(arg?: any) => Promise<OptionsItem[]>>, |
|
|
|
type: Function as PropType<(arg?: any) => Promise<OptionsItem[] | Recordable<any>>>, |
|
|
|
default: null, |
|
|
|
}, |
|
|
|
// api params |
|
|
|
|
|
|
|
@ -25,7 +25,7 @@ |
|
|
|
const props = defineProps({ |
|
|
|
value: { type: Array as PropType<Array<string>> }, |
|
|
|
api: { |
|
|
|
type: Function as PropType<(arg) => Promise<TransferItem[]>>, |
|
|
|
type: Function as PropType<(arg) => Promise<TransferItem[] | Recordable<any>>> , |
|
|
|
default: null, |
|
|
|
}, |
|
|
|
params: { type: Object }, |
|
|
|
|