<template name="tabBar">
<view class="tab-bar tabbar_box">
<block wx:for="{{tabBar.list}}" wx:key="pagePath">
<view class="{{item.clas}}">
<navigator url="{{item.pagePath}}" open-type="switchTab" style="{{item.isActive? 'color: '+(tabBar.itemSelectedColor? tabBar.itemSelectedColor : tabBar.selectedColor) : ''}}">
<image src="{{item.selectedIconPath}}" wx:if="{{item.isActive}}" class="img"></image>
<image src="{{item.iconPath}}" wx:if="{{!item.isActive}}" class="img"></image>
<text>{{item.text}}</text>
</navigator>
</view>
</block>
</view>
</template>
这个中的navigator点击失效
你好,麻烦给个相关的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)