cover-view组件里面写内容,电脑上测试可以,手机上不显示?
发布于 6 年前 作者 fangliang 7312 次浏览 来自 官方Issues

                     

图一是电脑上面,图二是用安卓手机测试

<map id=“map4select” class=‘map’ longitude="{{longitude}}" latitude="{{latitude}}" markers="{{markers}}" scale=“20” style=“width:100%;height:100%” bindregionchange=“regionchange” controls="{{controls}}">

<cover-view class=“coverImage”>

<cover-image src="/assets/img/icon_button.png" class=“coverImage1”>

</cover-image>

<view catchtap="{{OK?‘goSubmit’:’’}}" class=“coverImage2” >

生成DNA码

</view>

</cover-view>

</map>

2 回复

cover-view

基础库 1.4.0 开始支持,低版本需做兼容处理

覆盖在原生组件之上的文本视图。

可覆盖的原生组件包括 mapvideocanvascameralive-playerlive-pusher

只支持嵌套 cover-viewcover-image,可在 cover-view 中使用 button。组件属性的长度单位默认为px,2.4.0起支持传入单位(rpx/px)。

cover-view中不能嵌套view

cover-view只支持嵌套 cover-viewcover-image,可在 cover-view 中使用 button。组件属性的长度单位默认为px,2.4.0起支持传入单位(rpx/px)。

官方文档https://developers.weixin.qq.com/miniprogram/dev/component/cover-view.html

你把那个view换成button试试

回到顶部