@@ -31,45 +31,54 @@ Description:
31
31
<i class =" fas fa fa-trash fa-md" @click.self =" deleteElement([element[1], element[2]])" ></i >
32
32
</div >
33
33
</div >
34
- </div >
35
-
36
- <!-- attribute pop-up -->
37
- <q-dialog v-model =" attributeModal" >
38
- <!-- @update:model-value="setActiveElement" -->
39
- <div class =" AttributeBox" >
40
- <p class =" title" >Add attributes to: {{ this.activeComponent }}</p >
41
- <!-- attribute child-->
42
- <div class =" AttributeContainer" v-for =" element in this.componentMap[this.activeComponent].htmlList"
43
- :key =" element.id + Date.now()" >
44
- <p v-if =" element.id === this.activeHTML" >Your class is - {{ element.class }}</p >
45
- <p v-if =" element.id === this.activeHTML" > You've binded to - {{ element.binding }}</p >
46
- </div >
47
- <!-- <div class="AttributeContainer" v-for="element in this.componentMap[this.activeComponent].htmlList"
48
- :key="element.id + Date.now()">
49
-
50
- </div> -->
51
-
52
- <div class =" formBox" >
53
- <q-form autofocus v-on:submit.prevent =" submitClass" >
54
- <p class =" title" >Add Class Name:</p >
55
- <q-input label =" Add your class here" filled dark autofocus true hide-bottom-space v-model =" classText"
56
- @keyup.enter =" submitClass" ></q-input >
57
- <q-btn id =" comp-btn" class =" sidebar-btn" color =" secondary" label =" Submit Attribute"
58
- :disable =" classText.length > 0 ? false : true" @click =" submitClass(classText, this.activeHTML)" />
59
- </q-form >
60
- <q-form autofocus v-on:submit.prevent =" addBinding" >
61
- <p class =" title" >Add Binding:</p >
62
-
63
- <q-input label =" Add two way binding here" filled dark autofocus true hide-bottom-space v-model =" bindingText"
64
- @keyup.enter =" addBinding" ></q-input >
65
- <q-btn id =" comp-btn" class =" sidebar-btn" color =" secondary" label =" Add Binding"
66
- :disable =" bindingText.length > 0 ? false : true" @click =" addBinding(bindingText, this.activeHTML)" >
67
- </q-btn >
68
- </q-form >
69
- <q-btn label =" Close" @click =" this.openAttributeModal" />
34
+
35
+ <!-- attribute pop-up -->
36
+ <q-dialog v-model =" attributeModal" >
37
+ <!-- @update:model-value="setActiveElement" -->
38
+ <div class =" AttributeBox" >
39
+ <p class =" title" >Add attributes to: {{ this.activeComponent }}</p >
40
+ <!-- attribute child-->
41
+ <div class =" AttributeContainer" v-for =" element in this.componentMap[this.activeComponent].htmlList"
42
+ :key =" element.id + Date.now()" >
43
+ <p v-if =" element.id === this.activeHTML" >Your class is - {{ element.class }}</p >
44
+ <p v-if =" element.id === this.activeHTML" > You've binded to - {{ element.binding }}</p >
45
+ </div >
46
+ <!-- attribute child's child-->
47
+ <div class =" AttributeContainer" v-for =" element in this.componentMap[this.activeComponent].htmlList"
48
+ :key =" element.id + Date.now()" >
49
+ <ul v-for =" element1 in element.children" :key =" element1.id + Date.now()" >
50
+ <li v-if =" element1.id === this.activeHTML" >Your class is - {{ element1.class }}</li >
51
+ </ul >
52
+ </div >
53
+
54
+ <div class =" AttributeContainer" v-for =" element in this.componentMap[this.activeComponent].htmlList"
55
+ :key =" element.id + Date.now()" >
56
+ <ul v-for =" element1 in element.children" :key =" element1.id + Date.now()" >
57
+ <li v-if =" element1.id === this.activeHTML" >You've binded to - {{ element1.binding }}</li >
58
+ </ul >
59
+ </div >
60
+
61
+ <div class =" formBox" >
62
+ <q-form autofocus v-on:submit.prevent =" submitClass" >
63
+ <p class =" title" >Add Class Name:</p >
64
+ <q-input label =" Add your class here" filled dark autofocus true hide-bottom-space v-model =" classText"
65
+ @keyup.enter =" submitClass" ></q-input >
66
+ <q-btn id =" comp-btn" class =" sidebar-btn" color =" secondary" label =" Submit Attribute"
67
+ :disable =" classText.length > 0 ? false : true" @click =" submitClass(classText, this.activeHTML)" />
68
+ </q-form >
69
+ <q-form autofocus v-on:submit.prevent =" addBinding" >
70
+ <p class =" title" >Add Binding:</p >
71
+
72
+ <q-input label =" Add two way binding here" filled dark autofocus true hide-bottom-space
73
+ v-model =" bindingText" @keyup.enter =" addBinding" ></q-input >
74
+ <q-btn id =" comp-btn" class =" sidebar-btn" color =" secondary" label =" Add Binding"
75
+ :disable =" bindingText.length > 0 ? false : true" @click =" addBinding(bindingText, this.activeHTML)" >
76
+ </q-btn >
77
+ </q-form >
78
+ <q-btn label =" Close" @click =" this.openAttributeModal" />
79
+ </div >
70
80
</div >
71
- </div >
72
- </q-dialog >
81
+ </q-dialog >
73
82
</section >
74
83
</template >
75
84
@@ -99,7 +108,7 @@ export default {
99
108
}
100
109
},
101
110
computed: {
102
- ... mapState ([' selectedElementList' , ' componentMap' , ' activeComponent' , ' activeHTML' , ' activeLayer' , ' attributeModalOpen' ]),
111
+ ... mapState ([' activeComponentObj ' , ' selectedElementList' , ' componentMap' , ' activeComponent' , ' activeHTML' , ' activeLayer' , ' attributeModalOpen' ]),
103
112
renderList: {
104
113
get () {
105
114
if (this .activeComponent === ' ' ) return this .selectedElementList .map ((el , index ) => [el .text , index, el .id ])
0 commit comments