@burh/nuxt-core 1.0.504 → 1.0.505

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.
@@ -52,6 +52,22 @@
52
52
  ]"
53
53
  />
54
54
  </template>
55
+ <template v-if="type === 'date'">
56
+ <el-date-picker
57
+ :value="value"
58
+ :type="type"
59
+ v-on="listeners"
60
+ v-bind="$attrs"
61
+ format="dd/MM/yyyy"
62
+ value-format="dd-MM-yyyy"
63
+ class="w-100 mb-2"
64
+ :class="[
65
+ { 'is-valid': valid === true },
66
+ { 'is-invalid': error },
67
+ inputClasses
68
+ ]"
69
+ />
70
+ </template>
55
71
  <template v-else>
56
72
  <input
57
73
  v-if="!mask.length"
@@ -126,8 +142,14 @@
126
142
  </div>
127
143
  </template>
128
144
  <script>
145
+ import lang from 'element-ui/lib/locale/lang/pt-br';
146
+ import locale from 'element-ui/lib/locale';
147
+
148
+ locale.use(lang);
149
+
129
150
  import { TheMask } from 'vue-the-mask';
130
151
  import { VMoney } from 'v-money';
152
+ import { DatePicker } from 'element-ui';
131
153
 
132
154
  export default {
133
155
  inheritAttrs: false,
@@ -204,7 +226,8 @@ export default {
204
226
  },
205
227
  },
206
228
  components: {
207
- TheMask
229
+ TheMask,
230
+ [DatePicker.name]: DatePicker
208
231
  },
209
232
  data() {
210
233
  return {
@@ -247,7 +270,7 @@ export default {
247
270
  },
248
271
  methods: {
249
272
  updateValue(evt) {
250
- let value = this.mask.length ? evt : evt.target.value;
273
+ let value = this.mask.length ? evt : this.type !== 'date' ? evt.target.value : evt;
251
274
 
252
275
  this.$emit('input', value);
253
276
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.504",
3
+ "version": "1.0.505",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {
@@ -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
  */