随笔 - 35  文章 - 0  评论 - 0  阅读 - 9409
  2023年4月25日
摘要: 在添加地图点位的时候调用clickToPop(){ let that = this; //定义select控制器,点击标注后的事件 const map = this.mapUtilobj.map; //鼠标移入点位 -- 添加鼠标的样式 map.on('pointermove', function 阅读全文
posted @ 2023-04-25 15:57 kaookiee 阅读(52) 评论(0) 推荐(0) 编辑
  2023年4月18日
摘要: functionDownloadImg() {//使用前需要npm下载html2canvas并引入组件中才能使用 html2canvas(document.querySelector("#map"), {//参数为容器的dom // 转换为图片 backgroundColor: "#ffffff", 阅读全文
posted @ 2023-04-18 14:38 kaookiee 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1、获取ctx,id为canvasId的canvas标签 document.getElementById("canvasId")。getXO你text("2d"); 2、确定尺寸 3、添加点击画布的监听 ctx.addEventListener("click",(e)=>that.addLis(e) 阅读全文
posted @ 2023-04-18 11:50 kaookiee 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 在tree的:load方法中,将默认参数node,resolve两个参数存放到全局变量中; 在对树节点进行操作后,对全局变量中的node.childNodes赋值为[空数组], 最后重新调用tree的:load方法(参数为存放在全局的变量); 代码如下: <el-tree ref="tree2" : 阅读全文
posted @ 2023-04-18 11:39 kaookiee 阅读(572) 评论(0) 推荐(0) 编辑
摘要: 1)img { display:block};将其改变为block元素,但是该方法太过粗暴,相当于从根本上改变了img 2)img {vertical-align:top;}改变其垂直对齐方式 3)div {font-size:0};把父元素的文字大小设置为0 4)div {line-height: 阅读全文
posted @ 2023-04-18 11:23 kaookiee 阅读(41) 评论(0) 推荐(0) 编辑
  2023年3月21日
摘要: exportMyReport(){ let userInfo = JSON.parse(this.user) let data = new FormData();//接口参数格式 data.append('userid',userInfo.userId); data.append('roleid', 阅读全文
posted @ 2023-03-21 09:52 kaookiee 阅读(21) 评论(0) 推荐(0) 编辑
  2023年3月20日
摘要: 子组件中的 :props{ //导入目录树默认不展开字列表treeDefaultExpandAll:{ type:Boolean, default:true,}, } 子组件中使用改属性 <el-tree :default-expand-all="treeDefaultExpandAll"></el 阅读全文
posted @ 2023-03-20 14:43 kaookiee 阅读(11) 评论(0) 推荐(0) 编辑
  2023年3月6日
摘要: loadHeatMap(){ let that = this; //创建一个Heatmap图层 that.heatMapSource = new ol.source.Vector({ url: "/static/public/map/heatMapLayer.json",//还可以是kml文件格式 阅读全文
posted @ 2023-03-06 18:12 kaookiee 阅读(52) 评论(0) 推荐(0) 编辑
  2023年1月30日
摘要: //创建中心点文字样式createPointStyle(feature) { return new ol.style.Style({ text: new ol.style.Text({ //位置 textAlign: 'center', //基准线 textBaseline: 'middle', / 阅读全文
posted @ 2023-01-30 19:39 kaookiee 阅读(1546) 评论(0) 推荐(0) 编辑
摘要: 调用地图服务接口后,对接口返回值做处理--添加数据源 if(res.features.length) {//获取--根据行政区代码查询对应行政区的中心点 let lons = res.features[0].properties.LON; let lats = res.features[0].pro 阅读全文
posted @ 2023-01-30 19:33 kaookiee 阅读(125) 评论(0) 推荐(0) 编辑
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示