@@ -7,7 +7,7 @@ Description:
7
7
<template >
8
8
<section class =" home-queue" >
9
9
<i v-if =' this.activeLayer.id !== ""' class =" fas fa fa-chevron-up fa-md" @click =" setParentLayer" ></i >
10
- <span class =' list-title' v-if =' this.activeLayer.id !== ""' > Viewing Elements in '{{ this.activeComponent }} {{ this. depth }}' </span >
10
+ <span class =' list-title' v-if =' this.activeLayer.id !== ""' > Viewing Elements in '{{ this.activeComponent }} {{ depth }}' </span >
11
11
<span class =' list-title' v-else-if =' this.activeComponent !==""' > Viewing Elements in '{{ this.activeComponent }}' </span >
12
12
<span class =' list-title' v-else > Elements in Queue </span >
13
13
<hr >
@@ -49,7 +49,6 @@ export default {
49
49
},
50
50
data () {
51
51
return {
52
- depth: ' ' ,
53
52
exceptions: [' input' , ' img' , ' link' ]
54
53
}
55
54
},
@@ -74,7 +73,15 @@ export default {
74
73
set (value) {
75
74
this .$store .dispatch (setSelectedElementList, value)
76
75
}
76
+ },
77
+ depth : function () {
78
+ let newTitle = ' '
79
+ this .activeLayer .lineage .forEach (el => {
80
+ newTitle += ` > ${ el} `
81
+ })
82
+ return newTitle
77
83
}
84
+
78
85
},
79
86
methods: {
80
87
... mapActions ([' setActiveHTML' , ' setActiveLayer' , ' upOneLayer' ]),
@@ -89,20 +96,11 @@ export default {
89
96
},
90
97
setLayer (element ) {
91
98
this .setActiveLayer (element)
92
- this .setTitle ()
93
99
},
94
100
setParentLayer () {
95
101
if (this .activeLayer .id !== ' ' ) {
96
102
this .upOneLayer (this .activeLayer .id )
97
- this .setTitle ()
98
103
}
99
- },
100
- setTitle () {
101
- let newTitle = ' '
102
- this .activeLayer .lineage .forEach (el => {
103
- newTitle += ` > ${ el} `
104
- })
105
- this .depth = newTitle
106
104
}
107
105
},
108
106
watch: {
@@ -113,12 +111,6 @@ export default {
113
111
} else {
114
112
this .component = false
115
113
}
116
- },
117
- activeLayer : function () {
118
- // console.log('watching activeComponent in HomeQueue')
119
- if (this .activeLayer !== ' ' ) {
120
- this .setTitle ()
121
- }
122
114
}
123
115
}
124
116
}
0 commit comments