Skip to content

Commit 22e7ee0

Browse files
committed
v-binding to child's child-deleted repetitive code
1 parent 3eac98b commit 22e7ee0

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export default {
6767
//show the badge for all nested children arrays
6868
const checkChild = array => {
6969
for (let html of array) {
70-
console.log(html)
7170
if (html.children.length) {
7271
checkChild(html.children)
7372
} else {

src/components/right-sidebar/CodeSnippet.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ export default {
222222
children.forEach((name) => {
223223
childrenComponentNames += ` ${name},\n`;
224224
});
225-
console.log("lets look at data", this.componentMap[this.activeComponent])
226225
// if true add data section and populate with props
227226
let data = "";
228227
if (this.componentMap[this.activeComponent].props.length) {
@@ -235,13 +234,21 @@ export default {
235234
data += " },\n";
236235
}
237236
const htmlBinding = this.componentMap[this.activeComponent].htmlList
238-
239237
data += " data() {\n return {\n"
240238
htmlBinding.forEach(el => {
241239
if (el.binding !== '') {
242240
data += ` "${el.binding}": "PLACEHOLDER FOR VALUE", `
243241
data += '\n'
244242
}
243+
//checks if there is binding in it's html child's child and will add to code snippet
244+
if (el.children.length !== 0) {
245+
el.children.forEach( el1 => {
246+
if(el1.binding !== '') {
247+
data += ` "${el1.binding}": "PLACEHOLDER FOR VALUE", `
248+
data += '\n'
249+
}
250+
})
251+
}
245252
})
246253
data += ` }`
247254
data += ` \n }, \n `

src/components/right-sidebar/HTMLQueue.vue

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,6 @@ Description:
6060
</ul>
6161
</div>
6262

63-
<!--attribute child's child-->
64-
<div class="AttributeContainer" v-for="element in this.componentMap[this.activeComponent].htmlList"
65-
:key="element.id + Date.now()">
66-
<ul v-for="element1 in element.children"
67-
:key="element1.id + Date.now()">
68-
<li v-if="element1.id === this.activeHTML">Your class is - {{ element1.class }}</li>
69-
</ul>
70-
</div>
71-
7263
<div class="formBox">
7364
<q-form autofocus v-on:submit.prevent="submitClass">
7465
<p class="title">Add Class Name:</p>

0 commit comments

Comments
 (0)