diff --git a/docs/en-US/component/cascader.md b/docs/en-US/component/cascader.md index 469d4d6fda..d3f16578c1 100644 --- a/docs/en-US/component/cascader.md +++ b/docs/en-US/component/cascader.md @@ -167,8 +167,8 @@ cascader/panel | -------------- | --------------------------------------------------- | --------------------------------------------- | | change | triggers when the binding value changes | value | | expand-change | triggers when expand option changes | an array of the expanding node's parent nodes | -| blur | triggers when Cascader blurs | (event: Event) | -| focus | triggers when Cascader focuses | (event: Event) | +| blur | triggers when Cascader blurs | (event: FocusEvent) | +| focus | triggers when Cascader focuses | (event: FocusEvent) | | visible-change | triggers when the dropdown appears/disappears | true when it appears, and false otherwise | | remove-tag | triggers when remove tag in multiple selection mode | the value of the tag which is removed | diff --git a/docs/en-US/component/input-number.md b/docs/en-US/component/input-number.md index 29be1b1034..de41a5e47d 100644 --- a/docs/en-US/component/input-number.md +++ b/docs/en-US/component/input-number.md @@ -105,8 +105,8 @@ input-number/controlled | Event Name | Description | Parameters | | ---------- | ------------------------------- | ------------------------------------------------------ | | change | triggers when the value changes | (currentValue: number \| NaN, oldValue: number \| NaN) | -| blur | triggers when Input blurs | (event: Event) | -| focus | triggers when Input focuses | (event: Event) | +| blur | triggers when Input blurs | (event: FocusEvent) | +| focus | triggers when Input focuses | (event: FocusEvent) | ## Methods diff --git a/docs/en-US/component/input.md b/docs/en-US/component/input.md index 8d4e4d0d70..bd16df770a 100644 --- a/docs/en-US/component/input.md +++ b/docs/en-US/component/input.md @@ -162,8 +162,8 @@ input/length-limiting | Event Name | Description | Parameters | | ---------- | ----------------------------------------------------------------------------------------------------- | ------------------------- | -| blur | triggers when Input blurs | (event: Event) | -| focus | triggers when Input focuses | (event: Event) | +| blur | triggers when Input blurs | (event: FocusEvent) | +| focus | triggers when Input focuses | (event: FocusEvent) | | change | triggers when the input box loses focus or the user presses Enter, only if the modelValue has changed | (value: string \| number) | | input | triggers when the Input value change | (value: string \| number) | | clear | triggers when the Input is cleared by clicking the clear button | — | diff --git a/docs/en-US/component/select-v2.md b/docs/en-US/component/select-v2.md index 2c44511605..030012a5ae 100644 --- a/docs/en-US/component/select-v2.md +++ b/docs/en-US/component/select-v2.md @@ -182,8 +182,8 @@ select-v2/use-valueKey | visible-change | triggers when the dropdown appears/disappears | true when it appears, and false otherwise | | remove-tag | triggers when a tag is removed in multiple mode | removed tag value | | clear | triggers when the clear icon is clicked in a clearable Select | — | -| blur | triggers when Input blurs | (event: Event) | -| focus | triggers when Input focuses | (event: Event) | +| blur | triggers when Input blurs | (event: FocusEvent) | +| focus | triggers when Input focuses | (event: FocusEvent) | ## SelectV2 Slots diff --git a/docs/en-US/component/select.md b/docs/en-US/component/select.md index 3a4cc5a9e6..e4f736135c 100644 --- a/docs/en-US/component/select.md +++ b/docs/en-US/component/select.md @@ -156,8 +156,8 @@ If the binding value of Select is an object, make sure to assign `value-key` as | visible-change | triggers when the dropdown appears/disappears | true when it appears, and false otherwise | | remove-tag | triggers when a tag is removed in multiple mode | removed tag value | | clear | triggers when the clear icon is clicked in a clearable Select | — | -| blur | triggers when Input blurs | (event: Event) | -| focus | triggers when Input focuses | (event: Event) | +| blur | triggers when Input blurs | (event: FocusEvent) | +| focus | triggers when Input focuses | (event: FocusEvent) | ## Select Slots diff --git a/docs/en-US/component/time-select.md b/docs/en-US/component/time-select.md index d92bbdf510..5c2e3d1e53 100644 --- a/docs/en-US/component/time-select.md +++ b/docs/en-US/component/time-select.md @@ -73,8 +73,8 @@ time-select/time-range | Event Name | Description | Parameters | | ---------- | ------------------------------------- | ------------------------- | | change | triggers when user confirms the value | component's binding value | -| blur | triggers when Input blurs | component instance | -| focus | triggers when Input focuses | component instance | +| blur | triggers when Input blurs | (event: FocusEvent) | +| focus | triggers when Input focuses | (event: FocusEvent) | ## Methods diff --git a/packages/components/select/src/useSelect.ts b/packages/components/select/src/useSelect.ts index b9c280974c..32a0635537 100644 --- a/packages/components/select/src/useSelect.ts +++ b/packages/components/select/src/useSelect.ts @@ -724,7 +724,7 @@ export const useSelect = (props, states: States, ctx) => { nextTick(() => scrollToOption(states.selected)) } - const handleFocus = (event) => { + const handleFocus = (event: FocusEvent) => { if (!states.softFocus) { if (props.automaticDropdown || props.filterable) { if (props.filterable && !states.visible) { @@ -743,7 +743,7 @@ export const useSelect = (props, states: States, ctx) => { reference.value?.blur() } - const handleBlur = (event: Event) => { + const handleBlur = (event: FocusEvent) => { // https://github.com/ElemeFE/element/pull/10822 nextTick(() => { if (states.isSilentBlur) {