@burh/nuxt-core 1.0.504 → 1.0.506
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.
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
</slot>
|
|
35
35
|
</span>
|
|
36
36
|
</div>
|
|
37
|
-
<slot v-bind="slotData"
|
|
37
|
+
<slot v-bind="slotData">
|
|
38
38
|
<template v-if="type === 'money'">
|
|
39
39
|
<input
|
|
40
40
|
:value="value"
|
|
@@ -52,6 +52,40 @@
|
|
|
52
52
|
]"
|
|
53
53
|
/>
|
|
54
54
|
</template>
|
|
55
|
+
|
|
56
|
+
<template v-else-if="type === 'date'">
|
|
57
|
+
<el-date-picker
|
|
58
|
+
:value="value"
|
|
59
|
+
:type="type"
|
|
60
|
+
v-on="listeners"
|
|
61
|
+
v-bind="$attrs"
|
|
62
|
+
format="dd/MM/yyyy"
|
|
63
|
+
value-format="dd-MM-yyyy"
|
|
64
|
+
class="w-100 mb-2"
|
|
65
|
+
:class="[
|
|
66
|
+
{ 'is-valid': valid === true },
|
|
67
|
+
{ 'is-invalid': error },
|
|
68
|
+
inputClasses
|
|
69
|
+
]"
|
|
70
|
+
/>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<template v-else-if="type === 'textarea'">
|
|
74
|
+
<textarea
|
|
75
|
+
:value="value"
|
|
76
|
+
v-on="listeners"
|
|
77
|
+
v-bind="$attrs"
|
|
78
|
+
:required="required"
|
|
79
|
+
class="form-control form-control-textarea"
|
|
80
|
+
:valid="!error"
|
|
81
|
+
:class="[
|
|
82
|
+
{ 'is-valid': valid === true },
|
|
83
|
+
{ 'is-invalid': error },
|
|
84
|
+
inputClasses
|
|
85
|
+
]"
|
|
86
|
+
/>
|
|
87
|
+
</template>
|
|
88
|
+
|
|
55
89
|
<template v-else>
|
|
56
90
|
<input
|
|
57
91
|
v-if="!mask.length"
|
|
@@ -85,21 +119,6 @@
|
|
|
85
119
|
/>
|
|
86
120
|
</template>
|
|
87
121
|
</slot>
|
|
88
|
-
<slot v-bind="slotData" v-else>
|
|
89
|
-
<textarea
|
|
90
|
-
:value="value"
|
|
91
|
-
v-on="listeners"
|
|
92
|
-
v-bind="$attrs"
|
|
93
|
-
:required="required"
|
|
94
|
-
class="form-control form-control-textarea"
|
|
95
|
-
:valid="!error"
|
|
96
|
-
:class="[
|
|
97
|
-
{ 'is-valid': valid === true },
|
|
98
|
-
{ 'is-invalid': error },
|
|
99
|
-
inputClasses
|
|
100
|
-
]"
|
|
101
|
-
/>
|
|
102
|
-
</slot>
|
|
103
122
|
<div v-if="appendIcon || $slots.append" class="input-group-append">
|
|
104
123
|
<span class="input-group-text">
|
|
105
124
|
<slot name="append">
|
|
@@ -126,8 +145,14 @@
|
|
|
126
145
|
</div>
|
|
127
146
|
</template>
|
|
128
147
|
<script>
|
|
148
|
+
import lang from 'element-ui/lib/locale/lang/pt-br';
|
|
149
|
+
import locale from 'element-ui/lib/locale';
|
|
150
|
+
|
|
151
|
+
locale.use(lang);
|
|
152
|
+
|
|
129
153
|
import { TheMask } from 'vue-the-mask';
|
|
130
154
|
import { VMoney } from 'v-money';
|
|
155
|
+
import { DatePicker } from 'element-ui';
|
|
131
156
|
|
|
132
157
|
export default {
|
|
133
158
|
inheritAttrs: false,
|
|
@@ -204,7 +229,8 @@ export default {
|
|
|
204
229
|
},
|
|
205
230
|
},
|
|
206
231
|
components: {
|
|
207
|
-
TheMask
|
|
232
|
+
TheMask,
|
|
233
|
+
[DatePicker.name]: DatePicker
|
|
208
234
|
},
|
|
209
235
|
data() {
|
|
210
236
|
return {
|
|
@@ -247,7 +273,7 @@ export default {
|
|
|
247
273
|
},
|
|
248
274
|
methods: {
|
|
249
275
|
updateValue(evt) {
|
|
250
|
-
let value = this.mask.length ? evt : evt.target.value;
|
|
276
|
+
let value = this.mask.length ? evt : this.type !== 'date' ? evt.target.value : evt;
|
|
251
277
|
|
|
252
278
|
this.$emit('input', value);
|
|
253
279
|
},
|
package/package.json
CHANGED
|
@@ -18,6 +18,11 @@ import ImageWithFallback from '@/components/burh-ds/Img/ImageWithFallback.vue';
|
|
|
18
18
|
import { Input, Tooltip, Popover } from 'element-ui';
|
|
19
19
|
import Vue from 'vue';
|
|
20
20
|
|
|
21
|
+
import lang from 'element-ui/lib/locale/lang/pt-br';
|
|
22
|
+
import locale from 'element-ui/lib/locale';
|
|
23
|
+
|
|
24
|
+
locale.use(lang);
|
|
25
|
+
|
|
21
26
|
/**
|
|
22
27
|
* You can register global components here and use them as a plugin in your main Vue instance
|
|
23
28
|
*/
|