根据文档,想要实现在 map 组件上显示内容只能使用 cover-view 和 cover-image ,但除了 button 组件均不能嵌套,所以无法嵌套 open-data 组件。
有没有什么好的解决方案,请教大家
用这个方法试试:
wxss文件中添加:
.mapmask {
position:fixed;
top: 3rem;
left: 0;
bottom: -1;
right: 0;
z-index: 1000;
background-color: rgba(255, 255, 255, 1)
}
wxml文件中添加:
<view class=‘mapmask’ catchtouchstart=‘test’>
<image src="…" />
</view>