08 2023 档案

摘要:## 报错信息 ``` npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart() npm ERR! Error while executing: npm ERR! C:\Program Files\Git\cmd\git. 阅读全文
posted @ 2023-08-31 13:10 ZerlinM 阅读(300) 评论(0) 推荐(1)
摘要:加载arcgis先查看这个文章 [vue3中使用arcgis](https://www.cnblogs.com/ZerlinM/p/17666502.html) ## 高德 ``` const map = new Map({ basemap: '', // 此处置为空 }) mapView = ne 阅读全文
posted @ 2023-08-30 10:51 ZerlinM 阅读(415) 评论(0) 推荐(0)
摘要:安装 @arcgis/core方式 通过@arcgis/core加载地图资源,默认是半本地化的,因为 assests 资源是通过 https://js.arcgis.com 在线请求的。 npm install @arcgis/core 项目使用 main.ts import "@arcgis/co 阅读全文
posted @ 2023-08-30 09:56 ZerlinM 阅读(1606) 评论(0) 推荐(0)
摘要:使用setup的情况下这个时候我们无法使用this,注意在setup中setup是封闭的,不会将子组件事件暴露出来,所以要用defineExpose(),将需要在父组件调用的函数暴露出去,子组件代码如下: ``` 哈哈哈哈 ``` 父组件: ``` import { ref, onMounted } 阅读全文
posted @ 2023-08-29 09:14 ZerlinM 阅读(136) 评论(0) 推荐(0)
摘要:##问题 在项目中使用了ReactToPrint来实现打印,但是trigger属性中的按钮需要点击才能执行打印。 期望能在组件加载完成时自动执行打印方法。 ## 解决 可在组件加载完成时,通过id获取组件,并执行该组件的click方法。 代码如下: ``` import React, { useRe 阅读全文
posted @ 2023-08-28 09:22 ZerlinM 阅读(409) 评论(0) 推荐(0)
摘要:## 高德地图 ``` .amap-logo { display: none !important; } .amap-copyright { display: none !important; } ``` ## 百度地图 ``` .BMap_cpyCtrl, .anchorBL { display: 阅读全文
posted @ 2023-08-25 09:33 ZerlinM 阅读(1209) 评论(0) 推荐(0)
摘要:## 问题 使用openlayers展示的地图,在对地图进行显示和隐藏时,在火狐浏览器中异常。 显示和隐藏使用了 display:'none' 和 display:'block',对地图先隐藏,然后展示时,火狐浏览器中的map空白。 ## 解决 ``` setTimeout(function () 阅读全文
posted @ 2023-08-23 16:53 ZerlinM 阅读(317) 评论(0) 推荐(0)
摘要:![](https://img2023.cnblogs.com/blog/1950214/202308/1950214-20230822150442568-1521728055.png) ``` option = { title: { text: '行情走势图', x: 'center', alig 阅读全文
posted @ 2023-08-22 15:04 ZerlinM 阅读(250) 评论(0) 推荐(0)
摘要:## 实现效果 ![](https://img2023.cnblogs.com/blog/1950214/202308/1950214-20230822110418807-1850369621.gif) ## 代码 本文使用react实现,其他同理 index.js ``` import React 阅读全文
posted @ 2023-08-22 11:04 ZerlinM 阅读(80) 评论(0) 推荐(0)
摘要:## 定义和用法 table-layout 属性用来显示表格单元格、行、列的算法规则。 **table-layout有三个属性值:auto、fixed、inherit。** * **fixed:固定表格布局** 固定表格布局与自动表格布局相比,允许浏览器更快地对表格进行布局。 **在固定表格布局中, 阅读全文
posted @ 2023-08-21 14:00 ZerlinM 阅读(1362) 评论(0) 推荐(0)
摘要:使用ec-canvas展示echarts图表,但是在实际操作中,偶现echarts空白问题。 ## 解决 ``` const getData = async() => { const data = await fetchData(); // 调用接口获取数据 const option = { // 阅读全文
posted @ 2023-08-16 10:22 ZerlinM 阅读(1246) 评论(0) 推荐(0)
摘要:高德地图 API 在官方示例中 marker的content使用的字符串 如'<div>123</div>' 但我们希望使用reactDom更方便。 调用initPoint铺点,当点击该点时,弹出气泡信息。 const [currentData, setCurrentData] = useState 阅读全文
posted @ 2023-08-14 14:47 ZerlinM 阅读(292) 评论(0) 推荐(0)
摘要:[madeapie](https://madeapie.com/#/) [MCChart](http://echarts.zhangmuchen.top/#/index) [ppchart](http://ppchart.com/#/) [makeapie](https://www.makeapie 阅读全文
posted @ 2023-08-01 17:19 ZerlinM 阅读(507) 评论(0) 推荐(0)
摘要:## 问题 当图表中的 legend 过多的时候,就需要考虑 legend 进行换行,但是换行之后,图例就会无法对齐。 ## 解决 ``` legend: { icon: "rect", width: "80%", itemWidth: 6, itemHeight: 6, bottom: 0, te 阅读全文
posted @ 2023-08-01 12:43 ZerlinM 阅读(1210) 评论(0) 推荐(0)
摘要:微信小程序中动态设置了echarts的高度,但是canvas变形,并没有重新resize ## 原因 chart获取不到父组件的宽高,小程序里获取宽高用的是 wx.createSelectorQuery() ,echarts里resize的时候,并没有调用这个API,肯定无法重置宽高。 ## 解决 阅读全文
posted @ 2023-08-01 10:58 ZerlinM 阅读(740) 评论(0) 推荐(0)