This commit is contained in:
yanran200730
2022-01-14 11:40:26 +08:00
parent 7ed146cbf4
commit 2d4a14d01d
2 changed files with 4 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ export default {
retryTimes: 0 retryTimes: 0
} }
}, },
computed: {...mapState(['user'])}, computed: {...mapState(['user', ])},
mounted() { mounted() {
this.initMap() this.initMap()
}, },

View File

@@ -6,6 +6,7 @@
<script> <script>
import {mapState} from 'vuex'
export default { export default {
name: "AiTMap", name: "AiTMap",
props: { props: {
@@ -30,6 +31,7 @@ export default {
*/ */
lib: Object, lib: Object,
}, },
computed: {...mapState(['config'])},
data() { data() {
return { return {
key: "3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY", key: "3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY",
@@ -52,6 +54,7 @@ export default {
this.mapLib = TMap this.mapLib = TMap
this.tmap = new TMap.Map(this.$refs.tmap, { this.tmap = new TMap.Map(this.$refs.tmap, {
zoom: 11, zoom: 11,
center: new TMap.LatLng(this.config.lat, this.config.lng),
...this.ops ...this.ops
}) })
this.$emit('loaded') this.$emit('loaded')