@@ -202,6 +202,17 @@ export default {
});
},
+ // 监听器
+ watch: {
+ '$route': {
+ handler(newVal) {
+ // console.log(newVal.path, oldVal.path);
+ if (newVal.path === '/') {
+ this.curPath = ''
+ }
};
</script>