Skip to content

weiyunpeng/mpvue-keyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpvue-keyboard 基于 mpvue的小程序虚拟键盘组件

npm package npm downloads

效果图

默认效果1 默认效果2

属性

名称 类型 默认值 描述
title String 输入或拍照录入车牌 自定义 标题
baseBorColor String #cccccc 自定义输入格子边框颜色
activeBorColor String #ff7149 自定义正在输入的格子边框颜色
keyboard Function null 获取键盘输入结果

基本使用方法

  • 安装
npm i mpvue-keyboard --save
  • 使用
<template>
<view>车牌号为:<text style="font-size:60rpx">{{msg}}</text></view>
    <keyboard :title="'输入车牌号'" @keyboard="change"></keyboard>
</template>

<script>
import Keyboard from 'mpvue-keyboard';
export default {
    components: {
        keyboard: Keyboard
    },
    data() {
        return {
            msg:msg
        };
    },
    computed: {},
    methods: {
        change(msg) {
            console.log(msg);
            this.msg = msg
        }
    },
    mounted() {}
};
</script>

About

mpvue的虚拟键盘组件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages