vant icon indicating copy to clipboard operation
vant copied to clipboard

feat(Field): password field supports showing and hiding the password

Open keeplearning66 opened this issue 5 months ago • 4 comments

This PR is to close #13565

I added showPasswordIcon prop to support showing and hiding the password.

showPasswordIcon: used for users to set whether the password icon should be displayed showPwdIcon: used for internal confirmation of whether the password icon should be displayed, as there may be situations where it is not necessary to show the password icon passwordIcon: used to confirm the type of the password icon, which can be either eye-o or closed-eye showPassword: used to confirm whether the password field should display the password selectionInfo: used to record the cursor's position, and maintain focus when the password icon is clicked

After modification

https://github.com/user-attachments/assets/94df8b94-7891-438a-a4b5-807b9c8406a8

I have added the corresponding unit tests

keeplearning66 avatar Jul 24 '25 05:07 keeplearning66

Codecov Report

:x: Patch coverage is 75.00000% with 5 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 89.68%. Comparing base (ec5b45b) to head (b82fdab). :warning: Report is 177 commits behind head on main.

Files with missing lines Patch % Lines
packages/vant/src/field/Field.tsx 75.00% 3 Missing and 2 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13567      +/-   ##
==========================================
+ Coverage   89.60%   89.68%   +0.08%     
==========================================
  Files         257      257              
  Lines        7013     7060      +47     
  Branches     1736     1750      +14     
==========================================
+ Hits         6284     6332      +48     
- Misses        384      386       +2     
+ Partials      345      342       -3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar Jul 24 '25 05:07 codecov-commenter

When will this function be available online?

001cici avatar Sep 12 '25 06:09 001cici

I'm not sure either — this PR still hasn't been reviewed.

keeplearning66 avatar Sep 12 '25 06:09 keeplearning66

您的文件已收到,谢谢!

001cici avatar Sep 12 '25 06:09 001cici