在地图map组件嵌套cover-view组件,cover-view 加上bindtap事件,ios和安卓点击不灵敏;事件有时候点击无响应
< view class = "map-box" > < map id = "map" longitude = "{{longitude || kiosks[0].lng }}" circles = "{{circles}}" latitude = "{{latitude || kiosks[0].lat}}" scale = "16" show-location markers = "{{markers}}" bindmarkertap = "handlerSelectMarker" > < cover-view class = "cover-view" hidden = "{{ hideMask }}" > < cover-image class = "cover-image" src = "{{img_url}}/{{associate_kiosk.kiosk_logo}}" wx:if = "{{associate_kiosk.kiosk_logo}}" ></ cover-image > < cover-view class = "title" wx:if = "{{associate_kiosk.kiosk_name}}" >{{associate_kiosk.kiosk_name}}</ cover-view > < cover-view class = "address ellipsis-more" wx:if = "{{associate_kiosk.address}}" >{{associate_kiosk.address}}</ cover-view > < cover-view class = "address-label" wx:if = "{{associate_kiosk.distance}}" >距离{{associate_kiosk.distance}}</ cover-view > < cover-view class = "button" hidden = "{{ associate_kiosk.kiosk_id == kiosk_id }}" data-kioskid = "{{associate_kiosk.kiosk_id}}" catchtap = "handlerDoAssociateEsite" >关联</ cover-view > < cover-view class = "button buttonC" wx:if = "{{ associate_kiosk.kiosk_id == kiosk_id }}" >已关联</ cover-view > </ cover-view > </ map > </ view > |
.cover-view { position : absolute ; bottom : 0 ; left : 0 ; background-color : rgba( 0 , 0 , 0 , 0.6 ); padding-top : 32 rpx; padding-bottom : 32 rpx; padding-left : 230 rpx; color : #fff ; width : 100% ; box-sizing: border-box; min-height : 204 rpx; } .cover-view .cover-image { width : 160 rpx; height : 160 rpx; position : absolute ; top : 50% ; transform: translate 3 d( 0 , -50% , 0 ); left : 30 rpx; } .cover-view .title { font-size : 32 rpx; margin-bottom : 10 rpx; } .cover-view .address { font-size : 24 rpx; max-width : 456 rpx; line-height : 32 rpx; min-height : 66 rpx; margin-bottom : 10 rpx; } .cover-view .address-label { font-size : 24 rpx; } .cover-view .button { position : absolute ; right : 14 rpx; bottom : 0 rpx; transform: translate 3 d( 0 , -50% , 0 ); width : 118 rpx; height : 52 rpx; background-image : linear-gradient( -45 deg, #f24268 0% , #f85661 100% ); background-color : #f85661 ; border-radius: 26 rpx; font-size : 28 rpx; color : #fff ; text-align : center ; line-height : 52 rpx; } .cover-view .buttonC { background-image : linear-gradient( -45 deg, #ccc 0% , #ccc 100% ); background-color : #ccc ; } |
点击 “关联” 这个按钮,事件有时不触发
我也碰到了,请问楼主最后有发现是哪里的问题吗?