fix(input): 为密码可见性切换按钮补上 mousedown.prevent,修复连续点击时误选中页面文本 (#4291)

This commit is contained in:
Georgyhongbo 2026-08-04 19:35:24 +08:00 committed by GitHub
parent 4be2d53c13
commit bb894e68e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -232,6 +232,7 @@
role="button"
:aria-label="state.passwordVisible ? 'hide password' : 'show password'"
tabindex="0"
@mousedown.prevent
@click.native="handlePasswordVisible"
></component>
<component
@ -246,6 +247,7 @@
role="button"
:aria-label="state.maskValueVisible ? 'hide content' : 'show content'"
tabindex="0"
@mousedown.prevent
@click.native="state.maskValueVisible = !state.maskValueVisible"
></component>
<span

View File

@ -143,6 +143,7 @@
role="button"
:aria-label="state.passwordVisible ? 'hide password' : 'show password'"
tabindex="0"
@mousedown.prevent
@click.native="handlePasswordVisible"
></component>
<component
@ -152,6 +153,7 @@
role="button"
:aria-label="state.maskValueVisible ? 'hide content' : 'show content'"
tabindex="0"
@mousedown.prevent
@click.native="state.maskValueVisible = !state.maskValueVisible"
></component>
<span