摘要: 直接上代码 this.totalScore = arr.reduce( (prev, cur) => { return cur.score + prev; }, 0 ); 阅读全文
posted @ 2020-06-30 10:04 Jennyishere 阅读(231) 评论(0) 推荐(1)
摘要: 首先 定义路由,添加参数 {name: 'preview', path: 'preview/:id', //参数 component: () => import( '@/ ' ) } 传参时使用name和params this.$router.push({ name: 'preview', para 阅读全文
posted @ 2020-06-30 10:00 Jennyishere 阅读(1911) 评论(1) 推荐(1)
摘要: 看了一个面试题,记下 先理清概念: 防抖 触发高频事件后n秒内函数只会执行一次,如果n秒内高频事件再次被触发,则重新计算时间 思路: 每次触发事件时都取消之前的延时调用方法 function f1(fn) { let timer = null; //每次进来都把定时器删掉 return functi 阅读全文
posted @ 2020-05-29 10:46 Jennyishere 阅读(231) 评论(0) 推荐(0)
摘要: 找到babel.config.js文件,添加ignore路径 module.exports = { "presets": ['@vue/app'], "ignore": ['./public/hj/js/webVideoCtrl.js'], } 如果要忽略node_modules的文件,以上配置就没 阅读全文
posted @ 2020-05-28 16:10 Jennyishere 阅读(6321) 评论(0) 推荐(0)
摘要: 直接上代码: getImgSrc(content) { let reg = /src="([^"]*)"/g; let arr = content.match(reg) ? content.match(reg) : []; //得到src=''的数组 let src = []; if (arr.le 阅读全文
posted @ 2020-05-25 16:06 Jennyishere 阅读(781) 评论(0) 推荐(0)
摘要: 介绍:Nginx功能丰富,可作为HTTP服务器,也可作为反向代理服务器,邮件服务器。支持FastCGI、SSL、Virtual Host、URL Rewrite、Gzip等功能。并且支持很多第三方的模块扩展。 作用:分布式部署 首先下载nginx: http://nginx.org/en/downl 阅读全文
posted @ 2020-05-25 14:04 Jennyishere 阅读(277) 评论(0) 推荐(0)
摘要: 下载引入注册,通过 npm 获取 echarts npm install echarts --save 在main.js文件里引入并挂载到原型上 import echarts from 'echarts' Vue.prototype.$echarts = echarts 页面代码: // 页面准备一 阅读全文
posted @ 2020-05-21 11:40 Jennyishere 阅读(449) 评论(0) 推荐(0)
摘要: INSERT INTO table_name (field1, field2,...fieldN) VALUES (valueA1,valueA2,...valueAN),(valueB1,valueB2,...valueBN),(valueC1,valueC2,...valueCN),...... 阅读全文
posted @ 2020-05-21 10:53 Jennyishere 阅读(288) 评论(0) 推荐(0)
摘要: 1,下载 npm install xss -S 2.在使用wang的地方引入 import xss from 'xss 3.找到editor实例 this.editor = new E(this.$refs.toolbar, this.$refs.editor); 4.找到html内容进行xss过滤 阅读全文
posted @ 2020-05-21 09:51 Jennyishere 阅读(2614) 评论(1) 推荐(1)
摘要: 使用过两种解决方案: 1是用原始的for循环 for(let i=0;i<_this.dataShow.length;i++){ _this.dataShow[i].MarkContent = await _this.$curl.get(_this.dataShow[i].MarkContentUr 阅读全文
posted @ 2020-05-21 09:48 Jennyishere 阅读(1990) 评论(1) 推荐(2)