1
1
<template >
2
2
<div >
3
3
4
- <q-btn-dropdown class =" attributeDropDown" color =" primary" :label =" attributeSelection" >
4
+ <q-btn-dropdown class =" attributeDropDown" color =" primary" :label =" attributeSelection" >
5
5
<q-list >
6
- <q-item clickable v-close-popup @click =" changeAttribute('id')" >
6
+ <q-item clickable v-close-popup @keyup.enter = " changeAttribute('id') " @ click =" changeAttribute('id')" >
7
7
<q-item-section >
8
8
<q-item-label >ID</q-item-label >
9
9
</q-item-section >
10
10
</q-item >
11
11
12
- <q-item clickable v-close-popup @click =" changeAttribute('class')" >
12
+ <q-item clickable v-close-popup @keyup.enter = " changeAttribute('class') " @ click =" changeAttribute('class')" >
13
13
<q-item-section >
14
14
<q-item-label >Class</q-item-label >
15
15
</q-item-section >
16
16
</q-item >
17
17
</q-list >
18
18
</q-btn-dropdown >
19
19
20
- <q-input
21
- @keyup.enter =" createAttribute(attributeText)"
22
- color =" white"
23
- dark
24
- outlined
25
- bottom-slots
26
- v-model =" attributeText"
27
- label =" Enter Label"
28
- dense
29
- class =" input-add"
30
- v-on:keyup.delete.stop
31
- >
20
+ <q-input @keyup.enter =" createAttribute(attributeText)" color =" white" dark outlined bottom-slots
21
+ v-model =" attributeText" label =" Enter Label" dense class =" input-add" v-on:keyup.delete.stop >
32
22
<template v-slot :append >
33
23
<q-btn flat icon =" add" @click =" createAttribute(attributeText)" />
34
24
</template >
35
25
</q-input >
36
26
37
- <button v-if = " this.activeComponentObj.htmlAttributes.class !== ''" class = " deleteButton" @click =" deleteAttribute('class')" color =" primary" >Remove class</button >
27
+ <button v-if =" this.activeComponentObj.htmlAttributes.class !== ''" class =" deleteButton"
28
+ @click =" deleteAttribute('class')" color =" primary" >Remove class</button >
38
29
39
- <button v-if = " this.activeComponentObj.htmlAttributes.id !== ''" class = " deleteButton" @click =" deleteAttribute('id')" color =" primary" >Remove id</button >
30
+ <button v-if =" this.activeComponentObj.htmlAttributes.id !== ''" class =" deleteButton" @click =" deleteAttribute('id')"
31
+ color =" primary" >Remove id</button >
40
32
41
33
<!-- <div>
42
34
<q-btn
@@ -64,30 +56,30 @@ export default {
64
56
return {
65
57
attributeText: " " ,
66
58
attributeSelection: " id" ,
67
- deleteText: " " ,
59
+ deleteText: " " ,
68
60
};
69
61
},
70
62
computed: {
71
63
... mapState ([
72
- " selectedProps" ,
64
+ " selectedProps" ,
73
65
" userProps" ,
74
- " activeComponentObj" ,
66
+ " activeComponentObj" ,
75
67
" activeComponent" ,
76
68
" routes" ,
77
- ]),
69
+ ]),
78
70
},
79
71
80
72
methods: {
81
73
... mapActions ([
82
- " editAttribute" ,
83
- " activeRoute" ,
74
+ " editAttribute" ,
75
+ " activeRoute" ,
84
76
" activeComponentData"
85
- ]),
77
+ ]),
86
78
// Prevent Delete on changes to searchable multiselect
87
79
stopDelete (e ) {
88
80
if (e .code === " Backspace" ) e .stopPropogation ();
89
81
},
90
-
82
+
91
83
createAttribute (attributeText ) {
92
84
this .editAttribute ({
93
85
attribute: this .attributeSelection ,
@@ -109,38 +101,36 @@ export default {
109
101
activeComponent: this .activeComponent ,
110
102
routeArray: this .routes [this .activeRoute ],
111
103
activeComponentData: this .activeComponentData ,
112
- })
104
+ })
113
105
}
114
106
},
115
107
};
116
108
</script >
117
109
118
110
<style lang="scss" scoped>
119
-
120
- .attributeDropDown {
121
- margin-top : 15px ;
122
- padding-right : 10px ;
123
- font-size : 1em ;
124
- }
125
-
126
- .input-add {
127
- // position:absolute;
128
- // margin-left: 7em;
129
- // bottom:-100%;
130
- margin-top :1em ;
131
- margin-bottom : -1em ;
132
- }
133
- .deleteButton {
134
- width :100px ;
135
- height :30px ;
136
- background-color :rgba (204 , 190 , 190 , 0.164 );
137
- color : $menutext ;
138
- margin-right :2em ;
139
- }
140
-
141
- .deleteButton :hover {
142
- cursor : pointer ;
143
- }
144
-
145
-
111
+ .attributeDropDown {
112
+ margin-top : 15px ;
113
+ padding-right : 10px ;
114
+ font-size : 1em ;
115
+ }
116
+
117
+ .input-add {
118
+ // position:absolute;
119
+ // margin-left: 7em;
120
+ // bottom:-100%;
121
+ margin-top : 1em ;
122
+ margin-bottom : -1em ;
123
+ }
124
+
125
+ .deleteButton {
126
+ width : 100px ;
127
+ height : 30px ;
128
+ background-color : rgba (204 , 190 , 190 , 0.164 );
129
+ color : $menutext ;
130
+ margin-right : 2em ;
131
+ }
132
+
133
+ .deleteButton :hover {
134
+ cursor : pointer ;
135
+ }
146
136
</style >
0 commit comments