bde537c7 by 杨威

监测路由变化,高亮顶部导航

1 parent 32419305
...@@ -164,7 +164,13 @@ export default { ...@@ -164,7 +164,13 @@ export default {
164 }, 164 },
165 watch: { 165 watch: {
166 "$route.path": function(newPath) { 166 "$route.path": function(newPath) {
167 this.defaultActive = this.pathAndCodeObj[newPath]; 167 //监测路由变化,高亮顶部导航
168 this.headTop.forEach((item, index) => {
169 item.select = false;
170 if (item.path == newPath) {
171 item.select = true;
172 }
173 });
168 }, 174 },
169 }, 175 },
170 created() { 176 created() {
......