|
|
@@ -27,21 +27,21 @@ export default {
|
|
|
])
|
|
|
},
|
|
|
watch: {
|
|
|
- $route (to, from) {
|
|
|
- if (to.name === 'dashboard') {
|
|
|
- this.active = ''
|
|
|
- } else {
|
|
|
- this.active = this.activeHeader
|
|
|
- }
|
|
|
- }
|
|
|
- // 'activeHeader': {
|
|
|
- // handler(val) {
|
|
|
- // if(this.$route.name !== 'dashboard') {
|
|
|
+ // $route (to, from) {
|
|
|
+ // if (to.name === 'dashboard') {
|
|
|
+ // this.active = ''
|
|
|
+ // } else {
|
|
|
// this.active = this.activeHeader
|
|
|
// }
|
|
|
- // },
|
|
|
- // immediate: true
|
|
|
// }
|
|
|
+ 'activeHeader': {
|
|
|
+ handler (val) {
|
|
|
+ if (this.$route.name !== 'dashboard') {
|
|
|
+ this.active = this.activeHeader
|
|
|
+ }
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
// '$route.matched': {
|
|
|
// handler(val) {
|
|
|
// this.active = val[val.length - 1].path
|