From c7ab4a52989256ccae996191cc249d9cbb36e6d6 Mon Sep 17 00:00:00 2001 From: Electrolux <59329360+electroluxcode@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:09:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(type->api):=20resultField=E6=8E=A8?= =?UTF-8?q?=E6=96=ADapi=E7=9A=84=E8=BF=94=E5=9B=9E=E5=80=BC=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E5=8C=85=E5=90=ABrecordbale=E7=B1=BB=E5=9E=8B=20(#369?= =?UTF-8?q?9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(type->api): resultField推断api的返回值应该包含object类型 * perf(format): simplify type about api response --- src/components/Form/src/components/ApiCascader.vue | 2 +- src/components/Form/src/components/ApiRadioGroup.vue | 2 +- src/components/Form/src/components/ApiSelect.vue | 2 +- src/components/Form/src/components/ApiTransfer.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Form/src/components/ApiCascader.vue b/src/components/Form/src/components/ApiCascader.vue index cecf1d748..7c37da5d5 100644 --- a/src/components/Form/src/components/ApiCascader.vue +++ b/src/components/Form/src/components/ApiCascader.vue @@ -46,7 +46,7 @@ type: Array, }, api: { - type: Function as PropType<(arg?: any) => Promise>, + type: Function as PropType<(arg?: any) => Promise>> , default: null, }, numberToString: propTypes.bool, diff --git a/src/components/Form/src/components/ApiRadioGroup.vue b/src/components/Form/src/components/ApiRadioGroup.vue index 3cdbb8c80..dc6b9a60b 100644 --- a/src/components/Form/src/components/ApiRadioGroup.vue +++ b/src/components/Form/src/components/ApiRadioGroup.vue @@ -38,7 +38,7 @@ const props = defineProps({ api: { - type: Function as PropType<(arg?: any) => Promise>, + type: Function as PropType<(arg?: any) => Promise>>, default: null, }, params: { diff --git a/src/components/Form/src/components/ApiSelect.vue b/src/components/Form/src/components/ApiSelect.vue index 27f544914..d1479c8ad 100644 --- a/src/components/Form/src/components/ApiSelect.vue +++ b/src/components/Form/src/components/ApiSelect.vue @@ -39,7 +39,7 @@ value: { type: [Array, Object, String, Number] as PropType }, numberToString: propTypes.bool, api: { - type: Function as PropType<(arg?: any) => Promise>, + type: Function as PropType<(arg?: any) => Promise>>, default: null, }, // api params diff --git a/src/components/Form/src/components/ApiTransfer.vue b/src/components/Form/src/components/ApiTransfer.vue index 1db2e0711..4ed80ab97 100644 --- a/src/components/Form/src/components/ApiTransfer.vue +++ b/src/components/Form/src/components/ApiTransfer.vue @@ -25,7 +25,7 @@ const props = defineProps({ value: { type: Array as PropType> }, api: { - type: Function as PropType<(arg) => Promise>, + type: Function as PropType<(arg) => Promise>> , default: null, }, params: { type: Object },