摘要:
利用a标签的download属性下载文件 axios({ method: 'get', // 此处不一定只是get方法,也可以通过参数传递 url: url, responseType: 'blob', // 此处重点:标明后端返回数据类型为流 }).then(res => { let blob = 阅读全文
posted @ 2021-08-25 10:23
webHYT
阅读(337)
评论(0)
推荐(0)
摘要:
js防抖常用封装 function debounce(func, wait, immediate) { let timeout, args, context, timestamp, result const later = function() { // 据上一次触发时间间隔 const last 阅读全文
posted @ 2021-08-25 10:18
webHYT
阅读(53)
评论(0)
推荐(0)
摘要:
1、Can I Use 一款实用的前端兼容性自查工具,地址:https://caniuse.com/ 是一个查询CSS、JS、HTML5、CSS、SVG在个中流行浏览器钟的特性和兼容性的网站 以flex为例子,改网站不但可以看到各版本的兼容性,更可以在真实的不同版本的浏览器中进行实测,但是免费使用时 阅读全文
posted @ 2021-08-25 10:13
webHYT
阅读(85)
评论(0)
推荐(0)
摘要:
多个echarts图表同时展示时 1、避免请求万所有数据再绘图,会出现加载时间过长用户体验不好 2、数据可以分开请求每个图标添加单独的loading,提升加载速度,也提高了用户体验 阅读全文
posted @ 2021-08-25 10:05
webHYT
阅读(535)
评论(0)
推荐(0)
摘要:
以柱状图为列 <template> <div :class="className" :style="{height:height,width:width}" /> </template> <script> import echarts from 'echarts' require('echarts/ 阅读全文
posted @ 2021-08-25 09:45
webHYT
阅读(578)
评论(0)
推荐(0)