Skip to content

Teemwu/carnumber-input

Repository files navigation

carnumber-input

微信小程序车牌录入,在此文基础上进行修改。

预览

效果

使用

// index.js
Page({
  data: {
    isShowKB: false,
    placeholder: '京A66666'
  },
  showKB() {
    this.setData({
      isShowKB: true
    })
  },
  confirm(e) {
    console.log(e.detail);
  }
})
<!-- index.wxml -->
<carnumber-input value="粤C" 
                 placeholder="{{placeholder}}" 
                 show="{{isShowKB}}"
                 bind:confirm="confirm">
</carnumber-input>

属性

属性 类型 默认值 描述
value String '' 填充默认车牌前缀或车牌
placeholder String '' 显示提示到车牌
show Boolean false 控制组件到显示和隐藏

事件

名称 返回值类型 描述
confirm String 车牌号
cancel 点击组件关闭按钮时触发

About

微信小程序车牌录入

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published