<template>
<view>
<page-head :title="title"></page-head>
<view class="page-body">
<view class="page-section page-section-gap" id="aa" style="height: 200px;">
<map :latitude="latitude" :longitude="longitude" :markers="covers" @markertap="func1(e)">
</map>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'map',
latitude: 39.909,
longitude: 116.39742,
covers: [{
label:{
content:"说啥"
},
id:123,
latitude: 39.909,
longitude: 116.39742,
iconPath: '../../static/img/sinaweibo.png'
}, {
id:345,
latitude: 39.90,
longitude: 116.39,
iconPath: '../../static/img/sinaweibo.png'
}]
}
},
methods: {
func1:function(e){
plus.nativeUI.alert(e.id)
}
}
}
我这样写是获取不到,请问如何获取这个id
1 个回复
Trust - 少说废话
没太明白什么意思,麻烦描述详细一点,或者上传下完整的demo,讲清楚你想要干什么。