mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-17 13:01:46 +08:00
feat(hooks): add use-aria hooks (#16598)
* feat(hooks): add use-aria hooks * feat(components): update * feat(hooks): update * feat(hooks): update
This commit is contained in:
@ -37,7 +37,7 @@
|
||||
:readonly="readonly"
|
||||
:autocomplete="autocomplete"
|
||||
:tabindex="tabindex"
|
||||
:aria-label="label"
|
||||
:aria-label="label || ariaLabel"
|
||||
:placeholder="placeholder"
|
||||
:style="inputStyle"
|
||||
:form="form"
|
||||
@ -117,7 +117,7 @@
|
||||
:readonly="readonly"
|
||||
:autocomplete="autocomplete"
|
||||
:style="textareaStyle"
|
||||
:aria-label="label"
|
||||
:aria-label="label || ariaLabel"
|
||||
:placeholder="placeholder"
|
||||
:form="form"
|
||||
:autofocus="autofocus"
|
||||
@ -178,6 +178,7 @@ import {
|
||||
import {
|
||||
useAttrs,
|
||||
useCursor,
|
||||
useDeprecated,
|
||||
useFocusController,
|
||||
useNamespace,
|
||||
} from '@element-plus/hooks'
|
||||
@ -525,6 +526,17 @@ onMounted(() => {
|
||||
nextTick(resizeTextarea)
|
||||
})
|
||||
|
||||
useDeprecated(
|
||||
{
|
||||
from: 'label',
|
||||
replacement: 'aria-label',
|
||||
version: '2.8.0',
|
||||
scope: 'el-input',
|
||||
ref: 'https://element-plus.org/en-US/component/input.html',
|
||||
},
|
||||
computed(() => !!props.label)
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
/** @description HTML input element */
|
||||
input,
|
||||
|
Reference in New Issue
Block a user