收藏
回答

cover-view bindtap ios 点击有时候无响应

框架类型 问题类型 API/组件名称 终端类型 操作系统 微信版本 基础库版本
小程序 Bug cover-view 客户端 6.6.6 2.0.8

在地图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: 32rpx;
    padding-bottom: 32rpx;
    padding-left: 230rpx;
    color: #fff;
    width: 100%;
    box-sizing: border-box;
    min-height: 204rpx;
}
 
.cover-view .cover-image {
    width: 160rpx;
    height: 160rpx;
    position: absolute;
    top: 50%;
    transform: translate3d(0, -50%, 0);
    left: 30rpx;
}
 
.cover-view .title {
    font-size: 32rpx;
    margin-bottom: 10rpx;
}
 
.cover-view .address {
    font-size: 24rpx;
    max-width: 456rpx;
    line-height: 32rpx;
    min-height: 66rpx;
    margin-bottom: 10rpx;
}
 
.cover-view .address-label {
    font-size: 24rpx;
}
 
.cover-view .button {
    position: absolute;
    right: 14rpx;
    bottom: 0rpx;
    transform: translate3d(0, -50%, 0);
    width: 118rpx;
    height: 52rpx;
    background-image: linear-gradient(-45deg, #f24268 0%, #f85661 100%);
    background-color:#f85661;
    border-radius: 26rpx;
    font-size: 28rpx;
    color: #fff;
    text-align: center;
    line-height: 52rpx;
}
 
.cover-view .buttonC {
    background-image: linear-gradient(-45deg, #ccc 0%, #ccc 100%);
    background-color:#ccc;
}

点击 “关联” 这个按钮,事件有时不触发

回答关注问题邀请回答
收藏

1 个回答

  • 小马
    小马
    2018-11-07

    我也碰到了,请问楼主最后有发现是哪里的问题吗?

    2018-11-07
    有用
    回复
登录 后发表内容