摘要: 清除router参数: 1.this.$router.push({ query: {}}) 2.var path = this.$route.path; //获取路由路径 this.$router.push(path); //跳转路由路径不携带query参数 阅读全文
posted @ 2021-05-17 13:43 吃不棒的胖胖糖 阅读(2083) 评论(0) 推荐(0) 编辑
摘要: /** * kevin 2021/2/22 * @description 正则控制输入数字格式;可输入小数 * @param param * @param num 保留小数位数只能保留2位,3位,4位, 默认2位 * @param negativeBool 是否可以为负数 默认可以为负数 * @pa 阅读全文
posted @ 2021-05-08 15:18 吃不棒的胖胖糖 阅读(903) 评论(0) 推荐(0) 编辑
摘要: /** * 判断日期格式是否正确 * @param {(Object|string|number)} time 日期 * @returns {Boolean | true} */ export function checkDate(time) { var data = /^(\d{4})-(\d{2 阅读全文
posted @ 2021-04-25 14:23 吃不棒的胖胖糖 阅读(231) 评论(0) 推荐(0) 编辑
摘要: addClass(document.body, 'showRightPanel') removeClass(document.body, 'showRightPanel') /** * Add class to element * @param {HTMLElement} elm * @param  阅读全文
posted @ 2021-04-25 14:12 吃不棒的胖胖糖 阅读(201) 评论(0) 推荐(0) 编辑
摘要: /** * kevin 2021.1.4 * 将rgb表示方式转换为hex表示方式 * @param {string} rgbColor 传过来的hex格式的颜色 * @returns {string | null} */ export function colorHex(rgbColor) { v 阅读全文
posted @ 2021-04-25 14:07 吃不棒的胖胖糖 阅读(209) 评论(0) 推荐(0) 编辑
摘要: /** * kevin 2021.1.4 * 根据色值深浅返回相对应的深浅字体颜色 * @param {string} hex 传过来的hex格式的颜色 * @returns {string | null} */ export function fontColorConvert(hex) { //  阅读全文
posted @ 2021-04-25 14:05 吃不棒的胖胖糖 阅读(82) 评论(0) 推荐(0) 编辑
摘要: /** * kevin 2021/1/4 * @description el-upload + accept限制上传的文件格式 * @param e 校验的类型 * @returns {string | null} */ export function acceptFile(e) { const a 阅读全文
posted @ 2021-04-25 13:10 吃不棒的胖胖糖 阅读(2533) 评论(0) 推荐(0) 编辑
摘要: /** * 生成随机uuid */ export function uuid() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = Math.random() * 16 | 0 阅读全文
posted @ 2021-04-25 11:49 吃不棒的胖胖糖 阅读(87) 评论(0) 推荐(0) 编辑
摘要: /** * 文件流转换 主要代码块,可自定义下载文件名称 * @param {} data */ export function download(data, titName) { if (!data) { return } const content = data const blob = new 阅读全文
posted @ 2021-04-25 11:47 吃不棒的胖胖糖 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1.从git上复制http路径 2.在vs code的工作区新建文件夹 3.选择添加远程储存库 4.输入复制的git路径然后命名远程储存库名称 5.选择从所有远程储存库中拉取分支 6.选择分支,切换当前的分支 6.1.点击左下角进入分支选择 6.2点击签出到 7.点击拉取,获取git代码 8.当更改 阅读全文
posted @ 2021-03-08 10:30 吃不棒的胖胖糖 阅读(213) 评论(0) 推荐(0) 编辑