zbmlogin

1.2.6 • Public • Published

注册绑定及验证码模块

引入组件时需传递如下参数

 props:{
            title:{  //标题,可不传
                type: String,
                default: '绑定手机号'
            },
            count:{ //验证码倒计时间隔,默认60秒
                type: Number(),
                default: 60
            },
            btnText:{   //提交按钮的文案,可不传
                type: String,
                default: '绑定'
            },
            zbmCode:{   //发送短信验证码方法,由父组件发送请求,此方法第一个参数为子组件实例
                type: Function,
                required:true
            },
            zbmLogin:{ //绑定手机号方法,由父组件发送请求,此方法第一个参数为子组件实例
                type: Function,
                required:true
            },
            captcha:{    //图形验证码地址
                type: String,
                required:true
            }

zbmCodezbmLogin 可以通过第一个参数传入的子组件实例调用实例上的方法:

  1. refreshImg 刷新图形验证码
  2. countDown 倒计时

======================

e.g.

<Login
    :btnText="'注册'"
    :title="'注册'"
    :zbmCode="this.requestCode"
    :zbmLogin="this.login"
    :captcha="'http://api.zgtcb.com/api/newActivity/getCaptcha'"
>

</Login>

Readme

Keywords

Package Sidebar

Install

npm i zbmlogin

Weekly Downloads

1

Version

1.2.6

License

ISC

Unpacked Size

628 kB

Total Files

6

Last publish

Collaborators

  • bdbd001