@xzq9537/mzl-ui
Version:
mzl-ui
1,455 lines • 129 kB
JavaScript
import { useSlots as le, computed as P, openBlock as a, createElementBlock as i, normalizeClass as p, normalizeStyle as O, createCommentVNode as z, createElementVNode as o, unref as q, renderSlot as Y, ref as $, createVNode as Q, Transition as ee, withCtx as K, Fragment as j, renderList as W, toDisplayString as M, reactive as ae, withDirectives as J, createTextVNode as te, withModifiers as qe, pushScopeId as ie, popScopeId as ce, onMounted as ne, createBlock as _, vShow as X, render as me, watchEffect as Ke, Teleport as ht, createApp as gt, useCssVars as ue, resolveComponent as ot, TransitionGroup as tt, onBeforeUnmount as yt, getCurrentInstance as ge, inject as st, watch as Ue, nextTick as bt, onUpdated as Xe, resolveDynamicComponent as pt, h as fe, defineComponent as kt, provide as xt, markRaw as Ct, vModelText as St } from "vue";
import { ref as lt } from "@vue/reactivity";
const R = (e, l) => {
const s = e.__vccOpts || e;
for (const [t, n] of l)
s[t] = n;
return s;
}, zt = {
name: "mButton"
}, $t = /* @__PURE__ */ Object.assign(zt, {
props: {
type: {
type: String,
default: "default"
},
disabled: Boolean,
round: Boolean,
size: {
type: String,
default: "default"
},
customColor: {
type: String,
default: ""
},
leftIcon: String,
rightIcon: String,
localing: Boolean
},
setup(e) {
const l = e, s = {
background: l.customColor,
border: l.customColor,
color: "#fff"
}, t = le(), n = P(() => [
l.size == "default" ? "mzl-button" : l.size == "medium" ? "mzl-button-medium" : l.size == "small" ? "mzl-button-small" : l.size == "mini" ? "mzl-button-mini" : "mzl-button",
l.type ? l.disabled ? "" : `mzl-button-${l.type}` : "",
l.disabled ? `mzl-button-${l.type}-disabled` : "",
{
"mzl-button-round": l.round
}
]), d = P(() => [
"iconfont",
l.leftIcon || l.rightIcon,
l.localing && (l.leftIcon == "m-icon-loading1" || l.leftIcon == "m-icon-loading2" || l.leftIcon == "m-icon-loading3" || l.leftIcon == "m-icon-loading4" || l.leftIcon == "m-icon-loading5" || l.leftIcon == "m-icon-loading6" || l.rightIcon == "m-icon-loading1" || l.rightIcon == "m-icon-loading2" || l.rightIcon == "m-icon-loading3" || l.rightIcon == "m-icon-loading4" || l.rightIcon == "m-icon-loading5" || l.rightIcon == "m-icon-loading6") ? "mzl-icon-loading" : ""
]), c = P(() => [
l.customColor == "" ? {} : l.type == "default" ? {} : s
]);
return (r, u) => (a(), i("button", {
class: p(n.value),
style: O(c.value)
}, [
e.leftIcon ? (a(), i("i", {
key: 0,
class: p(d.value)
}, null, 2)) : z("", !0),
o("span", {
style: O({
"margin-left": q(t).default == null ? "0px" : e.leftIcon ? "4px" : "0px",
"margin-right": q(t).default == null ? "0px" : e.rightIcon ? "4px" : "0px"
})
}, [
Y(r.$slots, "default", {}, void 0, !0)
], 4),
e.rightIcon ? (a(), i("i", {
key: 1,
class: p(d.value)
}, null, 2)) : z("", !0)
], 6));
}
}), se = /* @__PURE__ */ R($t, [["__scopeId", "data-v-a1e2c8ab"]]);
se.install = (e) => {
e.component(se.name, se);
};
const wt = ["type", "value", "disabled", "placeholder", "autofocus", "readonly", "form"], It = {
name: "mInput"
}, Tt = /* @__PURE__ */ Object.assign(It, {
props: {
modelValue: String | Number,
disabled: Boolean,
clearable: Boolean,
showPassword: Boolean,
type: String,
size: {
type: String,
default: "default"
},
leftIcon: {
type: String,
default: ""
},
rightIcon: {
type: String,
default: ""
},
placeholder: String,
//当页面加载时 <input> 元素自动获得焦点
autofocus: Boolean,
focusColor: {
type: String,
default: "#0e80eb"
},
readonly: Boolean,
form: String
},
emits: ["update:modelValue", "clear", "focus", "blur", "input", "change"],
setup(e, { emit: l }) {
const s = l, t = e, n = le(), d = $({}), c = $(t.type);
let r = {
width: n.btn ? "auto" : "100%",
float: n.btn ? "left" : "auto",
"border-radius": n.btn ? "4px 0 0 4px" : "4px",
"border-color": "#dcdfe6f6"
};
d.value = r;
const u = (k) => {
r["border-color"] = "#0e80eb", d.value = {
width: n.btn ? "auto" : "100%",
float: n.btn ? "left" : "auto",
"border-radius": n.btn ? "4px 0 0 4px" : "4px",
"border-color": t.focusColor
}, s("focus", k);
}, C = (k) => {
d.value = {
width: n.btn ? "auto" : "100%",
float: n.btn ? "left" : "auto",
"border-radius": n.btn ? "4px 0 0 4px" : "4px"
}, s("blur", k);
}, w = (k) => {
s("update:modelValue", k.target.value), s("input", k.target.value);
}, S = (k) => {
s("change", k);
}, B = (k) => {
s("update:modelValue", ""), s("clear");
}, L = (k) => {
c.value == "text" ? c.value = "password" : c.value = "text", console.log(k);
}, y = P(() => [
t.clearable ? "mzl-input-clearable" : t.size == "default" ? "mzl-input-default" : `mzl-input-${t.size}`,
t.leftIcon != "" ? `mzl-input-left-icon-${t.size}` : t.clearable ? "" : t.rightIcon != "" ? `mzl-input-right-icon-${t.size}` : "",
t.disabled ? "mzl-input-disabled" : "",
t.type == "password" ? t.showPassword ? `mzl-input-password-showpassword-${t.size}` : `mzl-input-password-${t.size}` : ""
]);
return (k, f) => (a(), i("div", {
class: p([`mzl-group-input-${e.size}`]),
style: { "min-width": "auto" }
}, [
o("div", {
class: p(y.value),
style: O([d.value, {}])
}, [
!e.showPassword && e.leftIcon != "" ? (a(), i("i", {
key: 0,
class: p(["left-icon", "iconfont", e.leftIcon])
}, null, 2)) : z("", !0),
o("input", {
type: c.value,
onFocus: u,
onBlur: C,
value: e.modelValue,
onInput: w,
disabled: e.disabled,
onChange: S,
placeholder: e.placeholder,
autofocus: e.autofocus,
readonly: e.readonly,
form: e.form
}, null, 40, wt),
Q(ee, { name: "slide-fade" }, {
default: K(() => [
!e.showPassword && e.clearable && e.modelValue != "" ? (a(), i("i", {
key: 0,
class: "clearable-icon iconfont m-icon-close",
onClick: B
})) : z("", !0)
]),
_: 1
}),
!e.showPassword && e.rightIcon != "" ? (a(), i("i", {
key: 1,
class: p(["right-icon", "iconfont", e.rightIcon])
}, null, 2)) : z("", !0),
e.showPassword ? (a(), i("i", {
key: 2,
class: p(["password-icon", "iconfont m-icon-browse"]),
onClick: f[0] || (f[0] = (N) => L(e.type))
})) : z("", !0)
], 6),
Y(k.$slots, "btn", {}, void 0, !0)
], 2));
}
}), ve = /* @__PURE__ */ R(Tt, [["__scopeId", "data-v-02594370"]]);
ve.install = (e) => {
e.component(ve.name, ve);
};
const Dt = { key: 0 }, Ot = { key: 1 }, Lt = { key: 1 }, Mt = {
name: "mTable"
}, Nt = /* @__PURE__ */ Object.assign(Mt, {
props: {
options: {
type: Object,
default: () => ({
fileds: [],
datas: []
})
},
size: {
type: String,
default: "default"
},
showHeader: {
type: Boolean,
default: !0
},
headStyle: {
type: Object,
default: () => ({})
},
rowStyle: {
type: Object,
default: () => ({})
},
customClass: String
},
setup(e) {
const l = le();
return (s, t) => (a(), i("div", {
class: p([`mzl-table-${e.size}`, e.customClass])
}, [
o("table", null, [
e.showHeader ? (a(), i("thead", Dt, [
o("tr", null, [
(a(!0), i(j, null, W(e.options.fileds, (n, d) => (a(), i("th", {
key: d,
style: O([e.headStyle, { "text-align": n.align }])
}, [
q(l)["head-" + n.field] ? Y(s.$slots, "head-" + n.field, {
key: 0,
scope: n
}, void 0, !0) : (a(), i("div", Ot, M(n.title), 1))
], 4))), 128))
])
])) : z("", !0),
o("tbody", null, [
(a(!0), i(j, null, W(e.options.datas, (n, d) => (a(), i("tr", { key: d }, [
(a(!0), i(j, null, W(e.options.fileds, (c, r) => (a(), i("td", {
key: r,
style: O([e.rowStyle, { width: e.options.fileds[r].width ? e.options.fileds[r].width : "", "text-align": e.options.fileds[r].align }])
}, [
q(l)[e.options.fileds[r].field] ? Y(s.$slots, e.options.fileds[r].field, {
key: 0,
scope: { rowIndex: d, cellIndex: r, row: n }
}, void 0, !0) : (a(), i("div", Lt, M(e.options.datas[d][e.options.fileds[r].field]), 1))
], 4))), 128))
]))), 128))
])
])
], 2));
}
}), be = /* @__PURE__ */ R(Nt, [["__scopeId", "data-v-6a9cd8fd"]]);
be.install = (e) => {
e.component(be.name, be);
};
const Bt = ["readonly", "placeholder", "disabled", "value"], Vt = {
key: 0,
class: "mzl-select-option"
}, Ft = { class: "mzl-select-option-find" }, Et = ["onClick"], jt = {
key: 0,
class: "iconfont m-icon-select-bold"
}, At = {
name: "mSelect"
}, Rt = /* @__PURE__ */ Object.assign(At, {
props: {
modelValue: String | Array,
placeholder: String,
customClass: String,
disabled: Boolean,
searchable: Boolean,
size: {
type: String,
default: "default"
},
width: {
type: String,
default: "260px"
},
height: {
type: String,
default: ""
},
options: {
type: Array,
default: () => []
},
//默认需要显示的label字段
labelFiled: {
type: String,
default: "label"
},
//默认需要显示的value字段
valueFiled: {
type: String,
default: "value"
},
multiple: Boolean
},
emits: ["update:modelValue", "change"],
setup(e, { emit: l }) {
const s = l, t = e;
t.options.forEach((g, h) => {
t.multiple ? (t.modelValue.forEach((m, D) => {
g[t.valueFiled] == m && (g.selected = !0);
}), console.log()) : g.selected = !1;
});
const n = $(-1), d = $(!1), c = $("rotate(0deg)"), r = $(t.options || []), u = $(
t.multiple ? t.modelValue : t.modelValue != "" ? t.options.filter((g) => g[t.valueFiled] == t.modelValue)[0][t.labelFiled] : ""
), C = ae({}), w = P(() => ["select-icon iconfont m-icon-arrow-down"]), S = P(() => {
let g = {};
if (t.height) {
let h = parseInt(t.height) < 25 ? "25px" : t.height;
g.height = h, C.lineHeight = h, C.top = 0, C.height = "100%";
}
return g;
}), B = P(() => [
`mzl-select-${t.size}`,
t.disabled ? `mzl-select-${t.size}-disabled` : ""
]), L = P(() => [
"mzl-select-input-box",
`mzl-select-input-${t.size}`,
t.disabled ? `mzl-select-input-${t.size}-disabled` : ""
]), y = (g) => {
d.value = !1, c.value = "rotate(0deg)";
}, k = (g) => {
u.value = g.target.value, r.value = [], t.options.filter((m) => m[t.labelFiled].indexOf(g.target.value) != -1).forEach((m, D) => {
r.value.push(m);
});
}, f = {
beforeMount(g) {
let h = (m) => {
t.disabled || (t.multiple ? g.contains(m.target) ? d.value || (d.value = !d.value, d.value ? c.value = "rotate(180deg)" : c.value = "rotate(0deg)") : d.value && y() : g.contains(m.target) && m.target.className.indexOf("mzl-select-option-li") == -1 ? d.value || (d.value = !d.value, d.value ? c.value = "rotate(180deg)" : c.value = "rotate(0deg)") : d.value && y());
};
g.handler = h, typeof document < "u" && document.addEventListener("click", h);
},
unmounted(g) {
typeof document < "u" && document.removeEventListener("click", g.handler);
}
};
let N = [], b = [];
const x = (g, h) => {
t.multiple ? g.disabled || (Array.prototype.indexOf = function(m) {
for (var D = 0; D < this.length; D++)
if (this[D] == m)
return D;
return -1;
}, g.selected = !g.selected, g.selected ? (u.value.push(g[t.valueFiled]), N.push(g.label), b.push(h)) : (u.value.splice(u.value.indexOf(g[t.valueFiled]), 1), N.splice(N.indexOf(g.label), 1), b.splice(b.indexOf(h), 1)), s("update:modelValue", u.value), s("change", { lable: N, value: u.value, index: b })) : g.disabled || (n.value = h, u.value = g[t.labelFiled], s("update:modelValue", g[t.valueFiled]), s("change", { lable: g.label, value: g.value, index: h }), y());
};
return (g, h) => J((a(), i("div", {
class: p([B.value, e.customClass]),
style: O([
e.customClass ? {} : { width: parseInt(e.width) < 100 ? "100px" : e.width }
])
}, [
o("div", {
class: p(L.value)
}, [
o("input", {
type: "text",
readonly: !e.searchable,
placeholder: u.value == "" ? e.placeholder : u.value,
style: O([e.customClass ? {} : S.value]),
class: p([u.value == "" ? "mzl-select-input" : "mzl-select-input-value"]),
disabled: e.disabled,
onInput: k,
value: u.value
}, null, 46, Bt),
o("i", {
class: p(w.value),
style: O([{ transform: c.value }, C])
}, null, 6)
], 2),
Q(ee, { name: "slide-fade" }, {
default: K(() => [
d.value ? (a(), i("div", Vt, [
o("div", Ft, [
o("ul", null, [
(a(!0), i(j, null, W(r.value, (m, D) => (a(), i("li", {
class: p(["mzl-select-option-li", {
"mzl-select-active": n.value == D || u.value == m[e.labelFiled] || m.selected,
"mzl-select-disabled": m.disabled
}]),
key: D,
onClick: (A) => x(m, D)
}, [
te(M(m[e.labelFiled]) + " ", 1),
e.multiple && m.selected ? (a(), i("i", jt)) : z("", !0)
], 10, Et))), 128))
])
])
])) : z("", !0)
]),
_: 1
})
], 6)), [
[f]
]);
}
}), pe = /* @__PURE__ */ R(Rt, [["__scopeId", "data-v-0b5d1d31"]]);
pe.install = (e) => {
e.component(pe.name, pe);
};
const Pt = (e) => (ie("data-v-57a79523"), e = e(), ce(), e), Yt = /* @__PURE__ */ Pt(() => /* @__PURE__ */ o("i", { class: "m-icon-arrow-down" }, null, -1)), Wt = {
key: 0,
class: "mzl-dropdown-item"
}, Ht = { class: "mzl-dropdown-item-child" }, qt = ["onClick"], Ut = {
name: "mDropdown"
}, Kt = /* @__PURE__ */ Object.assign(Ut, {
props: {
title: String,
trigger: {
type: String,
default: "hover"
},
options: {
type: Array,
default: () => []
},
size: {
type: String,
default: "default"
},
customClass: String
},
emits: ["change"],
setup(e, { emit: l }) {
const s = e;
le();
const t = $(!1), n = l;
ae({
isOpenStyles: {
height: "0px",
display: "none"
}
});
const d = () => {
s.trigger == "hover" && (t.value = !0);
}, c = () => {
s.trigger == "hover" && (t.value = !1);
}, r = (C, w) => {
n("change", C, w), t.value = !1;
}, u = () => {
s.trigger == "click" && (t.value = !t.value);
};
return (C, w) => (a(), i("div", {
class: p([`mzl-dropdown-${e.size}`, e.customClass]),
onMouseover: d,
onMouseleave: c,
onClick: u
}, [
o("div", {
class: p([`mzl-dropdown-${e.size}-menu`])
}, [
Y(C.$slots, "Img"),
o("span", null, M(e.title), 1),
te(),
Yt
], 2),
Q(ee, { name: "slide-fade" }, {
default: K(() => [
t.value ? (a(), i("div", Wt, [
o("div", Ht, [
o("ul", null, [
(a(!0), i(j, null, W(e.options, (S, B) => (a(), i("li", {
key: B,
onClick: qe((L) => r(S, B), ["stop"])
}, [
o("i", {
class: p(S.icon)
}, null, 2),
te(" " + M(S.label), 1)
], 8, qt))), 128))
])
])
])) : z("", !0)
]),
_: 1
})
], 34));
}
}), ke = /* @__PURE__ */ R(Kt, [["__scopeId", "data-v-57a79523"]]);
ke.install = (e) => {
e.component(ke.name, ke);
};
const Zt = ["onClick"], Gt = {
name: "mRadio"
}, Jt = /* @__PURE__ */ Object.assign(Gt, {
props: {
modelValue: String | Number,
size: {
type: String,
default: "default"
},
options: {
type: Array,
default: () => []
},
labelFiled: {
type: String,
default: "label"
},
valueFiled: {
type: String,
default: "value"
},
customColor: String,
customClass: String,
inline: {
type: Boolean,
default: !0
}
},
emits: ["update:modelValue", "change"],
setup(e, { emit: l }) {
const s = l, t = e, n = lt(t.modelValue || ""), d = (c, r) => {
c.disabled || (n.value = c[t.valueFiled], s("update:modelValue", c[t.valueFiled]), s("change", { value: c[t.valueFiled], index: r }));
};
return lt(0), (c, r) => (a(), i("div", {
class: p([`mzl-radio-${e.size}`, e.customClass])
}, [
(a(!0), i(j, null, W(e.options, (u, C) => (a(), i("label", {
key: C,
class: p([{ "mzl-radio-active": q(n) == u[e.valueFiled] }, u.disabled ? q(n) == u[e.valueFiled] ? "mzl-radio-active-disabled" : "mzl-radio-disabled" : ""]),
onClick: (w) => d(u, C),
style: O({ display: e.inline ? "inline-block" : "table", "margin-bottom": e.inline ? "0" : e.size == "small" ? "8px" : e.size == "mini" ? "6px" : "10px" })
}, [
o("span", {
class: "mzl-radio-round",
style: O({ "border-color": e.customColor == "" || u.disabled || q(n) != u[e.valueFiled] ? "" : e.customColor, background: e.customColor == "" || u.disabled || q(n) != u[e.valueFiled] ? "" : e.customColor })
}, null, 4),
o("span", {
style: O({ color: e.customColor == "" || u.disabled || q(n) != u[e.valueFiled] ? "" : e.customColor })
}, M(u[e.labelFiled]), 5)
], 14, Zt))), 128))
], 2));
}
}), xe = /* @__PURE__ */ R(Jt, [["__scopeId", "data-v-8b7d9a23"]]);
xe.install = (e) => {
e.component(xe.name, xe);
};
const Qt = ["onClick"], Xt = {
name: "mCheckbox"
}, _t = /* @__PURE__ */ Object.assign(Xt, {
props: {
modelValue: {
type: Array,
default: () => []
},
size: {
type: String,
default: "default"
},
options: {
type: Array,
default: () => []
},
labelFiled: {
type: String,
default: "label"
},
valueFiled: {
type: String,
default: "value"
},
inline: {
type: Boolean,
default: !0
},
customColor: String,
customClass: String
},
emits: ["update:modelValue", "change"],
setup(e, { emit: l }) {
const s = l, t = e, n = $(t.options || []);
n.value.forEach((c) => {
c.checked = !1, t.modelValue.forEach((r) => {
c[t.valueFiled] === r && (c.checked = !0);
});
});
const d = (c, r) => {
let u = [];
c.disabled || (c.checked = !c.checked), n.value.forEach((C, w) => {
C.checked && u.push(C[t.valueFiled]);
}), s("update:modelValue", u), s("change", { value: u, index: r });
};
return (c, r) => (a(), i("div", {
class: p([`mzl-checkbox-${e.size}`, e.customClass])
}, [
(a(!0), i(j, null, W(n.value, (u, C) => (a(), i("label", {
key: C,
class: p(["mzl-checkbox-label", [{ "mzl-checkbox-label-active": u.checked }, u.checked ? u.disabled ? "mzl-checkbox-label-active-disabled" : "" : u.disabled ? "mzl-checkbox-label-disabled" : ""]]),
onClick: (w) => d(u, C),
style: O({ display: e.inline ? "inline-block" : "table", "margin-bottom": e.inline ? "0" : e.size == "small" ? "8px" : e.size == "mini" ? "6px" : "10px" })
}, [
o("span", {
class: "mzl-checkbox-selectbox",
style: O({ "border-color": e.customColor == "" || u.disabled ? "" : u.checked ? e.customColor : "", background: e.customColor == "" || u.disabled ? "" : u.checked ? e.customColor : "" })
}, null, 4),
o("span", {
style: O({ color: e.customColor == "" || u.disabled ? "" : u.checked ? e.customColor : "" })
}, M(u[e.labelFiled]), 5)
], 14, Qt))), 128))
], 2));
}
}), Ce = /* @__PURE__ */ R(_t, [["__scopeId", "data-v-c0e358e7"]]);
Ce.install = (e) => {
e.component(Ce.name, Ce);
};
const el = { class: "text" }, tl = {
__name: "index",
props: {
text: {
type: [String, Object],
default: ""
},
type: {
type: String,
default: "info"
},
icon: String,
textColor: String,
bgColor: String,
customClass: String
},
setup(e) {
const l = e, s = ae({
style: {
info: {
icon: l.icon || "m-icon-prompt-filling",
color: "#505050",
backgroundColor: "rgb(229 227 224)",
borderColor: "rgb(229 227 224)"
},
warn: {
icon: l.icon || "m-icon-warning",
color: "#f57b29",
backgroundColor: "rgb(243 233 220)",
borderColor: "rgb(243 233 220)"
},
error: {
icon: l.icon || "m-icon-delete-filling",
color: "#ec3437",
backgroundColor: "rgb(251 228 228)",
borderColor: "rgb(251 228 228)"
},
success: {
icon: l.icon || "m-icon-success",
color: "#09b63d",
backgroundColor: "rgb(223 243 212)",
borderColor: "rgb(223 243 212)"
},
custom: {
icon: l.icon,
color: l.textColor,
backgroundColor: l.bgColor,
borderColor: l.bgColor
}
}
}), t = $(!1), { style: n } = s, d = P(() => typeof l.text == "string");
return ne(() => {
t.value = !0;
}), (c, r) => (a(), _(ee, { name: "slide-fade" }, {
default: K(() => [
J(o("div", {
class: p(["mzl-message", e.customClass]),
style: O(q(n)[e.type])
}, [
d.value ? (a(), i(j, { key: 0 }, [
o("i", {
class: p([q(n)[e.type].icon])
}, null, 2),
o("span", el, M(e.text), 1)
], 64)) : Y(c.$slots, "default", { key: 1 }, void 0, !0)
], 6), [
[X, t.value]
])
]),
_: 3
}));
}
}, ll = /* @__PURE__ */ R(tl, [["__scopeId", "data-v-1b0036e4"]]), al = ({ text: e, type: l, timeout: s, icon: t, textColor: n, bgColor: d, customClass: c }) => {
const r = typeof document < "u" && typeof document.createElement < "u" ? document.createElement("div") : "";
r.setAttribute("class", "mzlui-meassage-container"), typeof document < "u" && document.body.appendChild(r);
let u = null;
const C = Q(ll, { text: e, type: l, timeout: s, icon: t, textColor: n, bgColor: d, customClass: c }, [e]);
me(C, r), clearTimeout(u), u = setTimeout(() => {
me(null, r), typeof document < "u" && document.body.removeChild(r), clearTimeout(u);
}, s || 2500);
}, nl = { class: "mzl-wrapper" }, ol = { class: "mzl-header" }, sl = { class: "mzl-body" }, il = { class: "mzl-footer" }, cl = {
__name: "index",
props: {
title: {
type: String,
default: "提示"
},
text: {
type: String,
default: ""
},
icon: {
type: String,
default: "m-icon-warning"
},
confirmText: {
type: String,
default: "确认"
},
cancelText: {
type: String,
default: "取消"
},
confirmShow: {
type: Boolean,
default: !0
},
cancelShow: {
type: Boolean,
default: !0
},
closeShow: {
type: Boolean,
default: !0
},
customClass: String,
// 确认按钮
confirmCallback: {
type: Function,
default: () => {
}
},
// 取消按钮
cancelCallback: {
type: Function,
default: () => {
}
}
},
setup(e) {
const l = $(!1);
return ne(() => {
l.value = !0;
}), (s, t) => (a(), _(ee, { name: "fade" }, {
default: K(() => [
l.value ? (a(), i("div", {
key: 0,
class: p(["mzl-confirm", e.customClass])
}, [
o("div", nl, [
o("div", ol, [
o("h3", null, M(e.title), 1),
e.closeShow ? (a(), i("a", {
key: 0,
href: "JavaScript:;",
class: "m-icon-close",
onClick: t[0] || (t[0] = (...n) => e.cancelCallback && e.cancelCallback(...n))
})) : z("", !0)
]),
o("div", sl, [
o("i", {
class: p(["icon-warning", e.icon])
}, null, 2),
o("span", null, M(e.text), 1)
]),
o("div", il, [
e.cancelShow ? (a(), _(q(se), {
key: 0,
onClick: e.cancelCallback,
size: "small",
style: { "margin-right": "10px" }
}, {
default: K(() => [
te(M(e.cancelText), 1)
]),
_: 1
}, 8, ["onClick"])) : z("", !0),
e.confirmShow ? (a(), _(q(se), {
key: 1,
onClick: e.confirmCallback,
size: "small",
type: "primary"
}, {
default: K(() => [
te(M(e.confirmText), 1)
]),
_: 1
}, 8, ["onClick"])) : z("", !0)
])
])
], 2)) : z("", !0)
]),
_: 1
}));
}
}, ul = /* @__PURE__ */ R(cl, [["__scopeId", "data-v-784a26b5"]]), it = Q("div", { class: "mzlui-confirm-container" });
me(it, typeof document < "u" ? document.body : "");
const Je = it.el, dl = ({ title: e, text: l, icon: s, confirmText: t, cancelText: n, confirmShow: d, cancelShow: c, closeShow: r, customClass: u }) => (typeof document < "u" && (document.body.style = "overflow:hidden"), new Promise((C, w) => {
const L = Q(ul, { title: e, text: l, icon: s, confirmText: t, cancelText: n, confirmShow: d, cancelShow: c, closeShow: r, customClass: u, confirmCallback: () => {
C(), me(null, Je), typeof document < "u" && (document.body.style = "overflow:initial");
}, cancelCallback: () => {
w(), me(null, Je), typeof document < "u" && (document.body.style = "overflow:initial");
} });
me(L, Je);
})), rl = dl, fl = { class: "mzl-modal-header" }, ml = { key: 1 }, vl = { class: "mzl-modal-content" }, hl = {
name: "mModal"
}, gl = /* @__PURE__ */ Object.assign(hl, {
props: {
title: {
type: String,
default: "标题"
},
modelValue: Boolean,
align: {
type: String,
default: ""
},
scrollLock: {
type: Boolean,
default: !0
},
width: {
type: String,
default: "35%"
},
top: {
type: String,
default: "15%"
},
showClose: {
type: Boolean,
default: !0
},
closeOnModal: {
type: Boolean,
default: !0
},
customClass: String
},
emits: ["update:modelValue", "close"],
setup(e, { emit: l }) {
const s = e, t = l, n = le(), d = () => {
t("close"), t("update:modelValue", !1);
};
ne(() => {
Ke(() => {
s.modelValue ? s.scrollLock && typeof document < "u" && (document.body.style.overflow = "hidden") : typeof document < "u" && (document.body.style.overflow = "initial");
});
});
const c = (r) => {
s.closeOnModal && r.target.className == "mzl-modal-default" && (t("update:modelValue", !1), t("close"));
};
return (r, u) => (a(), _(ht, { to: "body" }, [
Q(ee, { name: "fade" }, {
default: K(() => [
e.modelValue ? (a(), i("div", {
key: 0,
class: p(["mzl-modal-default", e.customClass]),
onClick: u[0] || (u[0] = (C) => c(C))
}, [
o("div", {
class: "mzl-modal-contentbox",
style: O({ width: e.width, top: e.top })
}, [
o("div", fl, [
o("p", {
class: "mzl-modal-title",
style: O({ "text-align": e.align == "center" ? e.align : "" })
}, [
q(n).header ? Y(r.$slots, "header", { key: 0 }, void 0, !0) : (a(), i("span", ml, M(e.title), 1))
], 4),
e.showClose ? (a(), i("i", {
key: 0,
class: "mzl-modal-close m-icon-close",
onClick: d
})) : z("", !0)
]),
o("div", vl, [
Y(r.$slots, "content", {}, void 0, !0)
]),
o("div", {
class: "mzl-modal-footer",
style: O({ "text-align": e.align == "center" ? e.align : "" })
}, [
Y(r.$slots, "footer", {}, void 0, !0)
], 4)
], 4)
], 2)) : z("", !0)
]),
_: 3
})
]));
}
}), Se = /* @__PURE__ */ R(gl, [["__scopeId", "data-v-21be2bf6"]]);
Se.install = (e) => {
e.component(Se.name, Se);
};
const yl = { class: "mzl-drawer-contain-box" }, bl = { key: 2 }, pl = {
key: 3,
class: "mzl-drawer-header-btn"
}, kl = {
key: 1,
class: "mzl-drawer-contain-box-footer"
}, xl = { key: 1 }, Cl = {
name: "mDrawer"
}, Sl = /* @__PURE__ */ Object.assign(Cl, {
props: {
modelValue: Boolean,
title: {
type: String,
default: "标题"
},
width: {
type: String,
default: "30%"
},
height: {
type: String,
default: "40%"
},
direction: {
type: String,
default: "left"
},
closeOnModal: {
type: Boolean,
default: !0
},
showHeader: {
type: Boolean,
default: !0
},
showFooter: {
type: Boolean,
default: !0
},
showClose: {
type: Boolean,
default: !0
},
confirmText: {
type: String,
default: "确定"
},
cancelText: {
type: String,
default: "取消"
},
confirmShow: {
type: Boolean,
default: !0
},
cancelShow: {
type: Boolean,
default: !0
},
customClass: String
},
emits: ["update:modelValue", "close", "confirm", "cancel"],
setup(e, { emit: l }) {
const s = l, t = e, n = le(), d = P(() => [
t.direction == "left" ? { top: 0, left: 0, width: t.width, height: "100%" } : t.direction == "top" ? { top: 0, left: 0, width: "100%", height: t.height } : t.direction == "right" ? { top: 0, right: 0, width: t.width, height: "100%" } : t.direction == "bottom" ? { bottom: 0, left: 0, width: "100%", height: t.height } : {}
]), c = P(() => t.direction == "left" ? "slide-left" : t.direction == "top" ? "slide-top" : t.direction == "right" ? "slide-right" : t.direction == "bottom" ? "slide-bottom" : ""), r = () => {
s("update:modelValue", !1), s("close");
}, u = () => {
s("confirm");
}, C = () => {
s("cancel");
};
Ke(() => {
t.modelValue ? typeof document < "u" && (document.body.style = "overflow:hidden") : typeof document < "u" && (document.body.style = "overflow:initial");
});
const w = (S) => {
t.closeOnModal && S.target.className == "mzl-drawer-pupop" && (s("update:modelValue", !1), s("close"));
};
return (S, B) => (a(), i(j, null, [
Q(ee, { name: "fade-pupop" }, {
default: K(() => [
e.modelValue ? (a(), i("div", {
key: 0,
class: "mzl-drawer-pupop",
onClick: B[0] || (B[0] = (L) => w(L))
})) : z("", !0)
]),
_: 1
}),
Q(ee, { name: c.value }, {
default: K(() => [
e.modelValue ? (a(), i("div", {
key: 0,
class: p(["mzl-drawer-contain", e.customClass]),
style: O(d.value)
}, [
o("div", yl, [
e.showHeader ? (a(), i("div", {
key: 0,
class: "mzl-drawer-contain-box-header",
style: O({ padding: e.showClose ? "0 20px 0 45px" : "0 20px 0 20px" })
}, [
q(n).header ? Y(S.$slots, "header", { key: 0 }, void 0, !0) : z("", !0),
e.showClose ? (a(), i("i", {
key: 1,
class: "m-icon-close",
onClick: r
})) : z("", !0),
q(n).header ? z("", !0) : (a(), i("span", bl, M(e.title), 1)),
q(n).header ? z("", !0) : (a(), i("div", pl, [
e.cancelShow ? (a(), _(q(se), {
key: 0,
size: "small",
style: O({ "margin-right": e.confirmShow ? "10px" : "0" }),
onClick: C
}, {
default: K(() => [
te(M(e.cancelText), 1)
]),
_: 1
}, 8, ["style"])) : z("", !0),
e.confirmShow ? (a(), _(q(se), {
key: 1,
size: "small",
type: "primary",
onClick: u
}, {
default: K(() => [
te(M(e.confirmText), 1)
]),
_: 1
})) : z("", !0)
]))
], 4)) : z("", !0),
o("div", {
class: "mzl-drawer-contain-box-content",
style: O({ height: e.showHeader ? e.showFooter ? "calc(100% - 110px)" : "calc(100% - 55px)" : e.showFooter ? "calc(100% - 55px)" : "100%" })
}, [
Y(S.$slots, "content", {}, void 0, !0)
], 4),
e.showFooter ? (a(), i("div", kl, [
q(n).footer ? Y(S.$slots, "footer", { key: 0 }, void 0, !0) : (a(), i("span", xl, "你,我生命中一个重要的过客,之所以是过客,因为你未曾为我停留!"))
])) : z("", !0)
])
], 6)) : z("", !0)
]),
_: 3
}, 8, ["name"])
], 64));
}
}), ze = /* @__PURE__ */ R(Sl, [["__scopeId", "data-v-12b9d693"]]);
ze.install = (e) => {
e.component(ze.name, ze);
};
const zl = ["src"], $l = { key: 2 }, wl = {
__name: "index",
props: {
obj: Object
},
setup(e) {
return (l, s) => (a(), _(ee, { name: "fade-pupop" }, {
default: K(() => [
e.obj.show ? (a(), i("div", {
key: 0,
class: "mzl-loading",
style: O({ position: e.obj.position, "background-color": e.obj.bgColor })
}, [
o("div", {
style: O({ color: e.obj.textColor }),
class: "mzl-loading-center"
}, [
e.obj.showIcon && e.obj.img == "" ? (a(), i("i", {
key: 0,
class: p(["loading-icon", e.obj.icon])
}, null, 2)) : z("", !0),
e.obj.img != "" ? (a(), i("img", {
key: 1,
src: e.obj.img,
alt: "",
class: "loading-img"
}, null, 8, zl)) : z("", !0),
e.obj.text != "" ? (a(), i("span", $l, M(e.obj.text), 1)) : z("", !0)
], 4)
], 4)) : z("", !0)
]),
_: 1
}));
}
}, Il = /* @__PURE__ */ R(wl, [["__scopeId", "data-v-d3f751a5"]]), H = ae({
show: !1,
text: "加载中...",
icon: "m-icon-loading1",
img: "",
target: "body",
textColor: "#fff",
bgColor: "rgba(0, 0, 0, 0.6)",
showIcon: !0,
position: "fixed",
scrollLock: !0
}), Qe = gt(Il, { obj: H }).mount(typeof document < "u" && typeof document.createElement < "u" ? document.createElement("div") : ""), Tl = {
show(e) {
H.show = !0, e != null ? (H.text = e.text != null ? e.text : H.text, H.target = e.target != null ? e.target : H.target, H.scrollLock = e.scrollLock != null ? e.scrollLock : H.scrollLock, H.icon = e.icon != null && (e.icon == "m-icon-loading1" || e.icon == "m-icon-loading2" || e.icon == "m-icon-loading3" || e.icon == "m-icon-loading4" || e.icon == "m-icon-loading5" || e.icon == "m-icon-loading6") ? e.icon : H.icon, H.textColor = e.textColor != null ? e.textColor : H.textColor, H.bgColor = e.bgColor != null ? e.bgColor : H.bgColor, H.showIcon = e.showIcon != null ? e.showIcon : H.showIcon, H.img = e.img != null ? e.img : H.img, Ke(() => {
e.target != null ? H.scrollLock ? typeof document < "u" && document.querySelector(e.target).classList.add("mzl-loading-parentClass") : setTimeout(() => {
typeof document < "u" && document.querySelector(e.target).classList.remove("mzl-loading-parentClass");
}, 500) : H.scrollLock ? typeof document < "u" && document.body.classList.add("mzl-loading-parentClass") : typeof document < "u" && document.body.classList.remove("mzl-loading-parentClass");
}), e.target != null ? (typeof document < "u" && document.querySelector(e.target).appendChild(Qe.$el), H.position = "absolute") : (typeof document < "u" && document.body.appendChild(Qe.$el), H.position = "fixed")) : typeof document < "u" && document.body.appendChild(Qe.$el);
},
hide() {
H.show = !1, H.target != "body" ? setTimeout(() => {
typeof document < "u" && document.querySelector(H.target).classList.remove("mzl-loading-parentClass");
}, 500) : typeof document < "u" && document.body.classList.remove("mzl-loading-parentClass");
}
}, Dl = Tl, Ol = {
name: "mSwitch"
}, Ll = /* @__PURE__ */ Object.assign(Ol, {
props: {
modelValue: Boolean,
width: {
type: Number,
default: 45
},
closeColor: {
type: String,
default: "#BFBFBF"
},
activeColor: {
type: String,
default: "#0e80eb"
},
closeText: {
type: String,
default: ""
},
activeText: {
type: String,
default: ""
},
textAlign: {
type: String,
default: "left"
},
showTipsText: Boolean,
disabled: Boolean,
customClass: String
},
emits: ["update:modelValue", "change"],
setup(e, { emit: l }) {
const s = l, t = e, n = ae({ left: "2px" }), d = ae({ left: t.width - 20 + "px" }), c = ae({ background: t.closeColor }), r = $("关"), u = $(t.modelValue ? t.activeText : t.closeText), C = $(t.modelValue), w = () => {
t.disabled || (C.value = !C.value, s("update:modelValue", C.value), s("change", C.value));
};
return Ke(() => {
n.left = t.modelValue ? t.width - 20 + "px" : "2px", d.left = t.modelValue ? "6px" : t.width - 20 + "px", c.background = t.modelValue ? t.activeColor : t.closeColor, t.modelValue ? (r.value = "开", u.value = t.activeText) : (r.value = "关", u.value = t.closeText);
}), (S, B) => (a(), i("div", {
class: p(["mzl-switch-default", e.customClass])
}, [
e.textAlign == "left" && e.closeText != "" && e.activeText != "" ? (a(), i("span", {
key: 0,
class: "mzl-switch-left-text",
style: O({ color: e.modelValue ? e.activeColor : e.closeColor })
}, M(u.value), 5)) : z("", !0),
o("div", {
class: p(["mzl-switch-content", { "mzl-switch-disabled": e.disabled }]),
onClick: w,
style: O([c, { width: e.width + "px" }])
}, [
o("span", {
class: "mzl-switch-round",
style: O([n])
}, null, 4),
e.showTipsText ? (a(), i("span", {
key: 0,
class: "mzl-switch-flagtext",
style: O(d)
}, M(r.value), 5)) : z("", !0)
], 6),
e.textAlign == "right" && e.closeText != "" && e.activeText != "" ? (a(), i("span", {
key: 1,
class: "mzl-switch-right-text",
style: O({ color: e.modelValue ? e.activeColor : e.closeColor })
}, M(u.value), 5)) : z("", !0)
], 2));
}
}), $e = /* @__PURE__ */ R(Ll, [["__scopeId", "data-v-487fb406"]]);
$e.install = (e) => {
e.component($e.name, $e);
};
const Ml = {
class: /* @__PURE__ */ p(["mzl-tree-item-box"])
}, Nl = ["data-key"], Bl = { class: "mzl-tree-label" }, Vl = {
key: 0,
class: "mzl-tree-ul-box"
}, Fl = {
__name: "treeItem",
props: {
items: {
type: Object,
default: () => {
}
},
dataKey: String | Number,
index: Number,
icon: {
type: String,
default: "m-icon-arrow-right-filling"
},
defaultOpenNodes: {
type: Array,
default: () => []
},
options: {
type: Object,
default: () => ({})
},
tabIndexs: String | Number,
multiple: Boolean,
defaultSelectNodes: {
type: Array,
default: () => []
}
},
emits: ["nodeClick", "change", "selectClick"],
setup(e, { emit: l }) {
ue((x) => ({
"1eecb2f4": n.value
}));
const s = l, t = e;
t.items.key = t.dataKey;
const n = $("26px"), d = $(0), c = $([]);
var r = function(x) {
var g = "";
const h = function(m) {
m.isOpen && m.children.forEach((D, A) => {
D.children && h(D), g += D.label + ";";
});
};
return h(x), g.split(";");
};
const u = P(() => t.children.items && t.items.children.length), C = (x) => {
x.disabled || (u && x.children && x.children.length && (x.isOpen = !x.isOpen, x.isOpen ? n.value = (r(x).length - 1) * 26 + "px" : setTimeout(() => {
n.value = "26px";
}, 100)), s("nodeClick", x), s("change", x.key));
}, w = (x, g) => {
s("nodeClick", x), s("change", x.key);
}, S = (x, g) => {
for (var h in x) {
if (x[h].key == g)
return [x[h]];
if (x[h].children) {
var m = S(x[h].children, g);
if (m !== void 0)
return m.concat(x[h]);
}
}
}, B = (x, g) => {
x.forEach((h, m) => {
h.isSelected = g, h.children && B(h.children, g);
});
};
let L = 0;
const y = (x) => {
x.forEach((g, h) => {
L += 1, g.isSelected && (d.value += 1), g.children && y(g.children);
});
}, k = (x, g) => {
let h = 0;
x.children.forEach((m, D) => {
m.isSelected && (h += 1);
}), y(g.children), h == x.children.length ? (d.value + 1, x.isSelected = !0, x.semiSelected = !1) : h == 0 ? (x.isSelected = !1, x.semiSelected = !1) : x.semiSelected = !0, d.value == L ? (g.isSelected = !0, g.semiSelected = !1) : d.value == 0 ? (g.isSelected = !1, g.semiSelected = !1) : (g.isSelected = !1, g.semiSelected = !0);
}, f = (x) => (x.forEach((g, h) => {
g.isSelected && c.value.push(g), g.children && f(g.children);
}), c.value), N = (x, g) => {
if (!x.disabled) {
x.isSelected = !x.isSelected, x.semiSelected = !1, c.value = [];
let h = S(t.options, x.key);
x.isSelected ? (x.children && B(x.children, !0), h.length > 1 && (L = d.value = 0, k(h[1], h[h.length - 1]))) : (x.children && B(x.children, !1), h.length > 1 && (L = d.value = 0, k(h[1], h[h.length - 1]))), s("selectClick", x), s("nodeClick", f(t.options));
}
}, b = (x, g) => {
x.forEach((h, m) => {
h.key == g && (h.isSelected = !0), h.children && b(h.children, g);
});
};
return ne(() => {
t.defaultOpenNodes && t.defaultOpenNodes.length && t.defaultOpenNodes.forEach((x, g) => {
S(t.options, x).forEach((h, m) => {
h.isOpen = !0, setTimeout(() => {
h.children && (n.value = (r(h).length - 1) * 26 + "px");
}, 100);
});
}), t.multiple && t.defaultSelectNodes && t.defaultSelectNodes.length && t.defaultSelectNodes.forEach((x, g) => {
b(t.options, x), S(t.options, x).forEach((m, D) => {
m.isOpen = !0, setTimeout(() => {
m.children && (n.value = (r(m).length - 1) * 26 + "px");
}, 100);
});
let h = S(t.options, x);
k(h[1], h[h.length - 1]);
});
}), (x, g) => {
const h = ot("tree-item", !0);
return a(), i("div", Ml, [
o("li", null, [
o("div", {
class: p(["mzl-tree-lable-box", { "label-active": e.tabIndexs === e.items.key, "mzl-tree-lable-disabled": e.items.disabled }]),
onClick: g[1] || (g[1] = qe((m) => C(e.items), ["stop", "prevent"])),
"data-key": e.dataKey,
style: O({ "padding-left": e.index * 15 + "px" })
}, [
o("span", {
class: p([{ rotate: e.icon != "m-icon-arrow-right-filling" ? !1 : e.items.isOpen }, "mzl-tree-lable-span"])
}, [
o("i", {
class: p([{ "m-icon-arrow-right-filling": e.items.children && e.items.children.length }])
}, null, 2)
], 2),
e.multiple ? (a(), i("span", {
key: 0,
class: p(["mzl-tree-label-select-span", { "mzl-tree-label-select-span-active": e.items.isSelected, "mzl-tree-label-select-span-active-1": e.items.semiSelected }]),
onClick: g[0] || (g[0] = qe((m) => N(e.items, e.index), ["stop"]))
}, null, 2)) : z("", !0),
o("span", Bl, M(e.items.label), 1)
], 14, Nl),
Q(ee, { name: "slide-fade" }, {
default: K(() => [
e.items.children && e.items.children.length ? J((a(), i("div", Vl, [
(a(!0), i(j, null, W(e.items.children, (m, D) => (a(), _(h, {
key: D,
items: m,
"data-key": e.dataKey + "-" + D,
defaultOpenNodes: e.defaultOpenNodes,
icon: e.icon,
onNodeClick: g[2] || (g[2] = (A) => w(A, e.items)),
options: e.options,
index: e.index + 1,
tabIndexs: e.tabIndexs,
onSelectClick: g[3] || (g[3] = (A) => s("selectClick", A)),
multiple: e.multiple,
defaultSelectNodes: e.defaultSelectNodes
}, null, 8, ["items", "data-key", "defaultOpenNodes", "icon", "options", "index", "tabIndexs", "multiple", "defaultSelectNodes"]))), 128))
], 512)), [
[X, e.items.isOpen]
]) : z("", !0)
]),
_: 1
})
])
]);
};
}
}, El = /* @__PURE__ */ R(Fl, [["__scopeId", "data-v-466afd86"]]), jl = {
name: "mTree"
}, we = /* @__PURE__ */ Object.assign(jl, {
props: {
options: {
type: Object,
default: () => ({})
},
icon: String,
defaultOpenNodes: Array,
customClass: String,
multiple: Boolean,
defaultSelectNodes: {
type: Array,
default: () => []
}
},
emits: ["nodeClick", "selectClick"],
setup(e, { emit: l }) {
const s = l;
e.options.forEach((r, u) => {
r.key = u.toString();
});
const n = $(""), d = (r) => {
n.value = r;
}, c = (r) => {
s("nodeClick", r);
};
return (r, u) => (a(), i("div", {
class: p(["mzl-tree-content-box", e.customClass])
}, [
(a(!0), i(j, null, W(e.options, (C, w) => (a(), _(El, {
key: w,
items: C,
"data-key": w,
icon: e.icon,
defaultOpenNodes: e.defaultOpenNodes,
onNodeClick: u[0] || (u[0] = (S) => c(S)),
options: e.options,
index: 0,
onChange: u[1] || (u[1] = (S) => d(S)),
tabIndexs: n.value,
onSelectClick: u[2] || (u[2] = (S) => s("selectClick", S)),
multiple: e.multiple,
defaultSelectNodes: e.defaultSelectNodes
}, null, 8, ["items", "data-key", "icon", "defaultOpenNodes", "options", "tabIndexs", "multiple", "defaultSelectNodes"]))), 128))
], 2));
}
});
we.install = (e) => {
e.component(we.name, we);
};
const Al = (e) => (ie("data-v-c77b173f"), e = e(), ce(), e), Rl = ["accept", "multiple"], Pl = { class: "mzl-preview-img-box" }, Yl = { class: "mzl-previre-img-actions" }, Wl = ["src"], Hl = { class: "customArea" }, ql = ["onClick"], Ul = { class: "mzl-optfile-text-pos" }, Kl = { key: 0 }, Zl = {
key: 0,
class: "mzl-optfile-filelist"
}, Gl = /* @__PURE__ */ Al(() => /* @__PURE__ */ o("i", { class: "file-icon m-icon-file" }, null, -1)), Jl = ["onClick"], Ql = {
name: "mOptfile"
}, Xl = /* @__PURE__ */ Object.assign(Ql, {
props: {
accept: String,
multiple: Boolean,
type: String,
label: {
type: String,
default: ""
},
size: {
type: String,
default: ""
},
targetType: {
type: String,
default: "btn"
},
icon: {
type: String,
default: "m-icon-add-bold"
},
fileList: {
type: Array,
default: () => []
},
drop: Boolean,
customClass: String,
showFileList: Boolean,
imgListShow: Boolean
},
emits: ["change", "update:fileList", "beforeChange"],
setup(e, { emit: l }) {
const s = l, t = e, n = le(), d = typeof window < "u" ? window.URL || window.webkitURL : "", c = ae([]), r = ae(t.fileList || []);
$("");
const u = $(t.label), C = $(!1), w = $(null), S = $(null), B = () => {
s("beforeChange"), console.log(w), w.value.click();
}, L = (k) => {
c.unshift(...k.target.files), r.unshift(...k.target.files), c.forEach((f, N) => {
f.preImgUrl = d.createObjectURL(f);
}), s("change", c), s("update:fileList", c);
}, y = (k) => {
c.splice(k, 1), r.splice(k, 1), s("update:fileList", c);
};
return ne(() => {
if (t.drop && t.targetType == "box") {
let k = S.value;
k.addEventListener("drop", (f) => {
f.stopPropagation(), f.preventDefault(), c.unshift(...f.dataTransfer.files), r.unshift(...f.dataTransfer.fi