-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee8d246
commit 51b6bd8
Showing
6 changed files
with
122 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,51 @@ | ||
# mpvue-keyboard | ||
基于 mpvue的小程序虚拟键盘组件 | ||
# mpvue-keyboard 基于 mpvue的小程序虚拟键盘组件 | ||
|
||
## 效果图 | ||
 | ||
 | ||
|
||
## 属性 | ||
|
||
| 名称 | 类型 | 默认值 | 描述 | | ||
| -----------------|--------------- | ------------- | ---------------- | | ||
| title | String | 输入或拍照录入车牌 | 自定义 标题 | | ||
| bgcolor | String | #ffffff | 自定义背景颜色 | | ||
| baseBorColor | String | #cccccc | 自定义输入格子边框颜色 | | ||
| activeBorColor | String | #ff7149 | 自定义正在输入的格子边框颜色 | | ||
| keyboard | Function | null | 获取键盘输入结果 | | ||
|
||
## 基本使用方法 | ||
|
||
* 安装 | ||
|
||
``` bash | ||
npm i mpvue-keyboard --save | ||
``` | ||
|
||
* 使用 | ||
|
||
``` vue | ||
<template> | ||
<keyboard :title="'输入车牌号'" @keyboard="change"></keyboard> | ||
</template> | ||
<script> | ||
import Keyboard from '@/src/keyboard'; | ||
export default { | ||
components: { | ||
keyboard: Keyboard | ||
}, | ||
data() { | ||
return {}; | ||
}, | ||
computed: {}, | ||
methods: { | ||
change(msg) { | ||
console.log(msg); | ||
} | ||
}, | ||
mounted() {} | ||
}; | ||
</script> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<template> | ||
<keyboard :title="'输入车牌号'" @keyboard="change"></keyboard> | ||
</template> | ||
|
||
<script> | ||
import Keyboard from '@/src/keyboard'; | ||
export default { | ||
components: { | ||
keyboard: Keyboard | ||
}, | ||
data() { | ||
return {}; | ||
}, | ||
computed: {}, | ||
methods: { | ||
change(msg) { | ||
console.log(msg); | ||
} | ||
}, | ||
mounted() {} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.