File tree Expand file tree Collapse file tree 4 files changed +35
-9
lines changed Expand file tree Collapse file tree 4 files changed +35
-9
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,8 @@ export default {
131
131
' activeComponent' ,
132
132
' componentMap' ,
133
133
' componentChildrenMultiselectValue' ,
134
- ' imagePath'
134
+ ' imagePath' ,
135
+ ' activeComponentObj'
135
136
]),
136
137
137
138
// used in VueDraggableResizeable component
@@ -377,6 +378,14 @@ export default {
377
378
if (! (this .activeComponent === ' ' )) this .setActiveComponent (' ' )
378
379
}
379
380
}
381
+ },
382
+ watch: {
383
+ activeComponentObj: {
384
+ handler () {
385
+ // console.log('componentMap has changed')
386
+ this .value = ' '
387
+ }
388
+ }
380
389
}
381
390
}
382
391
</script >
@@ -462,4 +471,4 @@ export default {
462
471
#counter {
463
472
margin-top : 20px ;
464
473
}
465
- </style >
474
+ </style >
Original file line number Diff line number Diff line change @@ -64,8 +64,11 @@ export default {
64
64
// console.log('component', component)
65
65
return component
66
66
},
67
- activeComponentData () {
67
+ activeComponentData () {
68
68
return this .activeComponentObj
69
+ // set(name){
70
+ // this.editComponentName(name)
71
+ // }
69
72
},
70
73
options () {
71
74
const val = this .activeRouteDisplay .map (component => component .componentName )
@@ -77,7 +80,8 @@ export default {
77
80
... mapActions ([
78
81
' setActiveComponent' ,
79
82
' deleteComponent' ,
80
- ' deleteActiveComponent'
83
+ ' deleteActiveComponent' ,
84
+ ' editComponentName'
81
85
]),
82
86
// Set component as active component from left side dropdown
83
87
// onActivated (componentData) {
@@ -106,11 +110,17 @@ export default {
106
110
if (this .activeComponent !== ' ' ) {
107
111
this .setActiveComponent (' ' )
108
112
}
113
+ },
114
+ editCompName (name ){
115
+ if (name) this .editComponentName (name)
116
+ console .log (this .routes [this .activeRoute ])
117
+ console .log (this .activeComponentObj )
118
+ console .log (this .activeComponent )
109
119
}
110
120
},
111
121
watch: {
112
122
activeComponentObj : function () {
113
- this .newName = this .activeComponentObj .componentName
123
+ if ( this . activeComponentObj ) this .newName = this .activeComponentObj .componentName
114
124
}
115
125
}
116
126
}
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ Description:
51
51
id =" add-actions-btn"
52
52
class =" add-btn"
53
53
color =" secondary"
54
- label =" Add Action(s)"
54
+ label =" Map Action(s)"
55
55
@click =" addActionToComp"
56
56
/>
57
57
</div >
@@ -95,7 +95,7 @@ Description:
95
95
id =" add-state-btn"
96
96
class =" add-btn"
97
97
color =" secondary"
98
- label =" Add State"
98
+ label =" Map State"
99
99
@click =" addStateToComp"
100
100
/>
101
101
</div >
@@ -107,7 +107,7 @@ Description:
107
107
standout =" bg-secondary text-white"
108
108
bottom-slots
109
109
v-model =" textProps"
110
- label =" Create Prop in Store "
110
+ label =" Create Prop"
111
111
dense
112
112
class =" input-add"
113
113
>
Original file line number Diff line number Diff line change @@ -170,7 +170,14 @@ const mutations = {
170
170
// *** EDIT FUNCTIONALITY *** //////////////////////////////////////////////
171
171
172
172
[ types . EDIT_COMPONENT_NAME ] : ( state , payload ) => {
173
-
173
+ // let temp = state.activeComponentObj
174
+ // temp.componentName = payload
175
+ let active = ( state . routes [ state . activeRoute ] . filter ( comp => {
176
+ return comp . componentName === state . activeComponent
177
+ } ) [ 0 ] )
178
+ active . componentName = payload
179
+ state . activeComponentObj = Object . assign ( { } ,
180
+ state . activeComponentObj , { componentName : payload } )
174
181
} ,
175
182
176
183
// *** HTML ELEMENTS *** //////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments