### 线上预览 ![image](https://masteryi-localhost.oss-cn-hangzhou.aliyuncs.com/uni-app/yi-code-qrcode.png) [更多UNI-APP模板点击查看](https://www.masteryi.cn/uni-app) ### 使用方法 `` ### 参数 | 属性 | 类型 | 说明 | 默认值 | |---------------|----------------|-----------------------------------|--------| | width | number | 宽度 rpx | 500 | | maxlength | number | 验证码长度 | 6 | | focus | boolean | 是否自动聚焦 | true | | type | string | 组件风格支持block方框, dashed 虚线方框,line 线 | block | | inputType | string | 输入框类型 支持text、number | number | | hide | string | 隐藏字符,传值则会使用该字符隐藏对应的验证码数字,类似于传 * 模拟密码遮盖效果 | null | | @onComplete | (code: string) | 输入长度===maxlength时的完成回调onComplete | null | | @onChange | (code: string) | code值变更回调onChange | null | | clear | ref function | 清除输入内容 | | ### 示例代码 ``` ```