UNPKG

zl-arco-comp

Version:

install ``` npm install zl-arco-comp ```

888 lines (887 loc) 29.8 kB
import { resolveComponent as b, createBlock as w, openBlock as m, withCtx as u, createVNode as C, renderSlot as k, computed as S, defineComponent as O, createElementBlock as I, normalizeStyle as U, unref as L, h as F, resolveDynamicComponent as le, mergeModels as X, useModel as ae, ref as Z, createElementVNode as v, nextTick as me, inject as _e, isRef as se, Fragment as N, renderList as A, createTextVNode as B, toDisplayString as H, useSlots as ee, cloneVNode as he, provide as ge, createCommentVNode as P, onMounted as ie, createSlots as te, mergeProps as M, createApp as ve, onUnmounted as ye, onActivated as be, onDeactivated as xe, resolveDirective as Ce, normalizeClass as ke, withDirectives as Se } from "vue"; import { useStorage as re } from "@vueuse/core"; import { useRoute as ue } from "vue-router"; import { Modal as we } from "@arco-design/web-vue"; const T = (e, n) => { const t = e.__vccOpts || e; for (const [l, a] of n) t[l] = a; return t; }, $e = {}; function ze(e, n) { const t = b("a-layout-header"), l = b("a-layout-sider"), a = b("a-layout-content"), s = b("a-layout"), _ = b("a-layout-footer"); return m(), w(s, { class: "zl-layout" }, { default: u(() => [ C(t, { class: "zl-layout-header" }, { default: u(() => [ k(e.$slots, "header", {}, void 0, !0) ]), _: 3 }), C(s, null, { default: u(() => [ C(l, { class: "zl-layout-sider" }, { default: u(() => [ k(e.$slots, "sider", {}, void 0, !0) ]), _: 3 }), C(a, { class: "zl-layout-content" }, { default: u(() => [ k(e.$slots, "content", {}, void 0, !0) ]), _: 3 }) ]), _: 3 }), C(_, null, { default: u(() => [ k(e.$slots, "footer", {}, void 0, !0) ]), _: 3 }) ]), _: 3 }); } const K = /* @__PURE__ */ T($e, [["render", ze], ["__scopeId", "data-v-4971bcf1"]]); K.install = (e) => { e.component("ZlLayout", K); }; let Q; function Ie(e) { return Q || (Q = S(() => e() ? "10px" : "0px 10px 10px 10px")), { contentBorderRadius: Q }; } const Ve = /* @__PURE__ */ O({ __name: "index", props: { autoBorderRadius: { type: [Boolean, Function], default: !1 }, occupiedHeight: { default: 0 }, isFirst: { type: Function, default: () => !1 } }, setup(e) { const n = e, t = S(() => `calc(100vh - 60px - 32px - 24px - ${n.occupiedHeight}px)`), { contentBorderRadius: l } = Ie(n.isFirst); return (a, s) => (m(), I("div", { class: "zl-content-box", style: U({ "--border": a.autoBorderRadius ? L(l) : "10px", "--height": t.value }) }, [ k(a.$slots, "default", {}, void 0, !0) ], 4)); } }), q = /* @__PURE__ */ T(Ve, [["__scopeId", "data-v-6c88c753"]]); q.install = (e) => { e.component("ZLContentBox", q); }; const Be = { class: "my-icon" }, Ze = /* @__PURE__ */ O({ __name: "index", props: { src: { default: "" }, icon: { default: "" }, size: { default: "12px" }, style: {} }, setup(e) { const n = e, t = S(() => n.src.includes("http://") || n.src.includes("https://") ? F("img", { src: n.src, style: { width: n.size, height: n.size, fontSize: n.size, ...n.style } }) : n.icon); return (l, a) => (m(), I("div", Be, [ (m(), w(le(t.value))) ])); } }), R = /* @__PURE__ */ T(Ze, [["__scopeId", "data-v-8c01a026"]]), Te = /* @__PURE__ */ O({ __name: "index", props: /* @__PURE__ */ X({ trigger: { default: "click" }, position: { default: "bottom" }, duration: { default: 0.5 }, disabled: { type: Boolean }, popupContainer: {}, popupOffset: { default: 0 } }, { modelValue: {}, modelModifiers: {} }), emits: ["update:modelValue"], setup(e) { const n = e, t = ae(e, "modelValue"), l = Z(), a = Z(!1), s = S({ get() { return typeof t !== void 0 ? !!t.value : a.value; }, set(h) { h ? i() : f(); } }), _ = () => { me(() => { const { height: h } = l.value.getBoundingClientRect(); l.value.style.height = "0px", l.value.getBoundingClientRect(), l.value.style.height = `${h}px`, l.value.style.transition = `height ${n.duration}s`; }); }, f = () => { l.value.style.height = "0px", g(/* @__PURE__ */ new Date()); }, i = () => { t.value = !0, a.value = !0, _(); }, g = (h) => { requestAnimationFrame(() => { if ((/* @__PURE__ */ new Date()).getTime() - h.getTime() >= n.duration * 1e3) { t.value = !1, a.value = !1; return; } return g(h); }); }; return (h, p) => { const x = b("a-trigger"); return m(), w(x, { "popup-visible": s.value, "onUpdate:popupVisible": p[0] || (p[0] = (V) => s.value = V), trigger: h.trigger, position: h.position, duration: h.duration, "popup-container": h.popupContainer, "popup-offset": h.popupOffset }, { content: u(() => [ v("div", { ref_key: "popupRef", ref: l, class: "content-popup" }, [ k(h.$slots, "content", {}, void 0, !0) ], 512) ]), default: u(() => [ k(h.$slots, "default", {}, void 0, !0) ]), _: 3 }, 8, ["popup-visible", "trigger", "position", "duration", "popup-container", "popup-offset"]); }; } }), D = /* @__PURE__ */ T(Te, [["__scopeId", "data-v-d40be7ec"]]), Le = { class: "custom-column-box" }, Oe = { __name: "SearchItem", setup(e) { const { searchItem: n, modelValue: t } = _e("searchItem"); return (l, a) => { const s = b("a-checkbox"), _ = b("a-checkbox-group"), f = b("a-form-item"); return m(), w(f, { field: "search-item__custom", "hide-label": "" }, { default: u(() => [ C(D, { "popup-translate": [20, 0] }, { content: u(() => [ v("div", Le, [ C(_, { direction: "vertical", modelValue: L(t), "onUpdate:modelValue": a[0] || (a[0] = (i) => se(t) ? t.value = i : null) }, { default: u(() => [ (m(!0), I(N, null, A(L(n), (i, g) => (m(), w(s, { key: i.field, value: i.field, disabled: !g }, { default: u(() => [ B(H(i.label), 1) ]), _: 2 }, 1032, ["value", "disabled"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]) ]), default: u(() => [ a[1] || (a[1] = v("div", { class: "custom-column" }, "筛选项", -1)) ]), _: 1, __: [1] }) ]), _: 1 }); }; } }, De = /* @__PURE__ */ T(Oe, [["__scopeId", "data-v-f194a3bf"]]); function Ae(e, n = "searchItem") { const t = ue(), l = ee(), s = t.name + "-" + n; if (!l.default) return {}; const _ = l.default, i = _()[0]; if (!i.children) return {}; const g = i.children; if (!g.default) return {}; const h = g.default(), p = S(() => h.filter((o) => o.props).map((o) => o.props)), x = re(s, []), V = S({ get: () => { var o; return (o = x.value) != null && o.length ? x.value : e != null && e.length ? e.filter((r) => p.value.some((y) => (y == null ? void 0 : y.field) === r)) : p.value.map((r) => r == null ? void 0 : r.field).filter(Boolean); }, set: (o) => { x.value = o; } }), d = S(() => { const o = he(i); return o.children = { default: () => { const r = h.filter((y) => { var z, E; return (E = V.value) == null ? void 0 : E.includes((z = y == null ? void 0 : y.props) == null ? void 0 : z.field); }); return r.push(F(De)), r; } }, o; }); return { modelValue: V, searchItem: p, newVnode: d }; } const Re = { class: "search-container" }, Ee = { ref: "fromRef", class: "from-container" }, Ne = { class: "btn-container" }, He = { class: "search" }, Me = { class: "reset" }, Ue = { key: 0, class: "line" }, Fe = /* @__PURE__ */ O({ __name: "index", props: { hideLine: { type: Boolean, default: !1 }, formItemWidth: { default: "14vw" }, openSearchItem: { type: Boolean, default: !1 }, defaultItem: { default: () => [] }, localKey: {} }, emits: ["search", "reset"], setup(e, { emit: n }) { const t = e, l = n; let a = null; if (t.openSearchItem) { const { modelValue: f, searchItem: i, newVnode: g } = Ae(t.defaultItem, t.localKey); a = g, ge("searchItem", { searchItem: i, modelValue: f }); } const s = () => { l("search"); }, _ = () => { l("reset"); }; return (f, i) => { const g = b("a-button"); return m(), I("div", { class: "zl-search-box", style: U({ "--formItemWidth": f.formItemWidth }) }, [ v("div", Re, [ v("div", Ee, [ t.openSearchItem ? (m(), w(le(L(a)), { key: 0 })) : k(f.$slots, "default", { key: 1 }, void 0, !0) ], 512), v("div", Ne, [ v("div", He, [ C(g, { type: "primary", onClick: s }, { icon: u(() => [ C(R, { src: "https://static.wi-fi.cn/omc/202506/1a543473cbdd4bfbc258462f854d39076aea3b75.png" }) ]), _: 1 }) ]), v("div", Me, [ C(g, { onClick: _ }, { default: u(() => i[0] || (i[0] = [ B("重置") ])), _: 1, __: [0] }) ]) ]) ]), t.hideLine ? P("", !0) : (m(), I("div", Ue)) ], 4); }; } }), W = /* @__PURE__ */ T(Fe, [["__scopeId", "data-v-8ee10491"]]); W.install = (e) => { e.component("ZlSearchBox", W); }; D.install = (e) => { e.component("ZlTrigger", D); }; R.install = (e) => { e.component("ZlIcon", R); }; const Pe = { class: "select-footer" }, Ke = { class: "select-footer" }, qe = /* @__PURE__ */ O({ __name: "index", props: /* @__PURE__ */ X({ options: {}, maxTagCount: { default: 1 }, fieldNames: { default: () => ({ label: "label", value: "value" }) }, placeholder: { default: "请选择" }, multiple: { type: Boolean, default: !1 }, disabled: { type: Boolean, default: !1 }, hideClean: { type: Boolean, default: !1 }, allowCreate: { type: Boolean, default: !1 }, virtualListProps: { default: () => ({ height: 200 }) }, loading: { type: Boolean, default: void 0 }, formatLabel: { type: Function, default: void 0 } }, { modelValue: {}, modelModifiers: {} }), emits: /* @__PURE__ */ X(["change", "input-value-change"], ["update:modelValue"]), setup(e, { emit: n }) { const t = e, l = ae(e, "modelValue"), a = S({ get: () => { var d; return t.multiple ? Array.isArray(l.value) && ((d = l.value) != null && d.length) ? l.value : [] : l.value ? l.value : ""; }, set(d) { l.value = d; } }); let s = !0; const _ = S(() => { var d; return t.loading !== void 0 ? t.loading : (d = t.options) != null && d.length ? !1 : s; }), f = Z(""), i = n; ie(() => { setTimeout(() => s = !1, 15 * 1e3); }); const g = () => { const o = t.options.filter((r) => r[t.fieldNames.label].includes(f.value)).map((r) => r[t.fieldNames.value]); a.value = Array.from(/* @__PURE__ */ new Set([...Array.isArray(a.value) ? a.value : [], ...o])), i("change", o), f.value = ""; }, h = (d) => { i("change", d); }, p = (d) => { i("input-value-change", d); }, x = () => { f.value = ""; }, V = (d) => { const o = d[t.fieldNames.label] || ""; return (o == null ? void 0 : o.length) > 10 ? `${o.slice(0, 10)}...` : o; }; return (d, o) => { const r = b("a-button"), y = b("a-select"); return m(), w(y, { modelValue: a.value, "onUpdate:modelValue": o[0] || (o[0] = (z) => a.value = z), "input-value": f.value, "onUpdate:inputValue": o[1] || (o[1] = (z) => f.value = z), loading: _.value, "allow-search": d.multiple ? { retainInputValue: !0 } : !0, options: d.options, "filter-option": !0, placeholder: d.placeholder, multiple: d.multiple, disabled: d.disabled, "field-names": d.fieldNames, "allow-clear": !d.hideClean || !d.disabled, "allow-create": d.allowCreate, "max-tag-count": d.maxTagCount, "virtual-list-props": t.virtualListProps, "format-label": d.formatLabel ? d.formatLabel : V, onChange: h, onInputValueChange: p }, te({ _: 2 }, [ t.multiple && f.value ? { name: "footer", fn: u(() => [ v("div", Pe, [ C(r, { type: "text", size: "mini", onClick: g }, { default: u(() => o[2] || (o[2] = [ B("全选") ])), _: 1, __: [2] }), C(r, { type: "text", size: "mini", onClick: x }, { default: u(() => o[3] || (o[3] = [ B("清除") ])), _: 1, __: [3] }) ]) ]), key: "0" } : void 0, f.value ? { name: "empty", fn: u(() => [ v("div", Ke, [ C(r, { type: "text", size: "mini", onClick: x }, { default: u(() => o[4] || (o[4] = [ B("清除") ])), _: 1, __: [4] }) ]) ]), key: "1" } : void 0 ]), 1032, ["modelValue", "input-value", "loading", "allow-search", "options", "placeholder", "multiple", "disabled", "field-names", "allow-clear", "allow-create", "max-tag-count", "virtual-list-props", "format-label"]); }; } }), Y = /* @__PURE__ */ T(qe, [["__scopeId", "data-v-6a0292e1"]]); Y.install = (e) => { e.component("ZlSelect", Y); }; const We = { class: "zl-dialog" }, Ye = { class: "zl-dialog__content" }, je = { key: 0, class: "zl-dialog__footer" }, Ge = { class: "zl-dialog__footer__custom" }, Je = { class: "zl-dialog__footer__btn" }, Qe = /* @__PURE__ */ O({ __name: "index", props: { visible: { type: Boolean, default: !1 }, title: { default: "" }, width: { default: 800 }, titleAlign: { default: "start" }, hideCustomFooter: { type: Boolean, default: !1 }, maskClosable: { type: Boolean, default: !1 }, onBeforeOk: {} }, emits: ["update:visible", "ok", "cancel"], setup(e, { emit: n }) { const t = e, l = n, a = ee(), s = Z(!1), _ = S(() => { const p = { ...a }; return delete p.default, delete p["custom-footer"], p; }), f = (p) => { p && (l("update:visible", !1), l("ok")), s.value = !1; }, i = () => { if (s.value = !0, !t.onBeforeOk) { l("ok"); return; } const p = t.onBeforeOk(f); h(p) ? p.then(() => f(!0)).catch(() => f(!1)).finally(() => s.value = !1) : typeof p == "boolean" && f(p); }, g = () => { l("cancel"); }, h = (p) => !!p && (typeof p == "object" || typeof p == "function") && typeof p.then == "function"; return (p, x) => { const V = b("a-button"), d = b("a-modal"); return m(), w(d, M({ visible: t.visible, "onUpdate:visible": x[0] || (x[0] = (o) => t.visible = o), width: t.width, closable: !0, footer: !1, title: t.title, "title-align": t.titleAlign, "mask-closable": t.maskClosable, onCancel: x[1] || (x[1] = (o) => f(!0)) }, p.$attrs), te({ default: u(() => [ v("div", We, [ v("div", Ye, [ k(p.$slots, "default", {}, void 0, !0) ]), t.hideCustomFooter ? P("", !0) : (m(), I("div", je, [ v("div", Ge, [ k(p.$slots, "custom-footer", {}, void 0, !0) ]), v("div", Je, [ C(V, { class: "zl-dialog__footer__btn_cancel", onClick: g }, { default: u(() => x[2] || (x[2] = [ B("取消") ])), _: 1, __: [2] }), C(V, { loading: s.value, type: "primary", class: "zl-dialog__footer__btn_confirm", onClick: i }, { default: u(() => x[3] || (x[3] = [ B("确认") ])), _: 1, __: [3] }, 8, ["loading"]) ]) ])) ]) ]), _: 2 }, [ A(_.value, (o, r) => ({ name: r, fn: u((y) => [ k(p.$slots, r, { data: y }, void 0, !0) ]) })) ]), 1040, ["visible", "width", "title", "title-align", "mask-closable"]); }; } }), j = /* @__PURE__ */ T(Qe, [["__scopeId", "data-v-ce703b82"]]); j.install = (e) => { e.component("ZlDialog", j); }; function Xe(e) { e.component("ZlLayout", K), e.component("ZlContentBox", q), e.component("ZlSearchBox", W), e.component("ZlTrigger", D), e.component("ZlTable", G), e.component("ZlIcon", R), e.component("ZlSelect", Y), e.component("ZlDialog", j); } function et(e, n, t) { const l = Z(!0), s = ve(() => F( we, { ...n, visible: l.value, onCancel: () => { l.value = !1; }, onOk: () => { l.value = !1; } }, { ...t, defalut: () => F(e, n) } )); Xe(s); const _ = document.createElement("div"); return s.mount(_), document.body.appendChild(_), { unmount: () => { s.unmount(), _.remove(), document.body.removeChild(_); } }; } const gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: et }, Symbol.toStringTag, { value: "Module" })); function oe(e) { return e && typeof e == "object"; } function tt(e) { return Array.isArray(e); } function vt(e) { return typeof e == "function"; } function ne(e, n = /* @__PURE__ */ new Map()) { const t = {}; if (n.has(e)) return n.get(e); n.set(e, e); for (const l in e) tt(e[l]) ? t[l] = e[l].map((a) => oe(a) ? ne(a, n) : a) : oe(e[l]) ? t[l] = ne(e[l], n) : t[l] = e[l]; return t; } function yt(e) { const n = {}; return Object.keys(e).forEach((t) => { [void 0, null, ""].includes(e[t]) || (n[t] = e[t]); }), n; } function bt() { let e = (/* @__PURE__ */ new Date()).getTime(); return "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, function(n) { let t = (e + Math.random() * 16) % 16 | 0; return e = Math.floor(e / 16), (n === "x" ? t : t & 3 | 8).toString(16); }); } function ot(e, n) { let t; return function(...l) { t && clearTimeout(t), t = setTimeout(() => { e.apply(this, l); }, n); }; } function nt() { const e = Z(0); let n = !1; const t = ot(() => { e.value = lt(); }, 200); return ie(() => { n = !0, window.addEventListener("resize", t); }), ye(() => { window.removeEventListener("resize", t); }), be(() => { n || (n = !0, window.addEventListener("resize", t)), t(); }), xe(() => { n = !1, window.removeEventListener("resize", t); }), t(), { tableHeight: e }; } function lt() { const e = document.querySelector(".zl-content-box"); if (!e) return "100%"; const n = e.querySelector(".zl-search-box"), t = e.querySelector(".header-optional"), l = e.querySelector(".table-header-extend"), a = e.querySelector("thead"), s = window.getComputedStyle(e), _ = +(s == null ? void 0 : s.height.replace("px", "")) - at(s == null ? void 0 : s.padding), f = (n == null ? void 0 : n.offsetHeight) || 0, i = _ - f - ((t == null ? void 0 : t.offsetHeight) || 0) - ((l == null ? void 0 : l.offsetHeight) || 0) - ((a == null ? void 0 : a.offsetHeight) || 0) - 81; return i > 400 ? i : 400; } function at(e) { const t = e.split(" ").map((l) => +l.replace("px", "")); return [1, 2].includes(t == null ? void 0 : t.length) ? t[0] * 2 : [3, 4].includes(t == null ? void 0 : t.length) ? t[0] + t[2] : 0; } function st(e, n, t = "-tableCustomColumns") { if (!n) return { customColumn: Z([]), customColumnData: Z([]) }; const a = ue().name + t, s = re(a, []), _ = S( () => e.filter((i) => !i.hidden).map(it) ); return { customColumn: S( { get: () => { var i; return (i = s.value) != null && i.length ? s.value : e.map((g) => g.key || g.dataIndex); }, set: (i) => { s.value = i; } } ), customColumnData: _ }; } function it(e) { const n = { ...e }; return n.dataIndex && (n.key = n.dataIndex), n; } const rt = { class: "header-optional" }, ut = { class: "table-header-extend" }, ct = { key: 1 }, dt = { class: "operate-btn-box" }, pt = /* @__PURE__ */ O({ __name: "index", props: { columns: { default: () => [] }, data: { default: () => [] }, loading: { type: Boolean, default: !1 }, scroll: { default: void 0 }, noCache: { type: Boolean, default: !0 }, hideOperate: { type: Boolean, default: !1 }, operateWidth: { default: 240 }, page: { default: 1 }, limit: { default: 10 }, total: { default: 0 }, pagination: { default: void 0 }, pageSizeOptions: { default: () => [10, 20, 50, 100, 200] }, tableHeaderSplitLine: { type: Boolean, default: !0 }, customColumnKey: {} }, emits: ["pageChange"], setup(e, { emit: n }) { const t = e, l = n, a = ee(), { tableHeight: s } = nt(), _ = Z(), f = S(() => t.columns.filter((o) => t.noCache ? !o.hidden : !o.hidden && i.value.includes(o.key || o.dataIndex)).map((o) => { const r = { ...o }; return r.key && (r.dataIndex = r.key), r; })), { customColumn: i, customColumnData: g } = st(t.columns, !t.noCache, t.customColumnKey), h = S(() => { var o, r; return { x: ((o = t.scroll) == null ? void 0 : o.x) || t.columns.reduce((y, z) => y + (z.width || 120), t.operateWidth), y: ((r = t.scroll) == null ? void 0 : r.y) || s.value }; }), p = S(() => t.pagination !== void 0 ? t.pagination : { current: t.page || 1, total: t.total || 0, pageSize: t.limit || 10, showTotal: !0, showPageSize: !0, pageSizeOptions: t.pageSizeOptions || [10, 20, 50, 100, 200], size: "small" }), x = S(() => { var r; const o = { ...a }; return delete o.columns, delete o["header-left-optional"], delete o["header-right-optional"], delete o["table-extend"], (r = t.columns) == null || r.forEach((y) => { if (y.custom) { const z = y.key || y.dataIndex; delete o[z]; } }), o; }), V = (o) => { l("pageChange", o, t.limit); }, d = (o) => { l("pageChange", t.page, o); }; return (o, r) => { const y = b("a-space"), z = b("a-checkbox"), E = b("a-checkbox-group"), J = b("a-table-column"), ce = b("a-tooltip"), de = b("a-table"), pe = Ce("ellipsis"); return m(), I("div", { class: ke(["zl-table", { "zl-table-header-split-line": t.tableHeaderSplitLine }]), style: U({ "--table-height": L(s) - 20 + "px" }) }, [ v("div", rt, [ C(y, null, { default: u(() => [ k(o.$slots, "custom-left", {}, void 0, !0) ]), _: 3 }), C(y, null, { default: u(() => [ k(o.$slots, "custom-right", {}, void 0, !0), t.noCache ? P("", !0) : (m(), w(D, { key: 0, "popup-translate": [-35, 0] }, { content: u(() => [ v("div", { class: "custom-column-box", style: U({ maxHeight: L(s) + "px" }) }, [ C(E, { direction: "vertical", modelValue: L(i), "onUpdate:modelValue": r[0] || (r[0] = (c) => se(i) ? i.value = c : null) }, { default: u(() => [ (m(!0), I(N, null, A(L(g), (c, $) => (m(), w(z, { key: c.key, value: c.key, disabled: $ < 2 }, { default: u(() => [ B(H(c.title), 1) ]), _: 2 }, 1032, ["value", "disabled"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ], 4) ]), default: u(() => [ r[1] || (r[1] = v("div", { class: "custom-column" }, "自定义列", -1)) ]), _: 1, __: [1] })) ]), _: 3 }) ]), v("div", ut, [ k(o.$slots, "table-extend", {}, void 0, !0) ]), C(de, M({ ref_key: "tableRef", ref: _, columns: f.value, data: t.data, pagination: p.value, scroll: h.value, loading: o.loading, rowClass: ["zl-table-row"], stripe: "", "column-resizable": "", onPageChange: V, onPageSizeChange: d }, { ...o.$attrs }), te({ columns: u(() => [ k(o.$slots, "columns", {}, () => [ (m(!0), I(N, null, A(f.value, (c) => (m(), I(N, null, [ c.custom ? (m(), w(J, M({ key: 0, ref_for: !0 }, c, { width: c.width || 120, ellipsis: !!c.ellipsis }), { cell: u(({ record: $ }) => [ k(o.$slots, c.dataIndex, { data: $ }, void 0, !0) ]), _: 2 }, 1040, ["width", "ellipsis"])) : (m(), w(J, M({ key: 1, ref_for: !0 }, c, { width: c.width || 100, ellipsis: !!c.ellipsis }), { cell: u(({ record: $ }) => [ c.ellipsis ? (m(), w(ce, { key: 0, position: "left", content: c != null && c.computed ? c.computed($) : $[c.dataIndex] }, { default: u(() => [ Se((m(), I("div", null, [ B(H(c != null && c.computed ? c.computed($) : $[c.dataIndex]), 1) ])), [ [pe, c.ellipsis] ]) ]), _: 2 }, 1032, ["content"])) : (m(), I("div", ct, H(c != null && c.computed ? c.computed($) : $[c.dataIndex]), 1)) ]), _: 2 }, 1040, ["width", "ellipsis"])) ], 64))), 256)), t.hideOperate ? P("", !0) : (m(), w(J, { key: 0, title: "操作", align: "left", fixed: "right", cellStyle: { width: t.operateWidth + "px" } }, { cell: u(({ record: c }) => [ v("div", dt, [ k(o.$slots, "table-operate", { data: c }, void 0, !0) ]) ]), _: 3 }, 8, ["cellStyle"])) ], !0) ]), empty: u(() => [ r[2] || (r[2] = v("div", { class: "empty-container" }, [ v("img", { src: "https://static.wi-fi.cn/omc/202507/2fd4569592c959158357dc30ba24c45f8cdc0841.png", alt: "" }) ], -1)) ]), _: 2 }, [ A(x.value, (c, $) => ({ name: $, fn: u((fe) => [ k(o.$slots, $, { data: fe }, void 0, !0) ]) })) ]), 1040, ["columns", "data", "pagination", "scroll", "loading"]) ], 6); }; } }), G = /* @__PURE__ */ T(pt, [["__scopeId", "data-v-9ad7b719"]]); G.install = (e) => { e.component("ZlTable", G); }; const xt = { install(e) { e.component("ZlLayout", K), e.component("ZlContentBox", q), e.component("ZlSearchBox", W), e.component("ZlTrigger", D), e.component("ZlTable", G), e.component("ZlIcon", R), e.component("ZlSelect", Y), e.component("ZlDialog", j); } }; export { q as ZlContentBox, j as ZlDialog, R as ZlIcon, K as ZlLayout, W as ZlSearchBox, Y as ZlSelect, G as ZlTable, D as ZlTrigger, yt as clean, ot as debounce, ne as deepClone, xt as default, bt as getUUID, tt as isArray, vt as isFunction, oe as isObject, gt as showDialog };