mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
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:
parent
b9862b3c41
commit
4aa33c17a6
@ -7,7 +7,7 @@ export type CascaderOption = {
|
||||
disabled?: boolean;
|
||||
children?: CascaderOption[];
|
||||
className?: unknown;
|
||||
// for custom filed names
|
||||
// for custom field names
|
||||
[key: PropertyKey]: any;
|
||||
};
|
||||
|
||||
|
@ -340,7 +340,7 @@ import type {
|
||||
FieldClearTrigger,
|
||||
FieldFormatTrigger,
|
||||
FieldRuleValidator,
|
||||
FiledRuleFormatter,
|
||||
FieldRuleFormatter,
|
||||
FieldValidateError,
|
||||
FieldAutosizeConfig,
|
||||
FieldValidateTrigger,
|
||||
|
@ -359,7 +359,7 @@ import type {
|
||||
FieldClearTrigger,
|
||||
FieldFormatTrigger,
|
||||
FieldRuleValidator,
|
||||
FiledRuleFormatter,
|
||||
FieldRuleFormatter,
|
||||
FieldValidateError,
|
||||
FieldAutosizeConfig,
|
||||
FieldValidateTrigger,
|
||||
|
@ -15,7 +15,7 @@ export type {
|
||||
FieldClearTrigger,
|
||||
FieldFormatTrigger,
|
||||
FieldRuleValidator,
|
||||
FiledRuleFormatter,
|
||||
FieldRuleFormatter,
|
||||
FieldValidateError,
|
||||
FieldAutosizeConfig,
|
||||
FieldValidateTrigger,
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -17,7 +17,7 @@ export type PickerOption = {
|
||||
disabled?: boolean;
|
||||
children?: PickerColumn;
|
||||
className?: unknown;
|
||||
// for custom filed names
|
||||
// for custom field names
|
||||
[key: PropertyKey]: any;
|
||||
};
|
||||
|
||||
|
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user