@burh/nuxt-core 1.0.462 → 1.0.464
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.
|
@@ -35,36 +35,55 @@
|
|
|
35
35
|
</span>
|
|
36
36
|
</div>
|
|
37
37
|
<slot v-bind="slotData" v-if="type !== 'textarea'">
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
38
|
+
<template v-if="type === 'money'">
|
|
39
|
+
<input
|
|
40
|
+
:value="value"
|
|
41
|
+
:type="type"
|
|
42
|
+
v-on="listeners"
|
|
43
|
+
v-bind="$attrs"
|
|
44
|
+
v-money="money"
|
|
45
|
+
:valid="!error"
|
|
46
|
+
:required="required"
|
|
47
|
+
class="form-control"
|
|
48
|
+
:class="[
|
|
49
|
+
{ 'is-valid': valid === true },
|
|
50
|
+
{ 'is-invalid': error },
|
|
51
|
+
inputClasses
|
|
52
|
+
]"
|
|
53
|
+
/>
|
|
54
|
+
</template>
|
|
55
|
+
<template v-else>
|
|
56
|
+
<input
|
|
57
|
+
v-if="!mask.length"
|
|
58
|
+
:value="value"
|
|
59
|
+
:type="type"
|
|
60
|
+
v-on="listeners"
|
|
61
|
+
v-bind="$attrs"
|
|
62
|
+
:valid="!error"
|
|
63
|
+
:required="required"
|
|
64
|
+
class="form-control"
|
|
65
|
+
:class="[
|
|
66
|
+
{ 'is-valid': valid === true },
|
|
67
|
+
{ 'is-invalid': error },
|
|
68
|
+
inputClasses
|
|
69
|
+
]"
|
|
70
|
+
/>
|
|
71
|
+
<the-mask
|
|
72
|
+
v-else
|
|
73
|
+
class="form-control"
|
|
74
|
+
v-on="listeners"
|
|
75
|
+
v-bind="$attrs"
|
|
76
|
+
:value="value"
|
|
77
|
+
:type="type"
|
|
78
|
+
:required="required"
|
|
79
|
+
:mask="mask"
|
|
80
|
+
:class="[
|
|
81
|
+
{ 'is-valid': valid === true },
|
|
82
|
+
{ 'is-invalid': error },
|
|
83
|
+
inputClasses
|
|
84
|
+
]"
|
|
85
|
+
/>
|
|
86
|
+
</template>
|
|
68
87
|
</slot>
|
|
69
88
|
<slot v-bind="slotData" v-else>
|
|
70
89
|
<textarea
|
|
@@ -108,10 +127,12 @@
|
|
|
108
127
|
</template>
|
|
109
128
|
<script>
|
|
110
129
|
import { TheMask } from 'vue-the-mask';
|
|
130
|
+
import { VMoney } from 'v-money';
|
|
111
131
|
|
|
112
132
|
export default {
|
|
113
133
|
inheritAttrs: false,
|
|
114
134
|
name: 'base-input',
|
|
135
|
+
directives: { money: VMoney },
|
|
115
136
|
props: {
|
|
116
137
|
required: {
|
|
117
138
|
type: Boolean,
|
|
@@ -180,14 +201,22 @@ export default {
|
|
|
180
201
|
return [];
|
|
181
202
|
},
|
|
182
203
|
description: 'Masks Array'
|
|
183
|
-
}
|
|
204
|
+
},
|
|
184
205
|
},
|
|
185
206
|
components: {
|
|
186
207
|
TheMask
|
|
187
208
|
},
|
|
188
209
|
data() {
|
|
189
210
|
return {
|
|
190
|
-
focused: false
|
|
211
|
+
focused: false,
|
|
212
|
+
money: {
|
|
213
|
+
type: Object,
|
|
214
|
+
decimal: ',',
|
|
215
|
+
thousands: '.',
|
|
216
|
+
prefix: 'R$ ',
|
|
217
|
+
suffix: '',
|
|
218
|
+
precision: 0,
|
|
219
|
+
}
|
|
191
220
|
};
|
|
192
221
|
},
|
|
193
222
|
computed: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burh/nuxt-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.464",
|
|
4
4
|
"description": "Design System and Components.",
|
|
5
5
|
"author": "Burh",
|
|
6
6
|
"scripts": {
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"sticky-js": "^1.2.0",
|
|
68
68
|
"sweetalert2": "^8.11.6",
|
|
69
69
|
"v-click-outside": "^3.1.2",
|
|
70
|
+
"v-money": "^0.8.1",
|
|
70
71
|
"v-owl-carousel": "^1.0.8",
|
|
71
72
|
"v-resize": "^0.1.1",
|
|
72
73
|
"vee-validate": "^2.2.8",
|