van-field 查看密码 眼睛

 

 

       <van-field
                      class="login-input"
                      v-model="OaPassword"
                      :type="!showPassword ? 'password' : 'text'"
                      left-icon="user-o"
                      :right-icon="showPassword ? 'eye-o' : 'closed-eye'"
                      name="密码"
                      placeholder="请输入密码"
                      :rules="[{ required: true, message: '请输入密码' }]"
                      @click-right-icon="showPassword = !showPassword"
                    >
                      <template slot="left-icon">
                        <span class="icon-ticketsuoding iconfont"></span>
                      </template>
                    </van-field>

 

posted @ 2024-07-24 15:52  ThisCall  阅读(45)  评论(0编辑  收藏  举报