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.
@@ -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((t) => {
3163
- const [, l = "", a = "", r = ""] = t.name.match(/^(.*?)\.([^.]*)$|(.*)/), i = Q({
3164
- name: t.name,
3165
- base: l || r,
3166
- extension: a,
3167
- type: t.type,
3168
- size: t.size,
3169
- lastModified: t.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: t
3172
+ file: l
3173
3173
  });
3174
- return this.readFile(t, i), i;
3175
- }), this.$emit("update:modelValue", this.inputFiles), this.$emit("input", this.inputFiles);
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/");