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:
kooriookami
2024-04-23 13:56:44 +08:00
committed by GitHub
parent b974fcbc51
commit bd1613d599
43 changed files with 426 additions and 273 deletions

View File

@ -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,