Vue拼图验证组件使用教程


找一个你需要的
我这里选择的是控制误差的demo用。

使用方法:

npm i vue-puzzle-verification

在mian.js中引入

import PuzzleVerification from 'vue-puzzle-verification'
Vue.use(PuzzleVerification )

  

  <div class="login-box">
             <div class="puzzle-box">
                 <PuzzleVerification
                    v-model="isVerificationShow4"
                    :puzzleImgList="puzzleImgList"
                     deviation="20"
                     blockType="puzzle"
                    :onSuccess="handleSuccess"
                    />
              </div>
       </div>

登录页面使用后会出现报错问题。


同事说是因为监听没有销毁…
所以

 beforeDestory(){
       document.removeEventListener("mousemove",this.moving);
       document.removeEventListener("touchmove",this.moving);
       document.removeEventListener("mouseup",this.moveEnd);
       document.removeEventListener("touchend",this.moveEnd)
    },

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM