随笔分类 -  前端工具库

摘要:html <Form :label-width="100" :rules="ruleValidate" :model="editInfo" ref="addNewForm"> <Row> <Col span="24"> <Form-item prop="name" label="挂件名称"> <In 阅读全文
posted @ 2020-05-26 12:03 expworld 阅读(363) 评论(0) 推荐(0) 编辑
摘要:function formatDecimal(num, decimal) { num = num.toString() let index = num.indexOf('.') if (index !== -1) { num = num.substring(0, decimal + index + 阅读全文
posted @ 2020-05-19 17:07 expworld 阅读(14394) 评论(0) 推荐(2) 编辑
摘要:/** * 将数值格式化成金额形式 * * @param num 数值(Number或者String) * @param precision 精度,默认不变 * @param separator 分隔符,默认为逗号 * @return 金额格式的字符串,如'1,234,567',默认返回NaN * 阅读全文
posted @ 2020-04-23 17:29 expworld 阅读(301) 评论(0) 推荐(0) 编辑
摘要:timeToDate(time, format){ var t = new Date(time); var tf = function(i){return (i < 10 ? '0' : '') + i}; return format.replace(/yyyy|MM|dd|HH|mm|ss/g, 阅读全文
posted @ 2020-04-23 12:39 expworld 阅读(164) 评论(0) 推荐(0) 编辑
摘要:.loading{ display: inline-block; height: .24rem; width: .24rem; border-radius: 100%; border: 2px solid #666; border-bottom-color: transparent; positio 阅读全文
posted @ 2020-04-21 14:16 expworld 阅读(97) 评论(0) 推荐(0) 编辑
摘要:完整demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>de 阅读全文
posted @ 2020-04-14 16:54 expworld 阅读(436) 评论(0) 推荐(0) 编辑
摘要:<html> <head> <p style="font-size: 20px;color: red;">使用a标签方式将json导出csv文件</p> <button onclick='tableToExcel()'>导出</button> </head> <body> <script> function tableToExcel(){ //要导出的json数据 const jsonData = 阅读全文
posted @ 2019-08-21 15:53 expworld 阅读(507) 评论(0) 推荐(0) 编辑
摘要:1、formdata对象append增加值,打印对象无效? 实际取值方式:( formData.get, getAll, keys) 引用:https://developer.mozilla.org/zh-CN/docs/Web/API/FormData/Using_FormData_Objects 阅读全文
posted @ 2019-03-25 21:25 expworld 阅读(100) 评论(0) 推荐(0) 编辑
摘要:function getDate() { var myDate = new Date(); var month = myDate.getMonth() + 1; var day = myDate.getDate(); month = (month.toString(... 阅读全文
posted @ 2019-03-14 15:52 expworld 阅读(163) 评论(0) 推荐(0) 编辑
摘要:effect : 'coverflow',// cube // 切换效果 阅读全文
posted @ 2019-03-07 21:08 expworld 阅读(646) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示