前端

input框 限制只能输入金额

<input type="text"  onkeyup="onlyNumber(this)"/>      function onlyNumber(obj){    

545 阅读E Eric chan
前端

uniapp 里面 用 event bus 传递消息

// main.js 文件 // 全局 event bus Vue.prototype.$eventHub = new Vue(); // a.js 接收参数的文件 _self = this // 监听 全局 event bus this.

1,563 阅读E Eric chan
前端

uniapp 下设置全局变量小技巧

直接上代码 // 挂载 Vue.prototype // 示例如下: // 在 main.js 中挂载属性/方法 Vue.prototype.websiteUrl = 'http://uniapp.dcloud.io'; Vue.proto

868 阅读E Eric chan
前端

uniapp 适配 刘海屏小技巧

var(--status-bar-height) 此变量在微信小程序环境为固定 25px,在 5+App 里为手机实际状态栏高度。 当设置 "navigationStyle":"custom" 取消原生导航栏后,由于窗体为沉浸式,占据了状态

4,762 阅读E Eric chan