wave-ui 3.4.5 → 3.4.7
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.
- package/dist/wave-ui.cjs.js +1 -1
- package/dist/wave-ui.es.js +15 -13
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +2 -2
- package/src/wave-ui/components/w-input.vue +10 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wave-ui",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.7",
|
|
4
4
|
"description": "An emerging UI framework for Vue.js (2 & 3) with only the bright side. :sunny:",
|
|
5
5
|
"author": "Antoni Andre <antoniandre.web@gmail.com>",
|
|
6
6
|
"homepage": "https://antoniandre.github.io/wave-ui",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@babel/eslint-parser": "^7.22.10",
|
|
55
55
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
56
56
|
"@faker-js/faker": "^7.6.0",
|
|
57
|
-
"@mdi/font": "^
|
|
57
|
+
"@mdi/font": "^6.9.96",
|
|
58
58
|
"@vitejs/plugin-vue": "^3.2.0",
|
|
59
59
|
"@vue/compiler-sfc": "3.2.45",
|
|
60
60
|
"autoprefixer": "^10.4.15",
|
|
@@ -186,6 +186,8 @@ export default {
|
|
|
186
186
|
// Keep the `class` attribute bound to the wrapper and not the input.
|
|
187
187
|
// eslint-disable-next-line no-unused-vars
|
|
188
188
|
const { class: classes, ...htmlAttrs } = this.$attrs
|
|
189
|
+
// Resets the input[type=file] the native HTML way.
|
|
190
|
+
if (this.type === 'file' && !this.inputFiles.length) htmlAttrs.value = null
|
|
189
191
|
return htmlAttrs
|
|
190
192
|
},
|
|
191
193
|
|
|
@@ -320,8 +322,10 @@ export default {
|
|
|
320
322
|
|
|
321
323
|
return file
|
|
322
324
|
})
|
|
323
|
-
|
|
324
|
-
this
|
|
325
|
+
|
|
326
|
+
const filesPayload = this.multiple ? this.inputFiles : this.inputFiles[0]
|
|
327
|
+
this.$emit('update:modelValue', filesPayload)
|
|
328
|
+
this.$emit('input', filesPayload)
|
|
325
329
|
},
|
|
326
330
|
|
|
327
331
|
// For file input.
|
|
@@ -361,7 +365,10 @@ export default {
|
|
|
361
365
|
modelValue (value) {
|
|
362
366
|
this.inputValue = value
|
|
363
367
|
// When clearing the field value, also reset the isAutofilled var for the CSS class.
|
|
364
|
-
if (!value && value !== 0)
|
|
368
|
+
if (!value && value !== 0) {
|
|
369
|
+
this.isAutofilled = false
|
|
370
|
+
this.inputFiles = []
|
|
371
|
+
}
|
|
365
372
|
}
|
|
366
373
|
}
|
|
367
374
|
}
|