会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
博客园
首页
归档
新随笔
联系
订阅
ZerlinM
新随笔
订阅
管理
上一页
1
2
3
4
5
6
7
···
31
下一页
2024年8月20日
项目打包后build文件夹自动打成压缩包
摘要: 问题 经常要项目打包成build文件夹后,手动压缩下,修改压缩包名称(比如添加日期 项目名称等信息)发给相关人员发版 那么我们为什么不配置下,直接打包后自动生成压缩包呢,代码如下: 解决 package.json文件 添加以下命令,重点是 添加'&& node ./zipBuild.js'即可 "p
阅读全文
posted @ 2024-08-20 15:24 ZerlinM
阅读(153)
评论(0)
推荐(0)
2024年8月13日
vite打包分析工具
摘要: 安装 vite-bundle-analyzer yarn add vite-bundle-analyzer -D 使用 vite.config.ts import { analyzer } from 'vite-bundle-analyzer' export default defineConfig
阅读全文
posted @ 2024-08-13 17:05 ZerlinM
阅读(433)
评论(0)
推荐(0)
2024年8月2日
openlayers改变底图颜色为暗色系
摘要: import TileLayer from "ol/layer/Tile"; // 瓦片图层类 import XYZ from "ol/source/XYZ"; // XYZ格式的切片数据,继承于TileImage const layer = new TileLayer({ source: new
阅读全文
posted @ 2024-08-02 16:47 ZerlinM
阅读(658)
评论(0)
推荐(0)
openlayers 使用WMTS和XYZ加载天地图切片服务
摘要: openlayers 使用WMTS和XYZ加载天地图切片服务 本篇介绍一下使用openlayers加载天地图切片,两种方法: 使用WMTS 使用XYZ 分析 主要是不同类型source的使用 WMTS(Web Map Tile Service) 是 OGC(Open Geospatial Conso
阅读全文
posted @ 2024-08-02 16:33 ZerlinM
阅读(3478)
评论(0)
推荐(0)
2024年7月22日
openlayers在地图上使用Overlay渲染图标无法操作地图问题
摘要: ol对于在地图上渲染图标,并且图标可以随着地图的缩放层级自适应,跟随地图移动,ol是提供了一个很好用的方法的 overlay 代码如下: //定义标注对象 let lable_div = document.createElement('div') lable_div.className = [s.l
阅读全文
posted @ 2024-07-22 10:00 ZerlinM
阅读(296)
评论(0)
推荐(0)
2024年7月3日
ArcGIS API for Javascript解决html2canvas、domtoimage截图地图出现空白问题
摘要: 原因 使用html2canvas、domtoimage进行截图时,会出现地图面板是空白的情况,报错如下: #1 133ms Unable to clone WebGL context as it has preserveDrawingBuffer=false <canvas style="widt
阅读全文
posted @ 2024-07-03 14:28 ZerlinM
阅读(346)
评论(0)
推荐(0)
2024年4月30日
base64转file文件的两种方式
摘要: base64加载图片文件 使用base64可以不发送请求将图片文件转换为base64格式的链接渲染到图片上,减少服务器访问次数,下面是base64加载图片的方式 document.getElementById("front-file").onchange = (e) => { const file
阅读全文
posted @ 2024-04-30 15:07 ZerlinM
阅读(4909)
评论(0)
推荐(0)
vue3 vant4 h5图片上传时压缩
摘要: 代码如下 upload组件的 afterRead 方法: const afterRead = async file => { file.status = "uploading"; file.message = "上传中..."; const { data } = await upLoaderImg(
阅读全文
posted @ 2024-04-30 14:04 ZerlinM
阅读(655)
评论(0)
推荐(0)
2024年4月25日
vue3 使用vant4中的List分页加载时,会回滚到页面顶部
摘要: 问题 项目中使用vue3+vant4,列表页使用了 List 来做列表加载,代码如下: <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad" > <div v-if=
阅读全文
posted @ 2024-04-25 10:15 ZerlinM
阅读(823)
评论(0)
推荐(0)
2024年4月23日
vant4 使用Toast Dialog等组件没有样式
摘要: 可在App.vue文件中引入样式 <template> <router-view /> </template> <script setup> // Toast import "vant/es/toast/style"; // Dialog import "vant/es/dialog/style";
阅读全文
posted @ 2024-04-23 15:42 ZerlinM
阅读(821)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
31
下一页
公告