微信小程序cover-view的使用方法
覆盖在原生组件之上的文本视图。
可覆盖的原生组件包括 map、video、canvas、camera、live-player、live-pusher
只支持嵌套 cover-view、cover-image,可在 cover-view 中使用 button。组件属性的长度单位默认为px,2.4.0起支持传入单位(rpx/px)。个人示例
<map class="map" id="map" longitude="{{longitude}}" latitude="{{latitude}}" scale="16" markers="{{markers}}" bindmarkertap="makertap" bindregionchange="mapchangeTap" > <cover-view class="tips-dialog"> <cover-image src="/assets/img/dialog@2x.png" class="tips-dialog-img"></cover-image> <cover-view wx:if="{{xb_count}}" class="tips-dialog-txt"> <cover-view class="xb">附近有{{xb_count}}位小帮</cover-view> <cover-view class="minute"> <cover-view>预计最快</cover-view> <cover-view >{{min_time_text}}</cover-view> <cover-view>内到达</cover-view> </cover-view> </cover-view> <cover-view wx:else class="tips-dialog-txt2">附近暂无小帮</cover-view> </cover-view> <cover-image class="map-img" src="/assets/img/orientation@2x.png"/> </map>
官方示例
<map latitude="{{latitude}}" longitude="{{longitude}}" > <cover-view class="cover-view"> <cover-view class="container"> <cover-view class="flex-wrp" > <cover-view class="flex-item demo-text-1"></cover-view> <cover-view class="flex-item demo-text-2"></cover-view> <cover-view class="flex-item demo-text-3"></cover-view> </cover-view> </cover-view> </cover-view> </map>
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。