Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(type->api): resultField推断api的返回值应该包含recordbale类型 #3699

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Form/src/components/ApiCascader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form/src/components/ApiRadioGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form/src/components/ApiSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form/src/components/ApiTransfer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
Loading