File tree Expand file tree Collapse file tree 4 files changed +30
-13
lines changed
components/HomeSideDropDownItems Expand file tree Collapse file tree 4 files changed +30
-13
lines changed Original file line number Diff line number Diff line change @@ -7,22 +7,24 @@ Description:
7
7
<template >
8
8
<div class =" home-sidebar" >
9
9
<q-input
10
- @keyup.enter.native =" editComponentName (newName)"
10
+ @keyup.enter.native =" editCompName (newName)"
11
11
standout =" bg-secondary text-white"
12
12
bottom-slots
13
+ v-on:keyup.delete.stop
13
14
v-model =" newName"
14
15
label =" Edit name"
15
16
dense
16
17
class =" input-add"
17
- >
18
- <template v-slot :append >
18
+ / >
19
+ <!-- < template v-slot:append>
19
20
<q-btn
20
21
round
21
22
dense
22
23
flat
23
- icon =" add "
24
- @click =" createNewAction(textAction )"
24
+ icon="fas fa-edit "
25
+ @click="editCompName(newName )"
25
26
/>
27
+ </template> -->
26
28
<multiselect
27
29
class =' multiselect'
28
30
v-model =" value"
@@ -82,6 +84,10 @@ export default {
82
84
// this.setActiveComponent(componentData.componentName)
83
85
// this.activeComponentData.isActive = true
84
86
// },
87
+ //
88
+ // deleteCircumvent (e) {
89
+ // e.preventDefault()
90
+ // },
85
91
// Deletes the selected component
86
92
deleteSelectedComp (componentData ) {
87
93
if (componentData) {
@@ -101,15 +107,12 @@ export default {
101
107
this .setActiveComponent (' ' )
102
108
}
103
109
}
110
+ },
111
+ watch: {
112
+ activeComponentObj : function () {
113
+ this .newName = this .activeComponentObj .componentName
114
+ }
104
115
}
105
- // watch: {
106
- // activeComponent: function () {
107
- // // console.log('watching activeComponent in Footer');
108
- // if (this.activeComponent === '' && this.selectedElementList.length !== 0) {
109
- // this.tab = 'html'
110
- // }
111
- // }
112
- // }
113
116
}
114
117
</script >
115
118
Original file line number Diff line number Diff line change @@ -155,6 +155,11 @@ const actions = {
155
155
} ,
156
156
// End of Vuex Actions section //////////////////////////////////////////
157
157
158
+ // Action primarily for edit functionality////////////////////////////////////////
159
+ [ types . editComponentName ] : ( { commit } , payload ) => {
160
+ commit ( types . EDIT_COMPONENT_NAME , payload )
161
+ } ,
162
+
158
163
// Actions dispatched from left hand panel////////////////////////////////////////
159
164
160
165
[ types . addToComponentElementList ] : ( { commit } , payload ) => {
Original file line number Diff line number Diff line change @@ -166,6 +166,13 @@ const mutations = {
166
166
state . activeComponentObj = null
167
167
state . activeComponentObj = active
168
168
} ,
169
+
170
+ // *** EDIT FUNCTIONALITY *** //////////////////////////////////////////////
171
+
172
+ [ types . EDIT_COMPONENT_NAME ] : ( state , payload ) => {
173
+
174
+ } ,
175
+
169
176
// *** HTML ELEMENTS *** //////////////////////////////////////////////
170
177
171
178
[ types . ADD_NESTED_HTML ] : ( state , payload ) => {
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export const DELETE_FROM_QUEUE = 'DELETE_FROM_QUEUE'
28
28
export const DELETE_PROJECT_TAB = 'DELETE_PROJECT_TAB'
29
29
export const DELETE_ROUTE = 'DELETE_ROUTE'
30
30
export const DELETE_SELECTED_ELEMENT = 'DELETE_SELECTED_ELEMENT'
31
+ export const EDIT_COMPONENT_NAME = 'EDIT_COMPONENT_NAME'
31
32
export const EMPTY_STATE = 'EMPTY_STATE'
32
33
export const IMPORT_IMAGE = 'IMPORT_IMAGE'
33
34
export const INCREMENT_PROJECT_ID = 'INCREMENT_PROJECT_ID'
@@ -79,6 +80,7 @@ export const deleteFromComponentHtmlList = 'deleteFromComponentHtmlList'
79
80
export const deleteFromQueue = 'deleteFromQueue'
80
81
export const deleteProjectTab = 'deleteProjectTab'
81
82
export const deleteSelectedElement = 'deleteSelectedElement'
83
+ export const editComponentName = 'editComponentName'
82
84
export const importImage = 'importImage'
83
85
export const incrementProjectId = 'incrementProjectId'
84
86
export const openProject = 'openProject'
You can’t perform that action at this time.
0 commit comments