摘要: 1. echarts在移动端, 不支持dataZoom, 手动滑动, 版本(5.2.0) 阅读全文
posted @ 2021-09-18 16:37 申继林 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 1. productionSourceMap vue.config.js 中将 productionSourceMap 参数值设置为false, 去掉打包的时候生成的map文件 2. CompressionWebpackPlugin 打包生成 gzip 压缩文件 安装: npm install co 阅读全文
posted @ 2021-06-24 17:45 申继林 阅读(266) 评论(0) 推荐(0) 编辑
摘要: function strToCamel(str){ return str.replace(/(^|_)(\w)/g,(m,$1,$2)=>$2.toUpperCase()); } 阅读全文
posted @ 2021-06-13 16:25 申继林 阅读(95) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2021-05-25 17:05 申继林 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 1. 安装 npm install vue-cropper --save-dev 2. 使用 <template> <div> <el-dialog title="选择图片" :visible.sync="isShowCropper" :before-close="handleClose" widt 阅读全文
posted @ 2021-04-28 15:40 申继林 阅读(512) 评论(0) 推荐(0) 编辑
摘要: keep-alive 会把其包裹的所有组件都缓存起来 <div id="app"> <keep-alive :include="include"> <router-view v-if="$route.meta.keepAlive" /> </keep-alive> <router-view v-if 阅读全文
posted @ 2021-04-24 17:26 申继林 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 1. 修改router/index.js mode: "history" base: "page" // 打包后放到服务器上, 域名后面的目录 127.0.0.1/page/index.html 2. 修改vue.config.js publicPath: '/page/' 3. 基于Apache服 阅读全文
posted @ 2021-04-24 10:35 申继林 阅读(254) 评论(0) 推荐(0) 编辑
摘要: !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch) 阅读全文
posted @ 2021-03-08 11:37 申继林 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 1.手机号 /^[1][3,4,5,6,7,8,9][0-9]{9}$/ 2.电话号(座机) /^((0\d{2,3})-)((\d{7,8})(-(\d{3,}))|(\d{7,8}))$/ 3.密码(8-16位, 至少两种字符) /^(?=.*[a-zA-Z0-9].*)(?=.*[a-zA-Z 阅读全文
posted @ 2021-03-03 10:24 申继林 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 1. 创建 preventReClick.js import Vue from 'vue' const preventReClick = Vue.directive('preventReClick', { inserted: function (el, binding) { el.addEventL 阅读全文
posted @ 2020-12-01 16:47 申继林 阅读(558) 评论(0) 推荐(0) 编辑