上次写小程序,需要自己自定义导航条,因为设计改的效果,用现在有的导航无法满足,后来查阅了相关资料后, 完成了一个自定义导航条,如有侵权,请告知,立删。
微信的官方文档有一个参数是关于自定义导航条的,
就是这个 如果全部导航都需要自定义,可在app.json中写入,如果只是修改某个页面,在当前页面的json中写入即可,
然后开始自定义导航,
先上效果图:
先 wxml:
<view class='nav' style='height:{
{navH}}px'>
<view class='title-icon'>
<image src='../images/change1.png' style="width:150rpx;height:29rpx;" mode='aspectFit' class='back' bindtap='goMerchant'></image>
</view>
<view class='title-text'>
<i