فهرست منبع

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

Vben 4 سال پیش
والد
کامیت
37c5741601
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  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[]>>,