@@ -2,8 +2,8 @@ import type { RowProps } from 'ant-design-vue';
22import type { FormItemProps } from 'ant-design-vue/es/form/FormItem' ;
33import type { NamePath , RuleObject } from 'ant-design-vue/es/form/interface' ;
44import type { Component , HTMLAttributes , VNode } from 'vue' ;
5- import { JSX } from 'vue/jsx-runtime' ;
6- import { LFormType } from '../hooks' ;
5+ import type { JSX } from 'vue/jsx-runtime' ;
6+ import type { LFormType } from '../hooks' ;
77import type { FormInstance } from './ll-form' ;
88import type { ColEx , ComponentMapType , ComponentProps } from './component' ;
99
@@ -20,16 +20,16 @@ export type GetFieldKeys<T> = Exclude<keyof T, symbol | number>;
2020
2121export interface RenderCallbackParams < T = string > {
2222 schema : FormSchema < T > ;
23- formModel : T extends string ? Recordable : Record < GetFieldKeys < T > , any > ;
23+ formModel : T extends string ? Recordable : Record < GetFieldKeys < T > , unknown > ;
2424 field : T extends string ? string : GetFieldKeys < T > ;
25- values : any ;
25+ values : unknown ;
2626 /** 动态表单实例 */
2727 formInstance : LFormType ;
2828 /** 作用域插槽数据 */
2929 slotData ?: Recordable ;
3030}
3131/** 自定义VNode渲染器 */
32- export type CustomRenderFn < T = any > = (
32+ export type CustomRenderFn < T = unknown > = (
3333 opt : RenderCallbackParams < T > ,
3434) => Component | VNode | VNode [ ] | string | JSX . Element | Element ;
3535
@@ -38,7 +38,7 @@ export interface FormActionType {
3838 submit : ( ) => Promise < void > ;
3939 setFieldsValue : < T > ( values : T ) => Promise < void > ;
4040 resetForm : ( ) => Promise < void > ;
41- getFormValues : ( ) => any ;
41+ getFormValues : ( ) => unknown ;
4242 clearValidate : ( name ?: string | string [ ] ) => Promise < void > ;
4343 updateSchema : ( data : Partial < FormSchema > | Partial < FormSchema > [ ] ) => Promise < void > ;
4444 resetSchema : ( data : Partial < FormSchema > | Partial < FormSchema > [ ] ) => Promise < void > ;
@@ -49,8 +49,8 @@ export interface FormActionType {
4949 prefixField : string | undefined ,
5050 first ?: boolean | undefined ,
5151 ) => Promise < void > ;
52- validateFields : ( nameList ?: NamePath [ ] ) => Promise < any > ;
53- validate : ( nameList ?: NamePath [ ] ) => Promise < any > ;
52+ validateFields : ( nameList ?: NamePath [ ] ) => Promise < unknown > ;
53+ validate : ( nameList ?: NamePath [ ] ) => Promise < unknown > ;
5454 scrollToField : ( name : NamePath , options ?: ScrollOptions ) => Promise < void > ;
5555}
5656
@@ -113,7 +113,7 @@ export interface FormSchema<T = string> {
113113 /** 搜索表单项排序 */
114114 order ?: number ;
115115 // 默认值
116- defaultValue ?: any ;
116+ defaultValue ?: unknown ;
117117 isAdvanced ?: boolean ;
118118 // label 是否显示铺满
119119 labelFullWidth ?: boolean ;
@@ -155,13 +155,13 @@ export interface HelpComponentProps {
155155 // Whether to display the serial number
156156 showIndex : boolean ;
157157 // Text list
158- text : any ;
158+ text : unknown ;
159159 // colour
160160 color : string ;
161161 // font size
162162 fontSize : string ;
163163 icon : string ;
164164 absolute : boolean ;
165165 // Positioning
166- position : any ;
166+ position : unknown ;
167167}
0 commit comments