fix(Field): correct typo "Filed" (#11674)

* refactor(search): fix typo filed

* docs: fix typo "filed" of comments

* fix(field): typo "FiledRuleFormatter"
This commit is contained in:
Wei-Liang Liou 2023-03-15 20:59:02 +08:00 committed by GitHub
parent b9862b3c41
commit 4aa33c17a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 11 deletions

View File

@ -7,7 +7,7 @@ export type CascaderOption = {
disabled?: boolean;
children?: CascaderOption[];
className?: unknown;
// for custom filed names
// for custom field names
[key: PropertyKey]: any;
};

View File

@ -340,7 +340,7 @@ import type {
FieldClearTrigger,
FieldFormatTrigger,
FieldRuleValidator,
FiledRuleFormatter,
FieldRuleFormatter,
FieldValidateError,
FieldAutosizeConfig,
FieldValidateTrigger,

View File

@ -359,7 +359,7 @@ import type {
FieldClearTrigger,
FieldFormatTrigger,
FieldRuleValidator,
FiledRuleFormatter,
FieldRuleFormatter,
FieldValidateError,
FieldAutosizeConfig,
FieldValidateTrigger,

View File

@ -15,7 +15,7 @@ export type {
FieldClearTrigger,
FieldFormatTrigger,
FieldRuleValidator,
FiledRuleFormatter,
FieldRuleFormatter,
FieldValidateError,
FieldAutosizeConfig,
FieldValidateTrigger,

View File

@ -55,7 +55,7 @@ export type FieldRuleValidator = (
rule: FieldRule
) => boolean | string | Promise<boolean | string>;
export type FiledRuleFormatter = (value: any, rule: FieldRule) => string;
export type FieldRuleFormatter = (value: any, rule: FieldRule) => string;
export type FieldRule = {
pattern?: RegExp;
@ -63,7 +63,7 @@ export type FieldRule = {
message?: FieldRuleMessage;
required?: boolean;
validator?: FieldRuleValidator;
formatter?: FiledRuleFormatter;
formatter?: FieldRuleFormatter;
validateEmpty?: boolean;
};

View File

@ -17,7 +17,7 @@ export type PickerOption = {
disabled?: boolean;
children?: PickerColumn;
className?: unknown;
// for custom filed names
// for custom field names
[key: PropertyKey]: any;
};

View File

@ -54,7 +54,7 @@ export default defineComponent({
setup(props, { emit, slots, attrs }) {
const id = useId();
const filedRef = ref<FieldInstance>();
const fieldRef = ref<FieldInstance>();
const onCancel = () => {
if (!slots.action) {
@ -99,8 +99,8 @@ export default defineComponent({
}
};
const blur = () => filedRef.value?.blur();
const focus = () => filedRef.value?.focus();
const blur = () => fieldRef.value?.blur();
const focus = () => fieldRef.value?.focus();
const onBlur = (event: Event) => emit('blur', event);
const onFocus = (event: Event) => emit('focus', event);
const onClear = (event: MouseEvent) => emit('clear', event);
@ -123,7 +123,7 @@ export default defineComponent({
return (
<Field
v-slots={pick(slots, ['left-icon', 'right-icon'])}
ref={filedRef}
ref={fieldRef}
type="search"
class={bem('field')}
border={false}