From c3bdd9ba9ab228a8d8dc8cfaa28d27823e9a2dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Fri, 6 Dec 2024 16:29:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20PSelect=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E4=BC=98=E5=8C=96=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/__fk-inputs__/inputs/p-select.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/__fk-inputs__/inputs/p-select.tsx b/src/__fk-inputs__/inputs/p-select.tsx index 8f92d6b..53d964c 100644 --- a/src/__fk-inputs__/inputs/p-select.tsx +++ b/src/__fk-inputs__/inputs/p-select.tsx @@ -18,9 +18,9 @@ type PrimevueSelectListeners = { const PSelectComp = defineComponent( (vueProps: { context: FormKitFrameworkContext }) => { const formkitContext = vueProps.context; - const primevueSelectInstance = ref | undefined>(); + const primevueSelectInstance = ref | undefined>(); const listeners: PrimevueSelectListeners = { - 'onUpdate:modelValue': (value: any) => { + 'onUpdate:modelValue': (value: unknown) => { formkitContext.node.input(value); }, 'onBlur': async e => { @@ -41,7 +41,7 @@ const PSelectComp = defineComponent( if (formkitContext.options instanceof Promise) { result = await formkitContext.options; } else if (typeof formkitContext.options === 'function') { - const funcResult = await (formkitContext.options as Function).call(undefined); + const funcResult = await (formkitContext.options as () => unknown).call(undefined); result = funcResult instanceof Promise ? await funcResult : funcResult; } else { result = formkitContext.options; @@ -118,6 +118,7 @@ export const PSelect: FormKitTypeDefinition = { // schemaMemoKey: 'nnvujvlf2xr', // Math.random().toString(36).substring(2, 15) }; +// eslint-disable-next-line @typescript-eslint/no-explicit-any type OptionsItem = Record; type OptionsType = Array;