- 博客(13)
- 收藏
- 关注
原创 CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory vue项目启动打包内存溢出
全局安装increase-memory-limitnpm install -g increase-memory-limit在package.json scripts 中添加 "fix-memory-limit":"cross-envLIMIT=4096increase-memory-limit"npm run fix-memory-limit在node_modules > .bin >...
2021-03-29 15:18:52
221
原创 前端实现数据导出功能,定义表格名称,定义表格头
downLabels: [{ yhzh: '用户账号', xm: '姓名', xb: '性别(1为男,0为女)', yx: '邮箱', sjhm: '手机号码', dwmc: '单位名称', zhzt: '账号状态(1为正常,0为异常)', sjc: '创建时间' }] 表头type:'表格名称' downloadExl(than, json, downLa.
2021-03-10 16:09:51
286
原创 水位、流量、降雨量,多轴图表绘制
{ dataset: { source: [ ['date', '实时水位', '实时流量', '实时降雨量', '预报水位', '预报流量', '预报降雨量'], ['2021-03-01', 19.2, 3.0, 0.7, null, null, null], ['2021-03-02', 20.7, 3.1, 1.0, null, null, null], ['2021-03-03', 21.4, 3.3, 2....
2021-03-10 15:40:54
2256
原创 element ui table 动态合并单元格
<el-table :data="tableData" border stripe size="small" ref="spantable" :span-method="objectSpanMethod" :max-height="tableHeight" v-loading="loading" @row-dblclick="handledbrow" .
2021-01-18 15:13:39
122
原创 echarts画河道断面图
let xAxisData = ["1", "2", "3", "4", "5", "6", "7", "8"];let yAxisData1 = [333, 333, 150, 113, 120, 100, 110, 333];let yAxisData2 = [233, 233, 233, 233, 233, 233, 233, 233];option = { "backgroundColor": "#fff", "tooltip": { "trigger": .
2021-01-18 14:25:49
1829
1
原创 vscode代码格式化配置,配合package.json
package.json配置vscode setting.json配置{ "editor.tabSize": 2, "files.associations": { "*.vue": "vue" }, "eslint.options": { "extensions": [".js", ".vue"] }, // 添加vue支持 "eslint.validate": ["javascript", "javascriptreact", "vue"], "search.excl
2020-10-13 09:23:17
1825
1
原创 数组转换树形结构,向上取所有父节点,向下取所有自己点
数组转化成树形结构 gettree(data) { var dataList = data function fn(data, sjdxid) { var result = [] var temp for (var i in data) { if (data[i].sjdxid === s...
2020-03-13 14:33:13
294
原创 数组对象过滤去重
let list=[ {loginId:123}, {loginId:234}, {loginId:345}, {loginId:123}, {loginId:345}, {loginId:666}] unrepert(list)unrepert(array) { let res = [ array[0] ]; for (le...
2018-11-07 17:08:24
121
原创 大小顺序排序
let _data = data;for (let i = 0; i < _data.length; i++) { for (let j = i + 1; j < _data.length; j++) { if (_data[i].saleCount < _data[j].saleCount) { let tmp = _data...
2018-10-24 16:16:51
646
原创 滚动楼层改变导航样式
// 滚动导航样式 fnscrool() function fnscrool(){ $(document).scroll(function(){ var distance = $(document).scrollTop()+148; if(distance>=$('#home').offset().top...
2018-10-17 09:17:49
155
原创 特殊符号换行处理
var i;var result = "";var c;var v=fwerwr \n werwerfor (i = 0; i < v.length; i++) { c = v.substr(i, 1); if ( c == "\n") result = result + "</br>"; else if (c != "\r") re...
2018-10-10 14:43:51
1899
原创 css单行或多行超出省略号显示
多行超出省略号显示:display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;单行超出省略号显示:overflow: hidden;text-overflow:ellipsis;white-space: nowrap; ...
2018-10-10 14:37:03
108
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人