Skip to content

Commit 209e7cd

Browse files
committed
merge conflicts
1 parent 5584bb3 commit 209e7cd

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/components/composables/useCreateComponent.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
export function useCreateComponent(importObj) {
22
const createComponent = (importObj) => {
33
let imported = false;
4-
if (importObj.hasOwnProperty('componentName')){
4+
if (importObj.hasOwnProperty('componentName')) {
55
imported = true;
66
//Check if state and actions on import exist in the store. If not, add them.
7-
for (let i = 0; i < importObj.actions.length; i++){
8-
if (!this.userActions.includes(importObj.actions[i])){
7+
for (let i = 0; i < importObj.actions.length; i++) {
8+
if (!this.userActions.includes(importObj.actions[i])) {
99
this.createAction(importObj.actions[i])
1010
}
1111
}
12-
for (let i = 0; i < importObj.state.length; i++){
13-
if (!this.userState.includes(importObj.state[i])){
12+
for (let i = 0; i < importObj.state.length; i++) {
13+
if (!this.userState.includes(importObj.state[i])) {
1414
this.createState(importObj.state[i])
1515
}
1616
}
17-
for (let i = 0; i < importObj.props.length; i++){
18-
if (!this.userProps.includes(importObj.props[i])){
17+
for (let i = 0; i < importObj.props.length; i++) {
18+
if (!this.userProps.includes(importObj.props[i])) {
1919
this.createProp(importObj.props[i])
2020
}
2121
}
@@ -42,22 +42,23 @@ export function useCreateComponent(importObj) {
4242
parent: {},
4343
isActive: false,
4444
color: "#ffffff85",
45-
htmlAttributes:{
46-
class:"",
47-
id:"",
45+
htmlAttributes: {
46+
class: "",
47+
id: "",
48+
binding: "",
4849
}
4950
};
5051

51-
if (imported === true){
52+
if (imported === true) {
5253
component.componentName = importObj.componentName;
5354
component.htmlList = importObj.htmlList;
5455
component.actions = importObj.actions;
5556
component.state = importObj.state;
5657
component.props = importObj.props;
5758
} else {
58-
component.componentName = this.componentNameInputValue.replace(/[^a-z0-9-_.]/gi,"");
59+
component.componentName = this.componentNameInputValue.replace(/[^a-z0-9-_.]/gi, "");
5960
}
60-
61+
6162
if (!this.componentMap[component.componentName]) {
6263
this.registerComponent(component);
6364
this.setActiveComponent(component.componentName);

src/components/right-sidebar/HTMLQueue.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default {
106106
107107
},
108108
methods: {
109-
...mapActions(['setActiveHTML', 'setActiveLayer', 'upOneLayer', 'openAttributeModal', 'addActiveComponentClass']),
109+
...mapActions(['setActiveHTML', 'setActiveLayer', 'upOneLayer', 'openAttributeModal', 'addActiveComponentClass, addBinding']),
110110
deleteElement(id) {
111111
if (this.activeComponent === '') this.$store.dispatch(deleteSelectedElement, id[0])
112112
else this.$store.dispatch(deleteFromComponentHtmlList, id[1])
@@ -120,8 +120,6 @@ export default {
120120
setLayer(element) {
121121
this.setActiveLayer(element)
122122
element.id = this.activeHTML
123-
console.log(element)
124-
console.log(this.activeHTML)
125123
},
126124
setParentLayer() {
127125
if (this.activeLayer.id !== '') {
@@ -139,14 +137,15 @@ export default {
139137
this.addActiveComponentClass(payload);
140138
this.classText = '';
141139
},
142-
// submitBinding(element, idNum) {
140+
// addBinding(element, idNum) {
143141
// if (element === '') {
144142
// return;
145143
// }
146144
// let payload = {
147-
145+
// binding: element,
146+
// id: idNum
148147
// }
149-
// }
148+
// },
150149
},
151150
watch: {
152151
attributeModalOpen() {

0 commit comments

Comments
 (0)