标签:VID require class oom pre map 定义 height zoom
<template> <div class="row"> <el-amap id="map" vid="amapDemo" :zoom="zoom" :center="center"> <el-amap-marker v-for="marker in markers" :key="marker.id" :position="marker.position" :icon="marker.icon" ></el-amap-marker> </el-amap> </div> </template> <script> export default { name: "maps", data() { return { center: [115.95317,28.680948], zoom: 14, markers:[ { id:1, position:[115.95317,28.684863], icon: require("@/assets/icon1.png") }, { id:2, position:[115.978576,28.696985], icon: require("@/assets/icon2.png") }, { id:3, position:[115.955831,28.666113], icon: require("@/assets/icon1.png") }, ] } } } </script> <style scoped> .row,#map { height: 100%; } /* 图标大小修改 */ /deep/ .amap-icon img { max-width: 2rem !important; max-height: 2rem !important; } </style>
标签:VID require class oom pre map 定义 height zoom
原文地址:https://www.cnblogs.com/xy4869/p/14553976.html