@burh/nuxt-core 1.0.379 → 1.0.381
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,241 +1,241 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="form-group">
|
|
3
|
-
<slot name="label">
|
|
4
|
-
<label
|
|
5
|
-
v-if="label"
|
|
6
|
-
:class="[
|
|
7
|
-
{ 'is-invalid': error },
|
|
8
|
-
{ 'label-required': required },
|
|
9
|
-
labelClasses
|
|
10
|
-
]"
|
|
11
|
-
>
|
|
12
|
-
{{ label }}
|
|
13
|
-
<span v-if="required" class="label-required-text"
|
|
14
|
-
>Obrigatório</span
|
|
15
|
-
>
|
|
16
|
-
</label>
|
|
17
|
-
</slot>
|
|
18
|
-
<div
|
|
19
|
-
:class="[
|
|
20
|
-
{ 'input-group': hasIcon },
|
|
21
|
-
{ focused: focused },
|
|
22
|
-
{ 'input-group-alternative': alternative },
|
|
23
|
-
{ 'has-label': label || $slots.label },
|
|
24
|
-
inputGroupClasses
|
|
25
|
-
]"
|
|
26
|
-
>
|
|
27
|
-
<div
|
|
28
|
-
v-if="prependIcon || $slots.prepend"
|
|
29
|
-
class="input-group-prepend"
|
|
30
|
-
>
|
|
31
|
-
<span class="input-group-text">
|
|
32
|
-
<slot name="prepend">
|
|
33
|
-
<i :class="prependIcon"></i>
|
|
34
|
-
</slot>
|
|
35
|
-
</span>
|
|
36
|
-
</div>
|
|
37
|
-
<slot v-bind="slotData" v-if="type !== 'textarea'">
|
|
38
|
-
<input
|
|
39
|
-
v-if="!mask.length"
|
|
40
|
-
:value="value"
|
|
41
|
-
:type="type"
|
|
42
|
-
v-on="listeners"
|
|
43
|
-
v-bind="$attrs"
|
|
44
|
-
:valid="!error"
|
|
45
|
-
:required="required"
|
|
46
|
-
class="form-control"
|
|
47
|
-
:class="[
|
|
48
|
-
{ 'is-valid': valid === true },
|
|
49
|
-
{ 'is-invalid': error },
|
|
50
|
-
inputClasses
|
|
51
|
-
]"
|
|
52
|
-
/>
|
|
53
|
-
<the-mask
|
|
54
|
-
v-else
|
|
55
|
-
class="form-control"
|
|
56
|
-
v-on="listeners"
|
|
57
|
-
v-bind="$attrs"
|
|
58
|
-
type="text"
|
|
59
|
-
:required="required"
|
|
60
|
-
:mask="mask"
|
|
61
|
-
:class="[
|
|
62
|
-
{ 'is-valid': valid === true },
|
|
63
|
-
{ 'is-invalid': error },
|
|
64
|
-
inputClasses
|
|
65
|
-
]"
|
|
66
|
-
/>
|
|
67
|
-
</slot>
|
|
68
|
-
<slot v-bind="slotData" v-else>
|
|
69
|
-
<textarea
|
|
70
|
-
:value="value"
|
|
71
|
-
v-on="listeners"
|
|
72
|
-
v-bind="$attrs"
|
|
73
|
-
:required="required"
|
|
74
|
-
class="form-control form-control-textarea"
|
|
75
|
-
:valid="!error"
|
|
76
|
-
:class="[
|
|
77
|
-
{ 'is-valid': valid === true },
|
|
78
|
-
{ 'is-invalid': error },
|
|
79
|
-
inputClasses
|
|
80
|
-
]"
|
|
81
|
-
/>
|
|
82
|
-
</slot>
|
|
83
|
-
<div v-if="appendIcon || $slots.append" class="input-group-append">
|
|
84
|
-
<span class="input-group-text">
|
|
85
|
-
<slot name="append">
|
|
86
|
-
<i :class="appendIcon"></i>
|
|
87
|
-
</slot>
|
|
88
|
-
</span>
|
|
89
|
-
</div>
|
|
90
|
-
<slot name="infoBlock"></slot>
|
|
91
|
-
<slot name="error">
|
|
92
|
-
<div
|
|
93
|
-
v-if="error"
|
|
94
|
-
class="invalid-feedback"
|
|
95
|
-
style="display: block;"
|
|
96
|
-
>
|
|
97
|
-
{{ error }}
|
|
98
|
-
</div>
|
|
99
|
-
</slot>
|
|
100
|
-
<slot name="success">
|
|
101
|
-
<div class="valid-feedback" v-if="!error && valid">
|
|
102
|
-
{{ successMessage }}
|
|
103
|
-
</div>
|
|
104
|
-
</slot>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
</template>
|
|
108
|
-
<script>
|
|
109
|
-
import { TheMask } from 'vue-the-mask';
|
|
110
|
-
|
|
111
|
-
export default {
|
|
112
|
-
inheritAttrs: false,
|
|
113
|
-
name: 'base-input',
|
|
114
|
-
props: {
|
|
115
|
-
required: {
|
|
116
|
-
type: Boolean,
|
|
117
|
-
description: 'Whether input is required (adds an asterix *)'
|
|
118
|
-
},
|
|
119
|
-
group: {
|
|
120
|
-
type: Boolean,
|
|
121
|
-
description:
|
|
122
|
-
'Whether input is an input group (manual override in special cases)'
|
|
123
|
-
},
|
|
124
|
-
valid: {
|
|
125
|
-
type: Boolean,
|
|
126
|
-
description: 'Whether is valid',
|
|
127
|
-
default: undefined
|
|
128
|
-
},
|
|
129
|
-
alternative: {
|
|
130
|
-
type: Boolean,
|
|
131
|
-
description: 'Whether input is of alternative layout'
|
|
132
|
-
},
|
|
133
|
-
label: {
|
|
134
|
-
type: String,
|
|
135
|
-
description: 'Input label (text before input)'
|
|
136
|
-
},
|
|
137
|
-
error: {
|
|
138
|
-
type: String,
|
|
139
|
-
description: 'Input error (below input)'
|
|
140
|
-
},
|
|
141
|
-
successMessage: {
|
|
142
|
-
type: String,
|
|
143
|
-
description: 'Input success message',
|
|
144
|
-
default: 'Looks good!'
|
|
145
|
-
},
|
|
146
|
-
labelClasses: {
|
|
147
|
-
type: String,
|
|
148
|
-
description: 'Input label css classes',
|
|
149
|
-
default: 'form-control-label'
|
|
150
|
-
},
|
|
151
|
-
inputClasses: {
|
|
152
|
-
type: String,
|
|
153
|
-
description: 'Input css classes'
|
|
154
|
-
},
|
|
155
|
-
inputGroupClasses: {
|
|
156
|
-
type: String,
|
|
157
|
-
description: 'Input group css classes'
|
|
158
|
-
},
|
|
159
|
-
value: {
|
|
160
|
-
type: [String, Number],
|
|
161
|
-
description: 'Input value'
|
|
162
|
-
},
|
|
163
|
-
type: {
|
|
164
|
-
type: String,
|
|
165
|
-
description: 'Input type',
|
|
166
|
-
default: 'text'
|
|
167
|
-
},
|
|
168
|
-
appendIcon: {
|
|
169
|
-
type: String,
|
|
170
|
-
description: 'Append icon (right)'
|
|
171
|
-
},
|
|
172
|
-
prependIcon: {
|
|
173
|
-
type: String,
|
|
174
|
-
description: 'Prepend icon (left)'
|
|
175
|
-
},
|
|
176
|
-
mask: {
|
|
177
|
-
type: Array,
|
|
178
|
-
default: () => {
|
|
179
|
-
return [];
|
|
180
|
-
},
|
|
181
|
-
description: 'Masks Array'
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
components: {
|
|
185
|
-
TheMask
|
|
186
|
-
},
|
|
187
|
-
data() {
|
|
188
|
-
return {
|
|
189
|
-
focused: false
|
|
190
|
-
};
|
|
191
|
-
},
|
|
192
|
-
computed: {
|
|
193
|
-
listeners() {
|
|
194
|
-
return {
|
|
195
|
-
...this.$listeners,
|
|
196
|
-
input: this.updateValue,
|
|
197
|
-
focus: this.onFocus,
|
|
198
|
-
blur: this.onBlur
|
|
199
|
-
};
|
|
200
|
-
},
|
|
201
|
-
slotData() {
|
|
202
|
-
return {
|
|
203
|
-
focused: this.focused,
|
|
204
|
-
error: this.error,
|
|
205
|
-
...this.listeners
|
|
206
|
-
};
|
|
207
|
-
},
|
|
208
|
-
hasIcon() {
|
|
209
|
-
const { append, prepend } = this.$slots;
|
|
210
|
-
return (
|
|
211
|
-
append !== undefined ||
|
|
212
|
-
prepend !== undefined ||
|
|
213
|
-
this.appendIcon !== undefined ||
|
|
214
|
-
this.prependIcon !== undefined ||
|
|
215
|
-
this.group
|
|
216
|
-
);
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
methods: {
|
|
220
|
-
updateValue(evt) {
|
|
221
|
-
let value = this.mask.length ? evt : evt.target.value;
|
|
222
|
-
|
|
223
|
-
this.$emit('input', value);
|
|
224
|
-
},
|
|
225
|
-
onFocus(evt) {
|
|
226
|
-
this.focused = true;
|
|
227
|
-
this.$emit('focus', evt);
|
|
228
|
-
},
|
|
229
|
-
onBlur(evt) {
|
|
230
|
-
this.focused = false;
|
|
231
|
-
this.$emit('blur', evt);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
</script>
|
|
236
|
-
<style lang="scss" scoped>
|
|
237
|
-
.form-control-textarea {
|
|
238
|
-
height: 180px;
|
|
239
|
-
resize: none;
|
|
240
|
-
}
|
|
241
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="form-group">
|
|
3
|
+
<slot name="label">
|
|
4
|
+
<label
|
|
5
|
+
v-if="label"
|
|
6
|
+
:class="[
|
|
7
|
+
{ 'is-invalid': error },
|
|
8
|
+
{ 'label-required': required },
|
|
9
|
+
labelClasses
|
|
10
|
+
]"
|
|
11
|
+
>
|
|
12
|
+
{{ label }}
|
|
13
|
+
<span v-if="required" class="label-required-text"
|
|
14
|
+
>Obrigatório</span
|
|
15
|
+
>
|
|
16
|
+
</label>
|
|
17
|
+
</slot>
|
|
18
|
+
<div
|
|
19
|
+
:class="[
|
|
20
|
+
{ 'input-group': hasIcon },
|
|
21
|
+
{ focused: focused },
|
|
22
|
+
{ 'input-group-alternative': alternative },
|
|
23
|
+
{ 'has-label': label || $slots.label },
|
|
24
|
+
inputGroupClasses
|
|
25
|
+
]"
|
|
26
|
+
>
|
|
27
|
+
<div
|
|
28
|
+
v-if="prependIcon || $slots.prepend"
|
|
29
|
+
class="input-group-prepend"
|
|
30
|
+
>
|
|
31
|
+
<span class="input-group-text">
|
|
32
|
+
<slot name="prepend">
|
|
33
|
+
<i :class="prependIcon"></i>
|
|
34
|
+
</slot>
|
|
35
|
+
</span>
|
|
36
|
+
</div>
|
|
37
|
+
<slot v-bind="slotData" v-if="type !== 'textarea'">
|
|
38
|
+
<input
|
|
39
|
+
v-if="!mask.length"
|
|
40
|
+
:value="value"
|
|
41
|
+
:type="type"
|
|
42
|
+
v-on="listeners"
|
|
43
|
+
v-bind="$attrs"
|
|
44
|
+
:valid="!error"
|
|
45
|
+
:required="required"
|
|
46
|
+
class="form-control"
|
|
47
|
+
:class="[
|
|
48
|
+
{ 'is-valid': valid === true },
|
|
49
|
+
{ 'is-invalid': error },
|
|
50
|
+
inputClasses
|
|
51
|
+
]"
|
|
52
|
+
/>
|
|
53
|
+
<the-mask
|
|
54
|
+
v-else
|
|
55
|
+
class="form-control"
|
|
56
|
+
v-on="listeners"
|
|
57
|
+
v-bind="$attrs"
|
|
58
|
+
type="text"
|
|
59
|
+
:required="required"
|
|
60
|
+
:mask="mask"
|
|
61
|
+
:class="[
|
|
62
|
+
{ 'is-valid': valid === true },
|
|
63
|
+
{ 'is-invalid': error },
|
|
64
|
+
inputClasses
|
|
65
|
+
]"
|
|
66
|
+
/>
|
|
67
|
+
</slot>
|
|
68
|
+
<slot v-bind="slotData" v-else>
|
|
69
|
+
<textarea
|
|
70
|
+
:value="value"
|
|
71
|
+
v-on="listeners"
|
|
72
|
+
v-bind="$attrs"
|
|
73
|
+
:required="required"
|
|
74
|
+
class="form-control form-control-textarea"
|
|
75
|
+
:valid="!error"
|
|
76
|
+
:class="[
|
|
77
|
+
{ 'is-valid': valid === true },
|
|
78
|
+
{ 'is-invalid': error },
|
|
79
|
+
inputClasses
|
|
80
|
+
]"
|
|
81
|
+
/>
|
|
82
|
+
</slot>
|
|
83
|
+
<div v-if="appendIcon || $slots.append" class="input-group-append">
|
|
84
|
+
<span class="input-group-text">
|
|
85
|
+
<slot name="append">
|
|
86
|
+
<i :class="appendIcon"></i>
|
|
87
|
+
</slot>
|
|
88
|
+
</span>
|
|
89
|
+
</div>
|
|
90
|
+
<slot name="infoBlock"></slot>
|
|
91
|
+
<slot name="error">
|
|
92
|
+
<div
|
|
93
|
+
v-if="error"
|
|
94
|
+
class="invalid-feedback"
|
|
95
|
+
style="display: block;"
|
|
96
|
+
>
|
|
97
|
+
{{ error }}
|
|
98
|
+
</div>
|
|
99
|
+
</slot>
|
|
100
|
+
<slot name="success">
|
|
101
|
+
<div class="valid-feedback" v-if="!error && valid">
|
|
102
|
+
{{ successMessage }}
|
|
103
|
+
</div>
|
|
104
|
+
</slot>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</template>
|
|
108
|
+
<script>
|
|
109
|
+
import { TheMask } from 'vue-the-mask';
|
|
110
|
+
|
|
111
|
+
export default {
|
|
112
|
+
inheritAttrs: false,
|
|
113
|
+
name: 'base-input',
|
|
114
|
+
props: {
|
|
115
|
+
required: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
description: 'Whether input is required (adds an asterix *)'
|
|
118
|
+
},
|
|
119
|
+
group: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
description:
|
|
122
|
+
'Whether input is an input group (manual override in special cases)'
|
|
123
|
+
},
|
|
124
|
+
valid: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
description: 'Whether is valid',
|
|
127
|
+
default: undefined
|
|
128
|
+
},
|
|
129
|
+
alternative: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
description: 'Whether input is of alternative layout'
|
|
132
|
+
},
|
|
133
|
+
label: {
|
|
134
|
+
type: String,
|
|
135
|
+
description: 'Input label (text before input)'
|
|
136
|
+
},
|
|
137
|
+
error: {
|
|
138
|
+
type: String,
|
|
139
|
+
description: 'Input error (below input)'
|
|
140
|
+
},
|
|
141
|
+
successMessage: {
|
|
142
|
+
type: String,
|
|
143
|
+
description: 'Input success message',
|
|
144
|
+
default: 'Looks good!'
|
|
145
|
+
},
|
|
146
|
+
labelClasses: {
|
|
147
|
+
type: String,
|
|
148
|
+
description: 'Input label css classes',
|
|
149
|
+
default: 'form-control-label'
|
|
150
|
+
},
|
|
151
|
+
inputClasses: {
|
|
152
|
+
type: String,
|
|
153
|
+
description: 'Input css classes'
|
|
154
|
+
},
|
|
155
|
+
inputGroupClasses: {
|
|
156
|
+
type: String,
|
|
157
|
+
description: 'Input group css classes'
|
|
158
|
+
},
|
|
159
|
+
value: {
|
|
160
|
+
type: [String, Number],
|
|
161
|
+
description: 'Input value'
|
|
162
|
+
},
|
|
163
|
+
type: {
|
|
164
|
+
type: String,
|
|
165
|
+
description: 'Input type',
|
|
166
|
+
default: 'text'
|
|
167
|
+
},
|
|
168
|
+
appendIcon: {
|
|
169
|
+
type: String,
|
|
170
|
+
description: 'Append icon (right)'
|
|
171
|
+
},
|
|
172
|
+
prependIcon: {
|
|
173
|
+
type: String,
|
|
174
|
+
description: 'Prepend icon (left)'
|
|
175
|
+
},
|
|
176
|
+
mask: {
|
|
177
|
+
type: Array,
|
|
178
|
+
default: () => {
|
|
179
|
+
return [];
|
|
180
|
+
},
|
|
181
|
+
description: 'Masks Array'
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
components: {
|
|
185
|
+
TheMask
|
|
186
|
+
},
|
|
187
|
+
data() {
|
|
188
|
+
return {
|
|
189
|
+
focused: false
|
|
190
|
+
};
|
|
191
|
+
},
|
|
192
|
+
computed: {
|
|
193
|
+
listeners() {
|
|
194
|
+
return {
|
|
195
|
+
...this.$listeners,
|
|
196
|
+
input: this.updateValue,
|
|
197
|
+
focus: this.onFocus,
|
|
198
|
+
blur: this.onBlur
|
|
199
|
+
};
|
|
200
|
+
},
|
|
201
|
+
slotData() {
|
|
202
|
+
return {
|
|
203
|
+
focused: this.focused,
|
|
204
|
+
error: this.error,
|
|
205
|
+
...this.listeners
|
|
206
|
+
};
|
|
207
|
+
},
|
|
208
|
+
hasIcon() {
|
|
209
|
+
const { append, prepend } = this.$slots;
|
|
210
|
+
return (
|
|
211
|
+
append !== undefined ||
|
|
212
|
+
prepend !== undefined ||
|
|
213
|
+
this.appendIcon !== undefined ||
|
|
214
|
+
this.prependIcon !== undefined ||
|
|
215
|
+
this.group
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
methods: {
|
|
220
|
+
updateValue(evt) {
|
|
221
|
+
let value = this.mask.length ? evt : evt.target.value;
|
|
222
|
+
|
|
223
|
+
this.$emit('input', value);
|
|
224
|
+
},
|
|
225
|
+
onFocus(evt) {
|
|
226
|
+
this.focused = true;
|
|
227
|
+
this.$emit('focus', evt);
|
|
228
|
+
},
|
|
229
|
+
onBlur(evt) {
|
|
230
|
+
this.focused = false;
|
|
231
|
+
this.$emit('blur', evt);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
</script>
|
|
236
|
+
<style lang="scss" scoped>
|
|
237
|
+
.form-control-textarea {
|
|
238
|
+
height: 180px;
|
|
239
|
+
resize: none;
|
|
240
|
+
}
|
|
241
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="bg-white content-right tabs
|
|
2
|
+
<div class="bg-white content-right tabs">
|
|
3
3
|
<el-tabs
|
|
4
4
|
:class="active"
|
|
5
5
|
class="mt-3 handle-icon-color"
|
|
@@ -530,11 +530,11 @@ export default {
|
|
|
530
530
|
};
|
|
531
531
|
</script>
|
|
532
532
|
<style>
|
|
533
|
-
.el-tabs__nav-wrap::after {
|
|
533
|
+
.el-tabs__nav-wrap.is-top::after {
|
|
534
534
|
background: #fff !important;
|
|
535
535
|
}
|
|
536
536
|
|
|
537
|
-
.el-tabs__active-bar {
|
|
537
|
+
.el-tabs__active-bar.is-top {
|
|
538
538
|
width: 30px !important;
|
|
539
539
|
height: 4px !important;
|
|
540
540
|
border-radius: 10px 10px 0px 0px;
|
|
@@ -45,13 +45,22 @@
|
|
|
45
45
|
/>
|
|
46
46
|
</validation-provider>
|
|
47
47
|
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
v-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
<validation-provider
|
|
49
|
+
tag="div"
|
|
50
|
+
name="Descrição"
|
|
51
|
+
rules="required"
|
|
52
|
+
v-slot="{ errors }"
|
|
53
|
+
>
|
|
54
|
+
<label for="description">Descrição</label>
|
|
55
|
+
<base-input
|
|
56
|
+
type="text"
|
|
57
|
+
id="description"
|
|
58
|
+
v-model="description"
|
|
59
|
+
placeholder="Descrição"
|
|
60
|
+
:error="errors[0]"
|
|
61
|
+
:valid="errors.length ? true : false"
|
|
62
|
+
/>
|
|
63
|
+
</validation-provider>
|
|
55
64
|
|
|
56
65
|
<validation-provider
|
|
57
66
|
tag="div"
|
|
@@ -96,20 +105,20 @@
|
|
|
96
105
|
rules="required"
|
|
97
106
|
v-slot="{ errors }"
|
|
98
107
|
>
|
|
99
|
-
<label for="city">Cidade</label>
|
|
108
|
+
<label for="city" class="form-control-label">Cidade</label>
|
|
100
109
|
<div class="form-group">
|
|
101
110
|
<el-select
|
|
102
|
-
type="text"
|
|
103
111
|
id="city"
|
|
104
112
|
v-model="city"
|
|
105
113
|
placeholder="Cidade"
|
|
106
114
|
filterable
|
|
107
115
|
remote
|
|
116
|
+
required
|
|
117
|
+
:auto-complete="`new-city-${new Date().getTime()}`"
|
|
118
|
+
:class="{'is-invalid': errors[0]}"
|
|
108
119
|
:remote-method="getCityListFiltered"
|
|
109
|
-
:auto-complete="`new-${city}`"
|
|
110
|
-
:error="errors[0]"
|
|
111
|
-
:valid="errors.length ? true : false"
|
|
112
120
|
:loading="isSelectLoading"
|
|
121
|
+
|
|
113
122
|
>
|
|
114
123
|
<div class="text-center" slot="empty">
|
|
115
124
|
<p class="small mb-2 mt-3">Nenhuma cidade encontrada</p>
|
|
@@ -122,6 +131,11 @@
|
|
|
122
131
|
:label="city.value"
|
|
123
132
|
/>
|
|
124
133
|
</el-select>
|
|
134
|
+
<div
|
|
135
|
+
class="invalid-feedback"
|
|
136
|
+
style="display: block;">
|
|
137
|
+
{{ errors[0] }}
|
|
138
|
+
</div>
|
|
125
139
|
</div>
|
|
126
140
|
</validation-provider>
|
|
127
141
|
|
|
@@ -381,6 +395,12 @@ body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .s
|
|
|
381
395
|
}
|
|
382
396
|
}
|
|
383
397
|
|
|
398
|
+
.is-invalid {
|
|
399
|
+
/deep/ input {
|
|
400
|
+
border-color: #de214b!important;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
384
404
|
.tool {
|
|
385
405
|
position: absolute;
|
|
386
406
|
top: 1rem;
|
|
@@ -1,106 +1,108 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<li class="tab tab-primary" :class="active && 'tab--active'"
|
|
3
|
-
@click="$emit('tab-click')">
|
|
4
|
-
<span class="tab__title" :class="tabTitleClass">{{title}}</span>
|
|
5
|
-
<span v-if="icon > 0" class="tab__icon" :class="tabIconClass">{{icon}}</span>
|
|
6
|
-
</li>
|
|
7
|
-
</template>
|
|
8
|
-
<script>
|
|
9
|
-
export default {
|
|
10
|
-
name: 'teste-tab',
|
|
11
|
-
props: {
|
|
12
|
-
title: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: 'Testes',
|
|
15
|
-
description: 'Title for tab',
|
|
16
|
-
},
|
|
17
|
-
icon: {
|
|
18
|
-
type: Number,
|
|
19
|
-
default: 0,
|
|
20
|
-
description: 'Number for tab icon',
|
|
21
|
-
},
|
|
22
|
-
active: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false,
|
|
25
|
-
description: 'Define if tab is active',
|
|
26
|
-
},
|
|
27
|
-
tabIconClass: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: '',
|
|
30
|
-
description: 'Define css class for tab\'s icon',
|
|
31
|
-
},
|
|
32
|
-
tabTitleClass: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: '',
|
|
35
|
-
description: 'Define css class for tab\'s title',
|
|
36
|
-
},
|
|
37
|
-
link: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: '/',
|
|
40
|
-
description: 'Define nuxt-link link',
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
methods: {
|
|
44
|
-
redirect(link){
|
|
45
|
-
this.$router.push(link);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
</script>
|
|
50
|
-
<style lang="scss" scoped>
|
|
51
|
-
@import "@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss";
|
|
52
|
-
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@media screen and (min-width: 992px){
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<li class="custom__tab tab tab-primary" :class="active && 'tab--active'"
|
|
3
|
+
@click="$emit('tab-click')">
|
|
4
|
+
<span class="tab__title" :class="tabTitleClass">{{title}}</span>
|
|
5
|
+
<span v-if="icon > 0" class="tab__icon" :class="tabIconClass">{{icon}}</span>
|
|
6
|
+
</li>
|
|
7
|
+
</template>
|
|
8
|
+
<script>
|
|
9
|
+
export default {
|
|
10
|
+
name: 'teste-tab',
|
|
11
|
+
props: {
|
|
12
|
+
title: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: 'Testes',
|
|
15
|
+
description: 'Title for tab',
|
|
16
|
+
},
|
|
17
|
+
icon: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 0,
|
|
20
|
+
description: 'Number for tab icon',
|
|
21
|
+
},
|
|
22
|
+
active: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false,
|
|
25
|
+
description: 'Define if tab is active',
|
|
26
|
+
},
|
|
27
|
+
tabIconClass: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: '',
|
|
30
|
+
description: 'Define css class for tab\'s icon',
|
|
31
|
+
},
|
|
32
|
+
tabTitleClass: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: '',
|
|
35
|
+
description: 'Define css class for tab\'s title',
|
|
36
|
+
},
|
|
37
|
+
link: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: '/',
|
|
40
|
+
description: 'Define nuxt-link link',
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
redirect(link){
|
|
45
|
+
this.$router.push(link);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
</script>
|
|
50
|
+
<style lang="scss" scoped>
|
|
51
|
+
@import "@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss";
|
|
52
|
+
|
|
53
|
+
.custom__tab {
|
|
54
|
+
&.tab {
|
|
55
|
+
position: relative;
|
|
56
|
+
padding: .75rem 2rem;
|
|
57
|
+
margin: 0 1rem;
|
|
58
|
+
|
|
59
|
+
&:hover {
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
.tab__title, .tab__icon {
|
|
62
|
+
color: $primary;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&__title {
|
|
67
|
+
color: #3C4858;
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&__icon {
|
|
72
|
+
color: #ffffff;
|
|
73
|
+
border-radius: 50% !important;
|
|
74
|
+
background-color: #3C4858;;
|
|
75
|
+
padding: 0 .4rem;
|
|
76
|
+
font-weight: bold;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@media screen and (min-width: 992px){
|
|
80
|
+
&.tab{
|
|
81
|
+
padding: .75 2rem;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.tab--active {
|
|
86
|
+
.tab__title {
|
|
87
|
+
color:$primary;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.tab__icon {
|
|
91
|
+
background-color: $primary;
|
|
92
|
+
color: #FFF
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.tab--active::after {
|
|
97
|
+
content:'';
|
|
98
|
+
position:absolute;
|
|
99
|
+
bottom:0;
|
|
100
|
+
left:0;
|
|
101
|
+
right:0;
|
|
102
|
+
background: $primary;
|
|
103
|
+
height: 5px;
|
|
104
|
+
border-radius:5px 5px 0px 0px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
</style>
|