浏览代码

fix: custom tab bar event

wangyuan 2 年之前
父节点
当前提交
20c79bd40d
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      custom-tab-bar/index.js

+ 3 - 0
custom-tab-bar/index.js

@@ -43,6 +43,9 @@ Component({
           app.globalData.selectedInex = data.index
           wx.switchTab({url})
         }
+      } else {
+        app.globalData.selectedInex = data.index
+        wx.switchTab({url})
       }
     }
   }