vue+el-tree 通过下拉框选中节点,定位到当前节点,并高亮
摘要:此处为下拉选择器: <el-select ref="searchSelect" v-model="filter" filterable remote size="mini" clearable placeholder="请输入关键词" :remote-method="remoteMethod" @i
阅读全文
坐标转换:4326转3857
摘要:function WGS84ToMercator(lonlat){ const coord = { lat:0, lng:0 }; const earthRad = 6378137.0; //地球半径 coord.lat = lonlat.lng * Math.PI / 180 * earthRad
阅读全文
Vue 使用svg
摘要:1 src下建文件夹 index.js import Vue from 'vue' import SvgIcon from '@/components/SvgIcon'// svg component // register globally Vue.component('svg-icon', Sv
阅读全文
rsync 远程传输文件,支持过滤文件
摘要:rsync -av -e 'ssh -p 目标服务器端口' --exclude="*.log" 要传的文件/ root@目标服务器IP:/目标目录因为scp 不支持过滤文件,而我不想传输后缀为.log的文件,经查询,可以用rsybc。还要其他options,可以看网上的总结
阅读全文
删除有序数组中的重复项
摘要:emm 题目要求在原地删除,即覆盖掉原有的值。原题链接:https://leetcode.cn/problems/remove-duplicates-from-sorted-array/solution/shan-chu-pai-xu-shu-zu-zhong-de-zhong-fu-tudo/ 典
阅读全文
yum切换国内源(腾讯)
摘要:linux新安装yum后 装东西一直超时,切换到了腾讯源好了。 在/etc目录下执行: 会生成文件夹: 将这个文件夹下报错的那个 后缀改了 不是.repo就行。然后进入文件夹下依次执行:
阅读全文
java 判断当前时间在不在 规定时间段之内
摘要:public boolean isTime(String wfsj) throws ParseException { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date today = sdf.parse(
阅读全文
springBoot引入本地jar包
摘要:最近想引入自己的jar包 在resources下建了一个目录 本地运行没有问题 打包打不进去: pom.xml <dependency> <groupId>com.dm</groupId> <artifactId>xxx</artifactId> <version>1.xx</version> <s
阅读全文
解决 Cannot assign to read only property 'exports' of object '#<Object>'
摘要:原文链接:https://www.cnblogs.com/savokiss/p/13864719.html https://www.npmjs.com/package/babel-plugin-transform-es2015-modules-commonjs 先安装: npm install --
阅读全文
html video标签实现双击切换
摘要:<video></video>双击直接默认全屏了。但是因为工作需要,需要双击切换下一个(轮播),只能在上边覆盖一层: <div style="width: 100%;height: 100%;position: relative"> <video style="z-index: -1" contro
阅读全文
vue 实现倒计时
摘要:https://cgygd.github.io/vue2-countdown/ 好吧 我觉得用在列表里 不是特别好用,存在bug。又在网上发现了新的: 效果: <template> <div class="app-container"> <div class="content"> <div v-fo
阅读全文
HSSFCellStyle.ALIGN_CENTER HSSFCellStyle.VERTICAL_CENTER 等爆红的解决办法
摘要:给poi升级后,应该是版本冲突了。程序里出现了很多标红的地方。 旧版: cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER); cellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
阅读全文
Vue导出指定列到excel,返回文件流
摘要:跟正常的导出一样,只是需要指定上参数,根据是上一篇文章可以获取到table的表头。将参数传到组件(我用到的是dialog) <template> <el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close
阅读全文
el-table获取表头
摘要:this.columnTitle = [] this.$refs.multipleTable.$children.forEach(obj => { if (obj.label != undefined && obj.prop != undefined){ // 每个列我们自己设置3个属性,label
阅读全文
div 使用flex并列显示
摘要:<div class="notice-leftDiv"> <div class="ig" v-for="(item,index) in tplj"> <img :src="item"> </div> </div> .notice-leftDiv { display:flex; .ig { flex:
阅读全文
Vue定时:0点调用方法
摘要:const nowTemp = new Date().getTime(); //获取当前时间戳 const tomorrowTemp = new Date(moment().add(1, 'days').format().substr(0, 10) + ' 00:00:00').getTime();
阅读全文
vue 实现跨域通信
摘要:最近遇到的问题是:B项目引用了A项目,执行完A项目的一个方法后,需要去直接调用B项目。用postmessage即可实现: A项目发出消息 var msg = {}msg.changTab = data.channelwindow.postMessage(msg,'/') B项目接收:mounted:
阅读全文
el-table span-method合并列
摘要:getSpanArr(data) { this.spanArr=[] for (var i = 0; i < data.length; i++) { if (i 0) { this.spanArr.push(1); this.pos = 0 } else { // 判断当前元素与上一个元素是否相同
阅读全文
vue 同一个路由,地址栏参数不同。页面切换不刷新解决办法。
摘要:watch: { '$route'(to, from) { if (to.query) { this.$router.go(0) } } } 注:界面整体刷新。
阅读全文
el-table有重复值,卡死的解决办法
摘要::row-key="row => { return row.id }" id为唯一标识。不可重复。 https://www.jianshu.com/p/74e79049ae91
阅读全文