V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
18510047382
V2EX  ›  JavaScript

JS 虚拟键盘 A-Keyboard 即将发布 Vue 版

  •  1
     
  •   18510047382 · 2019-10-28 17:01:26 +08:00 · 3734 次点击
    这是一个创建于 1613 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我们决定在 A-Keyboard 下个版本更新中加入 Vue 键盘。敬请期待,用法如下:

    <a-keyboard :fixed-bottom-center="fixedBottomCenter" :style="styleObject" :input-on="inputOnObject" :onclick="onclickObject"></a-keyboard>
    
    const keyboard = new Vue({
        el: '#main',
        components: {
            'a-keyboard': aKeyboardVue.keyboard
        },
        data: {
            fixedBottomCenter: false,
            styleObject: {},
            inputOnObject: {
                inputEl: '#input',
                inputType: 'value'
            },
            onclickObject: {
                Enter: function() {
                    alert('oh! 这是自定义事件!它覆盖了原始的回车事件。This is a custom event! It override the original enter event.');
                },
                // '*': function() {
                //     alert('oh! 这是自定义事件,它覆盖了所有的键。This is a custom event that covers all the keys.')
                // }
            }
        }
    })
    

    图片

    我们为你提供了 Default、Classic、Dark、GrassGreen 这四种默认样式

    普通键盘:

    数字键盘:

    手机键盘:

    发行

    我们的版本目前发行在以下几个平台上:

    Github Gitee 码云 NPM

    欢迎 Star、Fork、Watch !

    9 条回复    2019-10-29 11:18:19 +08:00
    18510047382
        1
    18510047382  
    OP
       2019-10-28 17:12:24 +08:00
    18510047382
        2
    18510047382  
    OP
       2019-10-28 18:13:57 +08:00
    预计会在后天发布,敬请期待
    flyingfz
        3
    flyingfz  
       2019-10-28 20:33:39 +08:00
    不好意思, 我前端不专业, 请问下,这个库的使用场景是啥?
    为啥在这个场景要使用虚拟键盘?
    zzetao
        4
    zzetao  
       2019-10-28 21:23:55 +08:00
    @flyingfz #3
    1. 安全
    2. 指定键供用户输入
    wafm
        5
    wafm  
       2019-10-28 21:41:46 +08:00
    希望可以加一个车牌输入组件
    18510047382
        6
    18510047382  
    OP
       2019-10-29 07:40:41 +08:00
    @wafm 这个需求已经有人提过了,我们会在之后的版本加入的
    anmie
        7
    anmie  
       2019-10-29 08:51:41 +08:00
    我随手就是一记 star
    18510047382
        8
    18510047382  
    OP
       2019-10-29 09:17:30 +08:00
    v1.0.0 正式版现在已经发布了!感谢各位支持!
    18510047382
        9
    18510047382  
    OP
       2019-10-29 11:18:19 +08:00
    目前 NPM v1.0.0 也已经更新完毕了,各位可以在 github 和 gitee 上查看教程!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2724 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 00:22 · PVG 08:22 · LAX 17:22 · JFK 20:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.