你用了气泡的插槽,就只能用气泡的点击事件了啊 bindcallouttap
map中嵌套cover-view,点击事件无效,请问如何解决?地图上展示marker,marker上展示气泡callout,因展示的内容太多,使用的自定义callout,参照文档里提供的demo,实现了,我想要的效果,但是点击事件没反应,请问如何处理? <view> <map class="home-map" scale="{{currentScale}}" longitude="{{currentLongitude}}" latitude="{{currentLatitude}}" markers="{{markers}}" bindtap="bindtapmap" bindmarkertap="bindmarkertap" show-location="true"> <cover-view slot="callout"> <block wx:for="{{customCalloutMarkerIds}}" wx:key="*this"> <cover-view class="customCallout" marker-id="{{item}}" > <cover-view class="content" > <cover-view bindtap="trackPlayBack">车牌号{{currentMarker.id}}</cover-view> <cover-view>车牌号{{currentMarker.name}}</cover-view> <cover-view>车牌号{{currentMarker.latitude}}</cover-view> <cover-view>车牌号{{currentMarker.longitude}}</cover-view> <cover-view>车牌号{{currentVehicle}}</cover-view> </cover-view> </cover-view> </block> </cover-view> </map> </view> trackPlayBack(){ console.log(111111) wx.navigateTo({ url: '/pages/trackPlayBack/trackPlayBack', }) }
2022-12-26