From 619b0b33e72987f0f70e73f05fc0f25cfe8a8f78 Mon Sep 17 00:00:00 2001 From: ZXSheng <952396285@qq.com> Date: Thu, 1 Dec 2022 15:13:55 +0800 Subject: [PATCH] perf: add autofocus to login username input (halo-dev/console#742) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement #### What this PR does / why we need it: 以便用户可以直接输入用户名,不需要再进行额外的鼠标键盘操作 #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/2779 #### Screenshots: ![image](https://user-images.githubusercontent.com/28836989/204964637-07cb3b3f-efbe-4045-991e-a73698176dd1.png) ```release-note Console 端登录页面支持自动聚焦输入框 ``` --- src/components/login/LoginForm.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/login/LoginForm.vue b/src/components/login/LoginForm.vue index 9f098003a..7144debb1 100644 --- a/src/components/login/LoginForm.vue +++ b/src/components/login/LoginForm.vue @@ -86,6 +86,7 @@ onMounted(() => { }" name="username" placeholder="用户名" + :autofocus="true" type="text" validation="required" >