仿淘宝滑动验证码(滑动验证码)vue版

借鉴于https://www.jianshu.com/p/f5bf9ba0b27e

已封装为组件,供大家参考

sliderValidate.vue






调用:
html:

js:

import sliderValidate from '~/components/sliderValidate.vue'
export default {
  data(){
    return{
      validate_status:false,
    },
   components:{sliderValidate},
    methods:{
        //获取子组件滑块状态
            getNewStatus: function(val){
                this.temp.validate_status = val;
            },
    }
}

你可能感兴趣的:(仿淘宝滑动验证码(滑动验证码)vue版)