ZSWYD

Verify滑块校验的简单使用

  1. 组件引入
    将文件夹放入项目并引入
    import Verify from '../../common/verifition/Verify.vue'
    components注册
    <Verify ref='verify' :captcha-type="'blockPuzzle'" @success="success" @error="error" />
  2. 传参
    必要:captcha-type="'blockPuzzle'"
    必要ref='verify'
    可选:img-size="{width:'400px',height:'200px'}"
    成功的回调:@success="success"
    失败的回调@error="error"
  3. 展示
    this.$refs.verify.show()
    success(e){}

posted on 2022-09-04 18:39  苏舒  阅读(323)  评论(0)    收藏  举报

导航