Skip to content

Commit 270b3a8

Browse files
committed
exceptions to nesting html elements
1 parent 742b13d commit 270b3a8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/HomeQueue.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Description:
2121
@dblclick.self="setActiveElement(element)"
2222
v-for="(element) in renderList" :key="element[1] + Date.now()"
2323
>
24-
<i v-if='activeComponent === "" ' class="fas fa fa-angle-double-down fa-md" id="unavailable"></i>
24+
<i v-if='activeComponent === "" || exceptions.includes(element[0]) ' class="fas fa fa-angle-double-down fa-md" id="unavailable"></i>
2525
<i v-else class="fas fa fa-angle-double-down fa-md" @click="setLayer({text: element[0], id: element[2]})"></i>
2626
{{ element[0] }}
2727
<i class="fas fa fa-trash fa-md" @click.self="deleteElement([element[1],element[2]])"></i>
@@ -64,7 +64,8 @@ export default {
6464
},
6565
data () {
6666
return {
67-
depth: ''
67+
depth: '',
68+
exceptions: ['input', 'img', 'link']
6869
}
6970
},
7071
computed: {
@@ -97,7 +98,7 @@ export default {
9798
else this.$store.dispatch(deleteFromComponentHtmlList, id[1])
9899
},
99100
setActiveElement (element) {
100-
if (this.activeComponent !== '') {
101+
if (this.activeComponent !== '' && !this.exceptions.includes(element[0])) {
101102
this.setActiveHTML(element)
102103
}
103104
},

0 commit comments

Comments
 (0)