mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 04:37:47 +08:00
docs(components): adjust the type of focus event (#9620)
This commit is contained in:
parent
e0a73c8d4d
commit
262bb786c8
@ -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 |
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 | — |
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user