navigator的open-type为switchTab时点击无效
发布于 5 年前 作者 tao23 15772 次浏览 来自 问答

<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点击失效

回到顶部