摘要:
import mapboxgl from "mapbox-gl"; export default class GridLayer { constructor(map) { this.map = map; this.gridSourceId = "grid-source"; this.gridLaye 阅读全文
摘要:
1.初始化 import { MapboxOverlay } from "@deck.gl/mapbox"; import { LineLayer, GeoJsonLayer } from "@deck.gl/layers"; import { TripsLayer, Tile3DLayer } f 阅读全文
摘要:
function fromDegrees(longitude, latitude, height = 0.0) { longitude = (longitude * Math.PI) / 180.0; latitude = (latitude * Math.PI) / 180.0; const ra 阅读全文
摘要:
function fromCartesian(cartesian) { const oneOverRadii = { x: 1.0 / 6378137.0, y: 1.0 / 6378137.0, z: 1.0 / 6356752.3142451793 }; const oneOverRadiiSq 阅读全文
摘要:
import Vue from 'vue'; // 自定义元素实现弹框拖拽 Vue.directive('draw', { inserted: function (el) { el.setAttribute('style', 'position: fixed; z-index: 1000'); }, 阅读全文
摘要:
1.在根目录的public下创建三个文件 index.js let config = { env: 'development', //development 测试 production 线上 VERSION: 'v0.1.1', APP_KEY: 'key' }; if (config.env 'd 阅读全文
摘要:
HTML: 1 <el-button size="small" type="primary" :loading="printLoading" @click="print($el, title, 'pdf')" >下载</el-button> JS: 此按钮是在el-dialog中,传入的$el可更加 阅读全文
摘要:
在一次改bug过程中遇到了此类问题,特此记录一下。 1.父类代码 <template> <div id="app"> <Children /> </div> </template> <script> import lifeTest from "../mixins/lifeTest.js"; impo 阅读全文
摘要:
/^(http|https):\/\/[\w\-_\u4E00-\u9FA5:/]+(\.[\w\-_\u4E00-\u9FA5]+)+([\u4E00-\u9FA5\w\-.,@?^=%&:/~+#]*[\u4E00-\u9FA5\w\-@?^=%&/~+#])?$/; 阅读全文
摘要:
vue中组件key的作用。 除了v-for循环中的key。在组件中添加key值并改变,能触发组件的重新渲染。 原因是因为Vue在diff算法的节点对比(sameVnode方法)中,也会对key值进行对比,key值不同就会走else重新新建组件。 阅读全文