Explorar o código

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

Vben %!s(int64=4) %!d(string=hai) anos
pai
achega
37c5741601
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      src/components/Form/src/components/ApiSelect.vue

+ 6 - 1
src/components/Form/src/components/ApiSelect.vue

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