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

2019-10-28 17:01:26 +08:00
 18510047382

我们决定在 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 !

3765 次点击
所在节点    JavaScript
9 条回复
18510047382
2019-10-28 17:12:24 +08:00
18510047382
2019-10-28 18:13:57 +08:00
预计会在后天发布,敬请期待
flyingfz
2019-10-28 20:33:39 +08:00
不好意思, 我前端不专业, 请问下,这个库的使用场景是啥?
为啥在这个场景要使用虚拟键盘?
zzetao
2019-10-28 21:23:55 +08:00
@flyingfz #3
1. 安全
2. 指定键供用户输入
wafm
2019-10-28 21:41:46 +08:00
希望可以加一个车牌输入组件
18510047382
2019-10-29 07:40:41 +08:00
@wafm 这个需求已经有人提过了,我们会在之后的版本加入的
anmie
2019-10-29 08:51:41 +08:00
我随手就是一记 star
18510047382
2019-10-29 09:17:30 +08:00
v1.0.0 正式版现在已经发布了!感谢各位支持!
18510047382
2019-10-29 11:18:19 +08:00
目前 NPM v1.0.0 也已经更新完毕了,各位可以在 github 和 gitee 上查看教程!

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/613722

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX