CATEGORY

前端

共 66 篇内容 · 第 3 / 4 页

前端

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
前端

小程序 setData key是变量时的用法

官方文档是这样的: changeItemInArray: function( ) { // you can use this way to modify a danamic data path this.setData({ 'array[0

466 阅读E Eric chan
前端

js中的数组对象排序

var arr = [{name: "zlw", age: 24}, {name: "wlz", age: 25}]; var compare = function (prop) { return function (obj1, obj2)

423 阅读E Eric chan
前端

JQuery 城市选择插件 citySelect

citySelect是面向于PC端的一款基于JQuery的、整体功能都比较完善的拼音分类和集成搜索功能的城市选择插件。 https://github.com/lquan529/citySelect DEMO https://lquan529

497 阅读E Eric chan
前端

实时监控可视化组件库 Zeu.js

Zeu.js 是一个 JavaScript 库,其中包含一系列预构建的可视化组件,用于构建实时 TV 仪表板,监控 UI 和物联网Web界面。

436 阅读E Eric chan
前端

前端生成二维码小插件–QRCode.js

地址 http://davidshimjs.github.io/qrcodejs/ 1、引入插件 /*html*/ <div id="qrcode"></div> /*js*/ <script src

504 阅读E Eric chan
前端

websocket或者tcp长连接实现登录验证办法 (1)

客户端通过用户名密码调用服务端的接口来获取角色Token 链接websoket时带上此Token(wss://localhost:7896/?token=Token) websoket服务端建立连接时验证此Token是否有效,无效则连接失败

1,282 阅读E Eric chan
前端

移动端 滚动插件 minirefresh

插件地址 https://github.com/minirefresh/minirefresh 使用代码 <!DOCTYPE html> <html> <head> {include file=

829 阅读E Eric chan