diff --git a/packages/form-schema/src/base.ts b/packages/form-schema/src/base.ts index 2a309f93..6a309411 100644 --- a/packages/form-schema/src/base.ts +++ b/packages/form-schema/src/base.ts @@ -15,14 +15,14 @@ export interface ChangeRecord { export interface OnChangeHandlerData { model: FormValue; - values?: Readonly; + values?: Readonly | null; parent?: FormValue; formValue?: FormValue; config: Readonly; prop: string; changeRecords: ChangeRecord[]; setModel: (prop: string, value: any) => void; - setFromValue: (prop: string, value: any) => void; + setFormValue: (prop: string, value: any) => void; } export type FormValue = Record; @@ -361,7 +361,10 @@ export interface TextConfig extends FormItem, Input { mForm: FormState | undefined, data: { model: any; - values: any; + values?: Readonly | null; + formValue?: FormValue; + setModel: (prop: string, value: any) => void; + setFormValue: (prop: string, value: any) => void; }, ) => void; }; @@ -553,7 +556,8 @@ export interface LinkConfig extends FormItem { mForm: FormState | undefined, data: { model: Record; - values: Record; + values?: Readonly | null; + formValue?: FormValue; }, ) => FormConfig); fullscreen?: boolean; diff --git a/packages/form/src/fields/Link.vue b/packages/form/src/fields/Link.vue index bfa8c913..fcc701f0 100644 --- a/packages/form/src/fields/Link.vue +++ b/packages/form/src/fields/Link.vue @@ -17,7 +17,7 @@