wave-ui 3.4.6 → 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 +13 -11
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +2 -2
- package/src/wave-ui/components/w-input.vue +4 -2
package/dist/wave-ui.es.js
CHANGED
|
@@ -3159,20 +3159,22 @@ const xl = {
|
|
|
3159
3159
|
this.isFocused = !1, this.$emit("blur", e);
|
|
3160
3160
|
},
|
|
3161
3161
|
onFileChange(e) {
|
|
3162
|
-
this.inputFiles = [...e.target.files].map((
|
|
3163
|
-
const [,
|
|
3164
|
-
name:
|
|
3165
|
-
base:
|
|
3166
|
-
extension:
|
|
3167
|
-
type:
|
|
3168
|
-
size:
|
|
3169
|
-
lastModified:
|
|
3162
|
+
this.inputFiles = [...e.target.files].map((l) => {
|
|
3163
|
+
const [, a = "", r = "", i = ""] = l.name.match(/^(.*?)\.([^.]*)$|(.*)/), o = Q({
|
|
3164
|
+
name: l.name,
|
|
3165
|
+
base: a || i,
|
|
3166
|
+
extension: r,
|
|
3167
|
+
type: l.type,
|
|
3168
|
+
size: l.size,
|
|
3169
|
+
lastModified: l.lastModified,
|
|
3170
3170
|
preview: null,
|
|
3171
3171
|
progress: 0,
|
|
3172
|
-
file:
|
|
3172
|
+
file: l
|
|
3173
3173
|
});
|
|
3174
|
-
return this.readFile(
|
|
3175
|
-
})
|
|
3174
|
+
return this.readFile(l, o), o;
|
|
3175
|
+
});
|
|
3176
|
+
const t = this.multiple ? this.inputFiles : this.inputFiles[0];
|
|
3177
|
+
this.$emit("update:modelValue", t), this.$emit("input", t);
|
|
3176
3178
|
},
|
|
3177
3179
|
readFile(e, t) {
|
|
3178
3180
|
const l = new FileReader(), a = typeof this.preview == "string", r = e.type && e.type.startsWith("image/");
|