Procházet zdrojové kódy

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

Vben před 4 roky
rodič
revize
37c5741601

+ 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[]>>,