|
@ -94,13 +94,13 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
|
|
|
'$route'(to, from) {//监听路由改变 |
|
|
|
|
|
this.currentPath = to.path; |
|
|
|
|
|
this.currentPathName = to.name; |
|
|
|
|
|
this.currentPathNameParent = to.matched[0].name; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// watch: { |
|
|
|
|
|
// '$route'(to, from) {//监听路由改变 |
|
|
|
|
|
// this.currentPath = to.path; |
|
|
|
|
|
// this.currentPathName = to.name; |
|
|
|
|
|
// this.currentPathNameParent = to.matched[0].name; |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
methods: { |
|
|
methods: { |
|
|
onSubmit() { |
|
|
onSubmit() { |
|
|
console.log('submit!'); |
|
|
console.log('submit!'); |
|
@ -119,6 +119,7 @@ |
|
|
this.$confirm('确认退出吗?', '提示', { |
|
|
this.$confirm('确认退出吗?', '提示', { |
|
|
//type: 'warning' |
|
|
//type: 'warning' |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
|
|
|
localStorage.removeItem('user'); |
|
|
_this.$router.replace('/login'); |
|
|
_this.$router.replace('/login'); |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
|
|
|
|
|
@ -126,6 +127,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
mounted() { |
|
|
|
|
|
this.currentPath = this.$route.path; |
|
|
|
|
|
this.currentPathName = this.$route.name; |
|
|
|
|
|
this.currentPathNameParent = this.$route.matched[0].name; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|