Skip to content

Commit 70afeb4

Browse files
committed
merged and fixed some bugs during attribute change
1 parent 0afd080 commit 70afeb4

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/components/left-sidebar/ComponentTab/AttributesSubMenu.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export default {
8888
routeArray: this.routes[this.activeRoute],
8989
activeComponentData: this.activeComponentData,
9090
})
91+
this.attributeText = "";
9192
},
9293
9394
changeAttribute(attribute) {

src/components/right-sidebar/HTMLQueue.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,33 @@ export default {
116116
'dragDropSortSelectedHtmlElements',
117117
'openAttributeModal',
118118
'addActiveComponentClass',
119-
'addBindingText'
119+
'addBindingText',
120+
'clearActiveHTML',
120121
]),
121122
deleteElement (id) {
122123
if (this.activeComponent === '') this.$store.dispatch(deleteSelectedElement, id[0])
123124
else this.$store.dispatch(deleteFromComponentHtmlList, id[1])
124125
125126
},
127+
128+
closeMenu(element) {
129+
if (this.activeComponent !== '') {
130+
this.clearActiveHTML()
131+
this.openAttributeModal(element);
132+
}
133+
},
134+
126135
setActiveElement(element) {
127136
if (this.activeComponent !== '') {
128137
this.setActiveHTML(element);
129138
if (this.attributeModal === false) {
130139
this.openAttributeModal(element);
140+
} else {
141+
this.closeMenu(element);
131142
}
132143
}
133144
},
145+
134146
setLayer(element) {
135147
this.setActiveLayer(element)
136148
element.id = this.activeHTML

0 commit comments

Comments
 (0)