vue车牌号模拟键盘
$ npm install keyboard-license-plate -S
import Vue from 'vue'
import KeyboardLicensePlate from 'keyboard-license-plate'
Vue.use(KeyboardLicensePlate)
<keyboard-license-plate ref="keyboard" v-model="licensePlateNumber"/>
Attr. Name | Type | Description | Required | Default Value |
---|---|---|---|---|
value | String | 绑定值 | N | - |
placeholder | String | 占位文本 | N | 车牌号码 |
default-province | String | 车牌号首位默认值 | N | 湘 |
z-index | Number | 键盘z-index样式值 | N | 5000 |
disabled-keys | Array | 禁用按钮值 | N | ['I', 'O'] |
focus()
获取焦点blur()
取消焦点
valid
布尔值,表示车牌号码格式是否正确
npm install
npm run serve