摘要: /** * object转化成url拼接样式 * @param obj 需要转化的参数 */ const objToUrl = obj => { let arr = []; for(let i in obj){ if (obj.hasOwnProperty(i)) { arr.push(encode 阅读全文
posted @ 2020-12-31 11:05 拈花醉 阅读(604) 评论(0) 推荐(0) 编辑
摘要: export const getParamsToString = (obj) => { let str = ''; for (const key in obj) { str += `${key}=${obj[key]}&`; } return str.substr(0, str.length - 1 阅读全文
posted @ 2020-12-31 11:02 拈花醉 阅读(1263) 评论(0) 推荐(0) 编辑
摘要: // get请求 export const get = ({ url, params = {}, headers = {}, title = '加载中' }) => new Promise((resolve, reject) => { loading.open(title); axios.get(u 阅读全文
posted @ 2020-12-31 10:57 拈花醉 阅读(989) 评论(0) 推荐(0) 编辑
摘要: // 校验身份证 export const checkNumber = (number) => { const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; return reg.test(number); }; // 根据身份证,获取 出生年月 阅读全文
posted @ 2020-12-31 10:50 拈花醉 阅读(496) 评论(0) 推荐(0) 编辑
摘要: export const formatTime = (time) => { if (!time) { return ''; } const y = time.substr(0, 4); const m = time.substr(4, 2); const d = time.substr(6, 2); 阅读全文
posted @ 2020-12-31 10:47 拈花醉 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 引用: <script type="text/javascript" src="/public/js/cryptoJs/core-min.js"></script> <script type="text/javascript" src="/public/js/cryptoJs/enc-base64- 阅读全文
posted @ 2020-12-31 10:30 拈花醉 阅读(5124) 评论(0) 推荐(0) 编辑
摘要: 参考:https://blog.csdn.net/weixin_44416019/article/details/96976261 在使用vue+elementUI开发后台管理项目时,需要修改默认颜色,步骤如下。 步骤: 进入项目文件夹 cd 你的项目文件夹名称 全局安装主题生成工具 cnpm i 阅读全文
posted @ 2020-11-18 18:15 拈花醉 阅读(7891) 评论(0) 推荐(1) 编辑
摘要: 加载动画 Echarts已经内置好了加载数据的动画,只需要在合适的时机显示或隐藏 myChart.showLoading() // 显示 myChart.hideLoading() // 隐藏 动画配置 animation:true, // 默认是true 是否开启动画 animationDurat 阅读全文
posted @ 2020-11-15 17:43 拈花醉 阅读(1608) 评论(0) 推荐(0) 编辑
摘要: echarts属性的设置(完整大全) 转载于:https://www.cnblogs.com/benmumu/p/8316652.html / / 全图默认背景 // backgroundColor: ‘rgba(0,0,0,0)’, // 默认色板 color: ['#ff7f50','#87ce 阅读全文
posted @ 2020-11-15 17:41 拈花醉 阅读(145) 评论(0) 推荐(0) 编辑
摘要: initMenu.splice(initMenu.findIndex(item => item undefined), 1) // for (let i = 0; i < initMenu.length; i++) { // if (initMenu[i] == null || initMenu[i 阅读全文
posted @ 2020-11-04 13:59 拈花醉 阅读(6838) 评论(0) 推荐(0) 编辑