摘要:
使用的是es6中扩展字符串方法参考地址 使用padStart() 两个参数padStart(字符串最小长度,用来补全的字符串); 例如 ok,完成 阅读全文
摘要:
page, view, scroll-view, swiper, movable-area, cover-view, text, icon, rich-text, progress, button, checkbox-group, checkbox, form, input, label, picker, picker-view, radio-group, slider, switch, tex... 阅读全文
摘要:
let filterMoney = (value, n = 2) => { let money = parseFloat((value + "").replace(/[^\d\.-]/g, "")).toFixed(n) + ""; let a = money.split(".")[0].split("").reverse(); let b = money.split(".")[1]... 阅读全文
摘要:
上述错误的原因是不支持 Promise 方法,导致页面出现空白无法加载。 解决方法如下: 1、安装 babel-polyfill 2、在webpack.config.js中入口设置 参考:https://www.cnblogs.com/weiqinl/p/6794612.html 阅读全文
摘要:
var image = new Image(); var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); var img = document.getElementById("scream"); ctx.font = "10px Arial"; function createImg(name, zuo... 阅读全文
摘要:
在网上找的一个表格转excel插件,经过修改后使其适用于iview中的table组件 示例 阅读全文
摘要:
//金额转大写数字 const intToChinese = money => { //汉字的数字 let cnNums = new Array('零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'); //基本单位 let cnIntRadice = new Array('', '拾', '佰', '仟'); //对应整数 阅读全文
摘要:
在网上搜到的:原因是(webstorm默认保存在临时文件) 连接 1、打开设置 2、把 System Settings => Synchornization => 最后一项勾去掉 阅读全文
摘要:
/*scss*/.switch { position: relative; width: 50px; height: 25px; background-color: #fff; border: none; outline: none; i { position: absolute; left: 0; to... 阅读全文
摘要:
export default function(data = 1){ let myDate; if(data !== 1){ myDate = new Date(data * 1000); }else{ myDate = new Date(); } let Y = myDate.getFullYear(), M = myDate.getMont... 阅读全文