Not much to say, let's go directly to the topic. To realize the display and hiding of the password, we can directly add show-password in the el-input box
I originally set type="password" for the password input box (the input box type is password, that is, the entered content is displayed in the form of "ciphertext")
Excellent: displayed in ciphertext;
Poor: can't view the entered content;
<el-form-item label="密码" prop="dorPassword">
<el-input v-model="form.dorPassword" style="width:260px;" type="password">
</el-input>
</el-form-item>
Show and hide passwords
<el-form-item label="密码" prop="dorPassword">
<el-input v-model="form.dorPassword" style="width:260px;" show-password>
</el-input>
</el-form-item>
Click to view the small icon to view