必须使用"<cover-view>""</cover-view>"标签,覆盖原生组件。如下所示:
<map class='map_container' id="map" scale="{{scale}}" longitude='{{longitude}}' latitude='{{latitude}}' controls="{{controls}}" markers="{{markers}}" polyline="{{}}" show-location bindcontroltap="controltap" bindcallouttap='' bindmarkertap="markertap" bindregionchange="regionchange" style="width: 100%; height: 350px;margin-top:0px">
<cover-view wx:if='{{showCover}}' class="wxSearch">
<cover-view class="wxSearchInner">
<!-- 搜索提示部分 -->
<cover-view wx:for="{{wxSearchData}}">
<cover-view class="wxSearchMindKeyItem" bindtap="wxSearchKeyTap"
data-id='{{item.id}}' data-key="{{item}}">
{{item.XXXX}}
</cover-view>
</cover-view>
</cover-view>
</cover-view>
</map>
微信小程序,如何在地图map上面显示自己写的样式呢?
最新推荐文章于 2024-06-06 14:56:01 发布