yuwenfen пре 4 година
родитељ
комит
6f96210c6d
1 измењених фајлова са 7 додато и 4 уклоњено
  1. 7 4
      components/tm-tabbar/tm-tabbar.vue

+ 7 - 4
components/tm-tabbar/tm-tabbar.vue

@@ -26,7 +26,7 @@
 	export default {
     props: {
       permission: {
-        type: Number,
+        type: Number | String,
         default: 0
       }
     },
@@ -81,14 +81,17 @@
     },
 		created(){
       this.getRolToTabBars(uni.getStorageSync('nowPermission'));
-		},
+    },
 		methods: {
 			// 路由跳转
 			navigateTo(pagePath){
-				this.currentPagePath = pagePath;
-				uni.navigateTo({
+        this.currentPagePath = pagePath;
+				uni.redirectTo({
 				  url: `/${pagePath}`
 				});
+				// uni.navigateTo({
+				//   url: `/${pagePath}`
+				// });
       },
       // 获取权限对应的地步导航
     	getRolToTabBars(permission) {