fix(api-select): make sure the type is correct, fix #468

This commit is contained in:
Vben 2021-04-10 21:40:52 +08:00
parent 967b28c4c0
commit 37c5741601

View File

@ -41,7 +41,12 @@
}, },
inheritAttrs: false, inheritAttrs: false,
props: { props: {
value: propTypes.string, value: propTypes.oneOfType([
propTypes.object,
propTypes.number,
propTypes.string,
propTypes.array,
]),
numberToString: propTypes.bool, numberToString: propTypes.bool,
api: { api: {
type: Function as PropType<(arg?: Recordable) => Promise<OptionsItem[]>>, type: Function as PropType<(arg?: Recordable) => Promise<OptionsItem[]>>,