🔨 命令发送.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import type { VNodeRef } from 'vue';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
// 设置 ref 自动聚焦
|
||||
export const setAutoFocus = (el: HTMLElement) => {
|
||||
export const setAutoFocus: VNodeRef = ((el: HTMLElement) => {
|
||||
// 自动聚焦
|
||||
nextTick(() => {
|
||||
el && el.focus();
|
||||
});
|
||||
};
|
||||
}) as unknown as VNodeRef;
|
||||
|
||||
Reference in New Issue
Block a user