types: improve Field injection typing (#8975)
* types: improve inject typing * types: update
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import type { Ref } from 'vue';
|
||||
|
||||
export type FieldType =
|
||||
| 'tel'
|
||||
| 'text'
|
||||
@@ -37,6 +39,12 @@ export type FieldRule = {
|
||||
formatter?: (value: any, rule: FieldRule) => string;
|
||||
};
|
||||
|
||||
export type FieldProvide = {
|
||||
childFieldValue: Ref<(() => unknown) | undefined>;
|
||||
resetValidation: () => void;
|
||||
validateWithTrigger: (trigger: FieldValidateTrigger) => void;
|
||||
};
|
||||
|
||||
declare global {
|
||||
interface EventTarget {
|
||||
composing?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user