摘要: let resdata=[{id:'1',name:'小花’},{id:'2',name:'小明’},{id:'3',name:'小马哥'},{id:'1',name:'小王'}]let hash = {};let newArr = resdata.reduce((item, next) => { 阅读全文
posted @ 2021-09-17 10:40 白_小白 阅读(83) 评论(0) 推荐(0)
摘要: 获取当前页面的域名: var host = window.location.protocol + '//' + window.location.host; 将页面地址转为二维码 引入qrcode.min.js <div id="qrcode"></div> new QRCode(document.g 阅读全文
posted @ 2021-08-19 14:47 白_小白 阅读(420) 评论(0) 推荐(0)
摘要: dataZoom : [ { show:true, xAxisIndex:[0], type:'slider', bottom:'2%', left:'center', startValue:start, endValue:end, orient:'horizontal', realtime:fal 阅读全文
posted @ 2021-06-29 09:43 白_小白 阅读(1821) 评论(0) 推荐(1)
摘要: 1.安装file-saver 2.安装xlsx 创建jsonexcel.js文件 import {saveAs} from 'file-saver'import XLSX from 'xlsx/dist/xlsx.full.min' // 将json数据处理为xlsx需要的格式function da 阅读全文
posted @ 2021-06-22 14:01 白_小白 阅读(2229) 评论(2) 推荐(0)
摘要: let resdata=[ {name:'我是1',trend:[{value:1,date:20210901},{value:2,date:20210902},{value:2,date:20210903},{value:2,date:20210904}]}, {name:'我是2',trend: 阅读全文
posted @ 2021-06-18 13:34 白_小白 阅读(229) 评论(0) 推荐(0)
摘要: let dataobj={}1. let arr = Object.keys(dataobj)if(arr.length 0){ console.log('空');}2. if(JSON.stringify(dataobj) "{}"){ console.log('空');}else{ consol 阅读全文
posted @ 2021-05-18 13:44 白_小白 阅读(76) 评论(0) 推荐(0)
摘要: let arr=[1,2,]第一种:if(Array.isArray(arr)){ console.log('是');}else{ console.log('否');} 第二种: if(arr instanceof Array){ console.log('是');}else{ console.lo 阅读全文
posted @ 2021-05-18 13:28 白_小白 阅读(334) 评论(0) 推荐(0)
摘要: myChart.getZr().on('mousemove', param => { var pointInPixel= [param.offsetX, param.offsetY]; if (myChart.containPixel('grid',pointInPixel)) {//若鼠标滑过区域 阅读全文
posted @ 2021-05-18 10:40 白_小白 阅读(1769) 评论(0) 推荐(0)
摘要: sortChangefirst(column){ //不参与排序的数组 // if (this.$refs.table) this.$refs.table.clearSort() let freeGood = [] // //参与排序的数组 let elseFree = [] // //fieldN 阅读全文
posted @ 2021-05-18 09:47 白_小白 阅读(692) 评论(0) 推荐(0)
摘要: 在el-date-picker标签,添加append-to-body属性为false,结合css改成相对定位 el-select的下拉框不跟随页面滚动,添加popper-append-to-body="false" 阅读全文
posted @ 2021-04-22 10:08 白_小白 阅读(3694) 评论(0) 推荐(0)