File tree Expand file tree Collapse file tree 3 files changed +22
-21
lines changed Expand file tree Collapse file tree 3 files changed +22
-21
lines changed Original file line number Diff line number Diff line change 14
14
<q-tab name =" props" label =" Component Props" id =" label-text" />
15
15
</q-tabs >
16
16
<q-tab-panels v-model =" tab" animated class =" html-bg text-white" >
17
- <q-tab-panel name =" state" v-model =" compoent " >
17
+ <q-tab-panel name =" state" v-model =" activeState " >
18
18
<ul id =" stateList" >
19
19
<li v-for =" comp in activeState" :key =" comp" >
20
20
{{ comp }}
21
21
</li >
22
22
</ul >
23
23
</q-tab-panel >
24
- <q-tab-panel name =" actions" >
24
+ <q-tab-panel name =" actions" v-model = " activeActions " >
25
25
<ul id =" actionList" >
26
26
<li v-for =" comp in activeActions" :key =" comp" >
27
27
{{ comp }}
28
28
</li >
29
29
</ul >
30
30
</q-tab-panel >
31
- <q-tab-panel name =" props" >
31
+ <q-tab-panel name =" props" v-model = " activeProps " >
32
32
<ul id =" propsList" >
33
33
<li v-for =" comp in activeProps" :key =" comp" >
34
34
{{ comp }}
@@ -48,29 +48,24 @@ export default {
48
48
name: " ComponentDetails" ,
49
49
computed: {
50
50
... mapState ([" activeComponentObj" ]),
51
- // component: {
52
- // get(){
53
- // return this.activeComponentObj
54
- // }
55
- // },
56
51
activeState: {
57
- get (){
58
- if (this .activeComponentObj ) return this .activeComponentObj .state ;
59
- return []
60
- }
52
+ get () {
53
+ if (this .activeComponentObj ) return this .activeComponentObj .state ;
54
+ return []
55
+ },
61
56
},
62
57
activeProps: {
63
- get (){
64
- if (this .activeComponentObj ) return this .activeComponentObj .props ;
65
- return []
66
- }
58
+ get () {
59
+ if (this .activeComponentObj ) return this .activeComponentObj .props ;
60
+ return [];
61
+ },
67
62
},
68
63
activeActions: {
69
- get (){
70
- if (this .activeComponentObj ) return this .activeComponentObj .actions ;
71
- return []
72
- }
73
- }
64
+ get () {
65
+ if (this .activeComponentObj ) return this .activeComponentObj .actions ;
66
+ return [];
67
+ },
68
+ },
74
69
// componentActions: {
75
70
// get() {
76
71
// return this.$store.state.activeComponentObj.actions;
Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ export default {
226
226
return comp .componentName === this .activeComponent ;
227
227
})[0 ]
228
228
);
229
+ console .log (" Active comp 2" , this .$store .state .activeComponentObj )
229
230
},
230
231
createNewProp (text ) {
231
232
if (! this .$store .state .userProps .includes (text)) {
Original file line number Diff line number Diff line change @@ -104,6 +104,9 @@ const mutations = {
104
104
}
105
105
}
106
106
state . selectedActions = [ ]
107
+ // super weird code, minor changes to objects are not reactive
108
+ // setting to null and then resetting to object makes it reactive
109
+ state . activeComponentObj = null
107
110
state . activeComponentObj = active
108
111
} ,
109
112
@@ -130,6 +133,7 @@ const mutations = {
130
133
}
131
134
}
132
135
state . selectedProps = [ ]
136
+ state . activeComponentObj = null
133
137
state . activeComponentObj = active
134
138
} ,
135
139
@@ -156,6 +160,7 @@ const mutations = {
156
160
}
157
161
}
158
162
state . selectedState = [ ]
163
+ state . activeComponentObj = null
159
164
state . activeComponentObj = active
160
165
} ,
161
166
// *** HTML ELEMENTS *** //////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments