Просмотр исходного кода

解决了点击页面不刷新的问题

wangn 5 лет назад
Родитель
Сommit
284892c8e5
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      pt/src/pages/layout/slider/index.vue

+ 6 - 0
pt/src/pages/layout/slider/index.vue

@@ -91,8 +91,14 @@ export default {
 			}
 			}
 		},
 		},
 		pageSubTo(item, index) {
 		pageSubTo(item, index) {
+      console.log(item,index)
+      if(index==0){
+        this.$router.push('/item-class/1');
+      }
 			this.subIndex = index;
 			this.subIndex = index;
+      this.$nextTick(()=>{
 			this.$router.push(item.path);
 			this.$router.push(item.path);
+      })
 		}
 		}
 	}
 	}
 };
 };