Vue拼图验证组件使用教程

时间:2020-01-09
本文章向大家介绍Vue拼图验证组件使用教程,主要包括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)
    },

  

原文地址:https://www.cnblogs.com/JiAyInNnNn/p/12172139.html