摘要: Document 计算机算数误差: 0.1+0.2 = 0.30000000000000004 17.45*3*0.9 = 47.114999999999995 17.45*0.9*3 = 47.115 用math进行计算,避免误差,见下方js ... 阅读全文
posted @ 2019-03-28 14:14 曾经的水哥 阅读(4764) 评论(0) 推荐(0) 编辑
摘要: //获取文件后缀 function getType(file){ var filename=file; var index1=filename.lastIndexOf("."); var index2=filename.length; var type=filename.substrin... 阅读全文
posted @ 2019-03-27 17:10 曾经的水哥 阅读(11768) 评论(0) 推荐(1) 编辑
摘要: 1.页面 <div id="qrCode" ref="qrCodeDiv"></div> 2.导入插件 import QRCode from 'qrcodejs2' 3.使用生成: 注意 定时器得要,避免dom未生成报错 document.getElementById("qrCode").inner 阅读全文
posted @ 2019-03-18 13:24 曾经的水哥 阅读(5385) 评论(0) 推荐(0) 编辑
摘要: 1. 使用插件 clamp.js 可实现多行文本超出后隐藏的功能 2. git地址 https://github.com/josephschmitt/Clamp.js 下载后项目引入clamp.js 3. //多行 3行 let demo = document.getElementById('dem 阅读全文
posted @ 2019-03-05 13:53 曾经的水哥 阅读(1947) 评论(1) 推荐(0) 编辑
摘要: 按照商品价格倒叙 点击倒叙 {{list.name}} ------------ {{list.gdPrice}} 阅读全文
posted @ 2019-01-26 15:40 曾经的水哥 阅读(745) 评论(0) 推荐(0) 编辑
摘要: confing/index.js 文件里面的 useEslint 改成false就可以关闭代码检查了 不过为了代码的规范性,不建议关闭! 阅读全文
posted @ 2019-01-21 16:15 曾经的水哥 阅读(1661) 评论(0) 推荐(0) 编辑
摘要: <template> <div class="upLoadIamge"> <el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-remove="handleRemove" :http-req 阅读全文
posted @ 2019-01-14 11:22 曾经的水哥 阅读(1229) 评论(1) 推荐(0) 编辑
摘要: nodejs代码 // 导入WebSocket模块: const WebSocket = require('ws'); // 引用Server类: const WebSocketServer = WebSocket.Server; // 实例化: const wss = new WebSocketS 阅读全文
posted @ 2019-01-12 12:57 曾经的水哥 阅读(5492) 评论(1) 推荐(0) 编辑
摘要: 把data里面需要回显的字段,加入一个数组arr,然后用后台传过来的json里的数据,循环json去判定arr里面有没有没有当前的对象的key,如果有就 阅读全文
posted @ 2019-01-10 15:36 曾经的水哥 阅读(6472) 评论(0) 推荐(0) 编辑
摘要: 2.得到结果: 2019-01-10 13:24:08 3. 原文链接: https://blog.csdn.net/CarryBest/article/details/79917871 阅读全文
posted @ 2019-01-10 13:30 曾经的水哥 阅读(6265) 评论(0) 推荐(0) 编辑