@extclp/vexip-ui
Version:
A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good
65 lines (64 loc) • 1.68 kB
JavaScript
var a = Object.defineProperty;
var i = (s, e, o) => e in s ? a(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
var t = (s, e, o) => i(s, typeof e != "symbol" ? e + "" : e, o);
import { nextTick as r } from "vue";
import "../../../node_modules/.pnpm/vitest@3.1.4_@types_node@22_c1525d143c1b63f33ee8a9bfbcad2df0/node_modules/vitest/dist/index.mjs";
import { v as n } from "../../../node_modules/.pnpm/vitest@3.1.4_@types_node@22_c1525d143c1b63f33ee8a9bfbcad2df0/node_modules/vitest/dist/chunks/vi.ClIskdbk.mjs";
const l = (s, e) => {
n.spyOn(s, "files", "get").mockReturnValue(e);
}, g = (s) => class {
constructor() {
t(this, "status", 0);
t(this, "withCredentials", !1);
t(this, "responseText", '{"success": true}');
t(this, "response", "success");
t(this, "upload", {
onprogress(o) {
return o;
}
});
}
open() {
}
setRequestHeader() {
}
send() {
s === "success" ? this.status = 200 : s === "abort" ? (this.onabort(), this.abort()) : s === "error" && (this.status = 199, this.onerror()), this.onload(), this.upload.onprogress({
loaded: 50,
total: 100
});
}
onload() {
}
onabort() {
}
abort() {
}
onerror() {
}
}, m = async (s, e) => {
l(s.element, e), await s.trigger("change"), await r();
};
class f {
append() {
}
}
class b {
constructor() {
t(this, "result", "");
}
readAsDataURL(e) {
this.result = `data:image/svg+xml;base64,${e.name}`, r(() => {
this.onload();
});
}
onload() {
}
}
export {
b as FileReader,
f as FormData,
g as getXhr,
m as triggerUploadFiles
};
//# sourceMappingURL=mock.mjs.map