基于vue 实现图片验证码;vue实现验证码倒计时60s
2019-06-03 本文已影响340人
涼涼_570e
1.基于VUE实现图片验证码
html:
<div class="formItem pr">
<img src="../../image/icon2.png" alt="">
<input type="text" placeholder="请输入验证码">
<img :src="IdentifyingCode" alt="图文验证码" class="IdentifyingCode" @click="updateIdentifyingCode(true)">
</div>
js:

2.vue实现验证码倒计时60s
html:
<div class="formItem">
<img src="../../image/icon2.png" alt="">
<input type="text" placeholder="请输入验证码">
<button class="button" type="button" name="button" @click="sendCode()" v-show="show">获取验证码</button>
<button class="button codebtn" type="button" name="button" v-show="!show">{{sum}}s</button>
</div>
js:

效果图:

