UNPKG
@element-plus-next/vue-hooks
Version:
latest (3.0.0-alpha.5)
3.0.0-alpha.5
Vue hooks for Element Plus.
element-plus.org
element-plus/element-plus
@element-plus-next/vue-hooks
/
src
/
use-focus
/
index.ts
14 lines
(12 loc)
•
180 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
type
{
Ref
}
from
'vue'
export
const
useFocus
= (
el
:
Ref
<{ focus: () =>
void
} |
null
>
) => {
return
{
focus
:
() =>
{ el.
value
?.
focus
?.() }, } }