@zee.kim/vue-keypad

1.0.0 • Public • Published

vue-keypad

基于 Vue.js 的模拟数字键盘插件

安装

npm install --save @zee.kim/vue-keypad

使用

首先在项目的入口文件中引入, 调用 Vue.use 安装。

import vue-keypad from 'vue-keypad'
Vue.use(vue-keypad)
<div id="app">
    <div @click="input()">${{money}}</div>
    <keypad :show="keypad.show" @input="input()"></keypad>
</div>
export default {
  data() {
    return {
        money:"",
        keypad:{
            show:false,
            input:(value)=>{
                this.form.spentAmount=value;
            }
        },
    },
    methods:{
        input(){
            this.keypad.show=true;
            this.keypad.input=(value)=>{
                this.money=value;
            }
        }
    }
}

Readme

Keywords

Package Sidebar

Install

npm i @zee.kim/vue-keypad

Homepage

zee.kim

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

8.85 kB

Total Files

7

Last publish

Collaborators

  • zee.kim