摘要: 一.获取手机号 获取手机号 <template> <u-button open-type="getPhoneNumber" @getphonenumber="getNumber">一键登录</u-button> </template> <script> export default { method 阅读全文
posted @ 2024-06-03 17:59 环岛公路 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 需求是: 点击某个按钮后 让扫描仪沿着某条线移动进行扫描 效果: 扫描仪是沿着河流移动的,河流的生成方式通过geojson数据生成,geojson里包含了河流的一些点位的经纬度,扫描仪根据经纬度来移动 leaflet: 1.9.4 leaflet.AnimatedMarker: 1.0.0 1.引入 阅读全文
posted @ 2024-01-19 19:58 环岛公路 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 要使用pnpm,先确保nodejs版本在16以上(目前用的18.16.1) (确保本地已经全局安装了pnpm 如果没有安装 就使用npm i -g pnpm来全局安装) 一.老项目从npm迁移到pnpm 先删掉项目中的node_modules文件夹和package-lock.json文件 在终端运行 阅读全文
posted @ 2024-01-19 19:11 环岛公路 阅读(102) 评论(0) 推荐(0) 编辑
摘要: lealfet版本1.9.4 vue版本2.6 引入: import L from 'leaflet' import 'leaflet/dist/leaflet.css' //记得引入样式 不然加载瓦片图后地图会错乱 1.初始化 this.map = L.map(this.mapId, mapIni 阅读全文
posted @ 2023-12-19 18:49 环岛公路 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 本文主要介绍引入本地的自己写的组件。 1.准备3个vue2项目 demo-common文件夹里是组件在demo1和demo2中都需要使用 2.在demo-common文件夹里新建index.js文件,跟package.json同级。在index.js文件里导出在其他项目里需要用到的组件 3.分别在d 阅读全文
posted @ 2023-10-24 17:03 环岛公路 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 使用leaflet加载超图的时候 有时候超图无法加载 有时候报如下错误 因为手上有好几个项目都在使用leaflet 但是同样都使用 @supermap/iclient-leaflet (版本 11.1.0-a) 加载超图,有的项目可行,有的不可行 最后打开项目根目录下 node_modules里 查 阅读全文
posted @ 2023-09-07 17:50 环岛公路 阅读(207) 评论(0) 推荐(0) 编辑
摘要: pc端是直接在option里配置 移动端在renderjs里的监听变化的时候去设置 updateEcharts(newValue, oldValue, ownerInstance, instance) { // 监听 service 层数据变更 try { newValue.xAxis.axisLa 阅读全文
posted @ 2023-07-30 15:52 环岛公路 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1.安装vue-i18n 2.根目录下新建locale文件夹,创建index.js import { createI18n } from 'vue-i18n' import en from './en.json' //locale文件夹下的英文配置 import zh from './zh.json 阅读全文
posted @ 2023-07-30 15:46 环岛公路 阅读(1087) 评论(0) 推荐(0) 编辑
摘要: 效果图: 如果要固定显示markline的值就写在series.markLine.data数组里。 我这里的markline的值是通过websocket返回的,数据发生变化时,markline的值也跟着变化 监听到websocket返回值时: let o = myChart.getOption() 阅读全文
posted @ 2023-07-24 23:34 环岛公路 阅读(776) 评论(0) 推荐(0) 编辑
摘要: 1. 将scene定义成全局变量. app.config.globalProperties.$scene = '' //mainjs中定义 import { getCurrentInstance } from 'vue' const { proxy } = getCurrentInstance() 阅读全文
posted @ 2023-02-16 09:49 环岛公路 阅读(2057) 评论(0) 推荐(1) 编辑