oeos-components 0.2.20 → 0.2.22

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.
@@ -0,0 +1,25 @@
1
+ import { defineComponent as p, useSlots as y, useAttrs as b, ref as c, computed as S, resolveComponent as _, createBlock as x, openBlock as d, mergeProps as f, withCtx as C, createElementBlock as $, createCommentVNode as A, renderSlot as i, unref as B, createElementVNode as N, createTextVNode as W, toDisplayString as g } from "vue";
2
+ import { p as V, _ as j, w as E } from "./index-oKZkmdJE.js";
3
+ const O = p({ name: "OTooltip" }), I = E(j(p({ ...O, props: { width: { type: String, default: "100%" }, showSlot: { type: Boolean, default: !0 }, effect: { default: "dark" }, tooltipAttrs: { type: Object, default: () => ({}) } }, emits: ["click"], setup(e, { emit: u }) {
4
+ const m = y(), o = b(), a = e, l = c(), n = c(!1), k = S(() => o.disabled ? o.disabled : !o.content || !m.default && n.value);
5
+ function h() {
6
+ if (!a.showSlot)
7
+ return;
8
+ const t = l.value;
9
+ if (!t)
10
+ return;
11
+ const r = t.parentNode.offsetWidth, s = t.offsetWidth;
12
+ n.value = s <= r;
13
+ }
14
+ const v = u;
15
+ function w() {
16
+ v("click");
17
+ }
18
+ return (t, r) => {
19
+ const s = _("el-tooltip");
20
+ return d(), x(s, f({ class: "tooltip", disabled: k.value, effect: e.effect }, e.tooltipAttrs), { default: C(() => [a.showSlot ? (d(), $("span", f({ key: 0, onClick: w, class: "tooltip__text", style: { maxWidth: B(V)(e.width, !0) }, onMouseover: h }, t.$attrs), [N("span", { ref_key: "contentRef", ref: l }, [i(t.$slots, "default", {}, () => [W(g(t.$attrs.content), 1)], !0)], 512)], 16)) : A("", !0), i(t.$slots, "content", {}, void 0, !0)]), _: 3 }, 16, ["disabled", "effect"]);
21
+ };
22
+ } }), [["__scopeId", "data-v-6c854bb3"]]));
23
+ export {
24
+ I as default
25
+ };
@@ -0,0 +1,37 @@
1
+ import { defineComponent as S, useCssVars as _, ref as v, useAttrs as F, computed as h, watch as $, onMounted as E, onBeforeUnmount as O, resolveComponent as T, createElementBlock as D, openBlock as l, createBlock as i, resolveDynamicComponent as j, mergeProps as d, createSlots as N, withCtx as n, createElementVNode as k, normalizeClass as L, renderSlot as m, toDisplayString as u, createCommentVNode as w, createTextVNode as x } from "vue";
2
+ import { m as M, _ as z, w as I } from "./index-oKZkmdJE.js";
3
+ const P = { class: "o-dialog" }, U = S({ name: "ODialog" }), H = I(z(S({ ...U, props: { type: { type: String, default: "" }, title: { type: String, default: "提示" }, theme: { type: String, default: "" }, cancel: { type: [Function, String], default: "" }, cancelText: { type: String, default: "取消" }, confirmText: { type: String, default: "确认" }, showFooter: { type: Boolean, default: !0 }, showCancel: { type: Boolean, default: !0 }, showConfirm: { type: Boolean, default: !0 }, confirmAttrs: { type: Object, default: () => ({}) }, cancelAttrs: { type: Object, default: () => ({}) }, enableConfirm: { type: Boolean, default: !0 }, confirm: { type: Function } }, emits: ["update:modelValue"], setup(t, { emit: b }) {
4
+ _((o) => ({ "9b0d9700": s.value }));
5
+ const a = F(), f = b, e = t, B = h(() => e.theme === "norm" ? "kd-norm-dialog" : e.theme === "norm16" ? "kd-norm16-dialog" : e.theme === "simple" ? "kd-simple-dialog" : ""), s = v("calc(100vh - 124px)");
6
+ $(() => e.showFooter, (o) => {
7
+ a.fullscreen !== !0 && a.fullscreen !== "" || (e.showFooter === !1 ? s.value = "calc(100vh - 74px)" : s.value = "calc(100vh - 124px)");
8
+ }, { immediate: !0 });
9
+ const r = v(!1);
10
+ async function p() {
11
+ e.confirm && M(e.confirm) === "function" ? (r.value = !0, await e.confirm().finally(() => {
12
+ r.value = !1;
13
+ })) : a.onConfirm ? a.onConfirm() : y();
14
+ }
15
+ function A() {
16
+ a.onCancel ? a.onCancel() : f("update:modelValue", !1);
17
+ }
18
+ function y() {
19
+ f("update:modelValue", !1);
20
+ }
21
+ function C({ code: o }) {
22
+ var c;
23
+ a.modelValue === !0 && o === "Enter" && e.enableConfirm && ((c = e.confirmAttrs) == null ? void 0 : c.loading) !== !0 && p();
24
+ }
25
+ const V = h(() => e.type === "" ? "el-dialog" : e.type === "drawer" ? "el-drawer" : void 0);
26
+ return E(() => {
27
+ document.addEventListener("keypress", C);
28
+ }), O(() => {
29
+ document.removeEventListener("keypress", C);
30
+ }), (o, c) => {
31
+ const g = T("el-button");
32
+ return l(), D("div", P, [(l(), i(j(V.value), d({ "custom-class": B.value }, { width: "640px", closeOnClickModal: !0, destroyOnClose: !0, draggable: !0, ...o.$attrs }, { onClose: y }), N({ header: n(() => [m(o.$slots, "header", {}, () => [k("span", null, u(t.title), 1)], !0)]), default: n(() => [k("div", { class: L(o.$attrs.fullscreen === !0 || o.$attrs.fullscreen === "" ? "dialog_fullscreen " : "dialog_slot_box") }, [m(o.$slots, "default", {}, void 0, !0)], 2)]), _: 2 }, [t.showFooter ? { name: "footer", fn: n(() => [m(o.$slots, "footer", {}, () => [t.showCancel ? (l(), i(g, d({ key: 0, type: t.cancelAttrs.type || "" }, t.cancelAttrs, { onClick: A }), { default: n(() => [x(u(t.cancelText), 1)]), _: 1 }, 16, ["type"])) : w("", !0), t.showConfirm ? (l(), i(g, d({ key: 1, loading: r.value, id: "kdDialogConfirmBtn", type: t.confirmAttrs.type || "primary" }, t.confirmAttrs, { onClick: p }), { default: n(() => [x(u(t.confirmText), 1)]), _: 1 }, 16, ["loading", "type"])) : w("", !0)], !0)]), key: "0" } : void 0]), 1040, ["custom-class"]))]);
33
+ };
34
+ } }), [["__scopeId", "data-v-9272cec5"]]));
35
+ export {
36
+ H as default
37
+ };
@@ -0,0 +1,12 @@
1
+ import { defineComponent as s, getCurrentInstance as o, resolveComponent as a, createBlock as r, openBlock as n, mergeProps as c } from "vue";
2
+ import { _ as p, w as m } from "./index-oKZkmdJE.js";
3
+ const l = s({ name: "OSwitch" }), h = m(p(s({ ...l, setup(u) {
4
+ const { proxy: i } = o();
5
+ return (t, f) => {
6
+ const e = a("el-switch");
7
+ return n(), r(e, c(t.$attrs, { class: "o-custom-switch" }), null, 16);
8
+ };
9
+ } }), [["__scopeId", "data-v-ef67cc48"]]));
10
+ export {
11
+ h as default
12
+ };
@@ -0,0 +1,18 @@
1
+ import { defineComponent as i, computed as V, resolveComponent as d, createElementBlock as n, openBlock as l, createVNode as y, mergeProps as p, withCtx as s, Fragment as g, renderList as _, createBlock as S, renderSlot as m, createTextVNode as k, toDisplayString as x } from "vue";
2
+ import { _ as A, w as B } from "./index-oKZkmdJE.js";
3
+ const C = { class: "tabs-box" }, $ = i({ name: "OTabs" }), O = B(A(i({ ...$, props: { modelValue: { type: String }, options: { type: Array, default: () => [] }, label: { type: String, default: "label" }, value: { type: String, default: "value" }, subAttrs: { type: Object, default: () => {
4
+ } } }, emits: ["update:modelValue"], setup(o, { emit: b }) {
5
+ const e = o, c = b, u = V({ get: () => {
6
+ var a;
7
+ return e.modelValue || ((a = e.options[0]) == null ? void 0 : a[e.value]);
8
+ }, set(a) {
9
+ c("update:modelValue", a);
10
+ } });
11
+ return (a, r) => {
12
+ const f = d("el-tab-pane"), v = d("el-tabs");
13
+ return l(), n("div", C, [y(v, p(a.$attrs, { modelValue: u.value, "onUpdate:modelValue": r[0] || (r[0] = (t) => u.value = t) }), { default: s(() => [(l(!0), n(g, null, _(e.options, (t) => (l(), S(f, p({ key: t[e.value], name: t[e.value], label: t[e.label] }, o.subAttrs), { label: s(() => [m(a.$slots, t[e.value] + "-label", {}, () => [k(x(t[e.label]), 1)], !0)]), default: s(() => [m(a.$slots, t[e.value], {}, void 0, !0)]), _: 2 }, 1040, ["name", "label"]))), 128))]), _: 3 }, 16, ["modelValue"])]);
14
+ };
15
+ } }), [["__scopeId", "data-v-d3af55d7"]]));
16
+ export {
17
+ O as default
18
+ };
@@ -0,0 +1,39 @@
1
+ import { defineComponent as u, ref as j, resolveComponent as y, resolveDirective as w, createElementBlock as c, openBlock as r, createVNode as k, mergeProps as a, withCtx as p, Fragment as R, renderList as x, createBlock as i, renderSlot as h, withDirectives as B, resolveDynamicComponent as D, createCommentVNode as L, unref as A } from "vue";
2
+ import { v as $, i as q, _ as N, w as S } from "./index-oKZkmdJE.js";
3
+ import U from "./index-eagdaWyv.js";
4
+ import E from "./index-C5trOMLF.js";
5
+ const I = u({ name: "RenderComp", props: { render: Function, item: Object }, render: (t) => t.render(t == null ? void 0 : t.item) }), P = ["src"], z = u({ name: "OForm" }), M = S(N(u({ ...z, props: { fieldList: { type: Object, required: !0 }, model: { type: Object, required: !0 } }, setup(t, { expose: F }) {
6
+ const O = (l) => {
7
+ if (l.comp && typeof l.comp == "string") {
8
+ if (l.comp.includes("input"))
9
+ return l.placeholder ?? "请输入" + l.label;
10
+ if (l.comp.includes("select") || l.comp.includes("date"))
11
+ return l.placeholder ?? "请选择" + l.label;
12
+ }
13
+ return l.placeholder ?? "";
14
+ }, m = j();
15
+ function f() {
16
+ m.value.resetFields();
17
+ }
18
+ function _(l) {
19
+ if (q(l))
20
+ return "";
21
+ let s = { trigger: ["blur", "change"] };
22
+ return l.map((d) => {
23
+ let o = Object.assign({}, s, d);
24
+ return o.validator || o.message || (o.message = "请输入"), o;
25
+ });
26
+ }
27
+ return F({ validate: async function(l = !1, s = {}) {
28
+ await $(m, s), l && f();
29
+ }, resetFields: f }), (l, s) => {
30
+ const d = y("el-form-item"), o = y("el-form"), C = w("directives");
31
+ return r(), c("div", null, [k(o, a({ ref_key: "oFormRef", ref: m, model: t.model }, { "label-width": "auto", ...l.$attrs }), { default: p(() => [(r(!0), c(R, null, x(t.fieldList, (e, V) => (r(), i(d, a({ key: V, prop: e.prop, label: e.label }, e.formAttrs, { rules: _(e.rules) }), { label: p(() => [e.labelRender ? (r(), i(I, { key: 0, render: e.labelRender, item: e }, null, 8, ["render", "item"])) : h(l.$slots, e.prop + "-label", { key: 1 }, () => {
32
+ var n, b, g, v;
33
+ return [(n = e.imgAttrs) != null && n.src ? (r(), c("img", a({ key: 0, src: (b = e.imgAttrs) == null ? void 0 : b.src, class: "h-16" }, e.imgAttrs), null, 16, P)) : (g = e.imgAttrs) != null && g.name ? (r(), i(A(U), a({ key: 1, name: (v = e.imgAttrs) == null ? void 0 : v.name, class: "m-r-4" }, e.imgAttrs), null, 16, ["name"])) : L("", !0), k(A(E), { content: e.label }, null, 8, ["content"])];
34
+ }, !0)]), default: p(() => [e.useSlot ? h(l.$slots, e.prop, { key: 0 }, void 0, !0) : B((r(), i(D(e.comp || "o-input"), a({ key: 1, modelValue: t.model[e.prop], "onUpdate:modelValue": (n) => t.model[e.prop] = n, placeholder: O(e), rules: e.rules }, { clearable: !0, filterable: !0, ...e.attrs }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "rules"])), [[C, e.directives]])]), _: 2 }, 1040, ["prop", "label", "rules"]))), 128))]), _: 3 }, 16, ["model"])]);
35
+ };
36
+ } }), [["__scopeId", "data-v-2c4799ea"]]));
37
+ export {
38
+ M as default
39
+ };
@@ -0,0 +1,67 @@
1
+ import { defineComponent as Q, getCurrentInstance as W, useAttrs as _, useSlots as z, computed as m, ref as w, watch as q, resolveComponent as v, createElementBlock as p, openBlock as u, normalizeStyle as H, normalizeClass as Z, unref as g, createVNode as b, createCommentVNode as F, mergeProps as L, createSlots as M, withCtx as c, withModifiers as $, createTextVNode as ee, Fragment as le, renderList as x, createBlock as te, renderSlot as k, toDisplayString as V, createElementVNode as I, pushScopeId as ae, popScopeId as oe } from "vue";
2
+ import { i as S, p as se, _ as ie, w as ne } from "./index-oKZkmdJE.js";
3
+ import ue from "./index-BBpNruQw.js";
4
+ const re = { key: 0 }, de = { key: 1 }, pe = { key: 0, class: "po-r" }, ce = ((o) => (ae("data-v-d3a669d0"), o = o(), oe(), o))(() => I("div", { class: "mt" }, "全选", -1)), me = ["src"], ge = Q({ name: "OSelect" }), ye = ne(ie(Q({ ...ge, props: { modelValue: { type: [Array, String, Number] }, value: { type: String, default: "value" }, label: { type: [String, Array], default: "label" }, options: { type: Array, default: () => [] }, type: { type: String, default: "" }, multiple: { type: Boolean, default: !1 }, showAll: { type: Boolean, default: !0 }, showPrefix: { type: Boolean, default: !1 }, showQuick: { type: Boolean, default: !0 }, title: { type: String, default: "" }, connect: { type: String, default: "/" }, customLabel: { type: [Function, String], default: "" }, width: { type: [String, Number], default: "" }, disPlaceholder: { type: String, default: "" }, optionDisabled: { type: Function, default: () => {
5
+ } }, url: { type: [String, Function], default: "" }, urlParams: { type: Object, default: () => {
6
+ } }, optionsExpression: { type: String, default: "" }, emptyColor: { type: Boolean, default: !1 } }, emits: ["changeSelect", "update:modelValue", "change"], setup(o, { emit: N }) {
7
+ const { proxy: U } = W(), i = _(), f = N, P = z(), O = m(() => {
8
+ const e = U.clone(P);
9
+ return delete e.default, e;
10
+ }), l = o, r = w(l.options);
11
+ q(() => l.options, (e) => {
12
+ r.value = e;
13
+ }, { deep: !0, immediate: !0 });
14
+ const A = w(null), h = m({ get: () => S(l.modelValue) && l.multiple ? [] : l.modelValue, set(e) {
15
+ f("update:modelValue", e);
16
+ } }), B = m(() => i.disabled === "" || !!i.disabled), Y = m({ get() {
17
+ const e = l.modelValue;
18
+ return !!e && (e == null ? void 0 : e.length) !== l.options.length && (e == null ? void 0 : e.length) !== 0;
19
+ }, set: (e) => (e == null ? void 0 : e.length) !== l.options.length && (e == null ? void 0 : e.length) !== 0 }), E = m({ get() {
20
+ const e = l.modelValue;
21
+ return (e == null ? void 0 : e.length) === l.options.length;
22
+ }, set: (e) => (e == null ? void 0 : e.length) === l.options.length }), K = (e) => {
23
+ y(e ? l.options.map((t) => t[l.value]) : []);
24
+ }, X = () => {
25
+ y(l.options.filter((e) => !l.modelValue.includes(e[l.value])).map((e) => e[l.value]));
26
+ };
27
+ function j(e) {
28
+ if (typeof l.customLabel == "function")
29
+ return l.customLabel(e);
30
+ if (Array.isArray(l.label)) {
31
+ let t = "";
32
+ return l.label.forEach((s) => {
33
+ t += e[s] + l.connect;
34
+ }), t.slice(0, -1);
35
+ }
36
+ return e[l.label];
37
+ }
38
+ const D = () => {
39
+ if (l.options.length === 0 || i.disabled === "" || i.disabled)
40
+ return;
41
+ let e = 0;
42
+ S(l.modelValue) || l.multiple === !0 && l.modelValue.length > 1 ? e = 0 : (e = l.options.findIndex((t) => l.type === "simple" ? t === l.modelValue : l.multiple === !0 ? t[l.value] === l.modelValue[0] : t[l.value] === l.modelValue) + 1, e === l.options.length && (e = 0)), l.type === "simple" ? A.value.$emit("change", l.options[e]) : l.multiple === !0 ? A.value.$emit("change", [l.options[e][l.value]]) : A.value.$emit("change", l.options[e][l.value]);
43
+ };
44
+ function y(e) {
45
+ let t = [];
46
+ const s = r.value.filter((n) => !!e.includes(n[l.value]) && (t.push(n[l.label]), !0));
47
+ C(e, t, s);
48
+ }
49
+ function T(e) {
50
+ if (Array.isArray(e))
51
+ return void y(e);
52
+ if (!e)
53
+ return void C("", "", "");
54
+ let t = r.value.filter((n) => l.type === "simple" ? n === e : n[l.value] === e)[0], s = t[l.label];
55
+ C(e, s, t);
56
+ }
57
+ function C(e, t, s) {
58
+ f("changeSelect", e, t, s), f("update:modelValue", e), f("change", e);
59
+ }
60
+ return (e, t) => {
61
+ const s = v("el-checkbox"), n = v("el-button"), G = v("el-option"), J = v("el-select");
62
+ return u(), p("div", { class: Z(["o-select", { "has-title": l.title, "has-quick": l.showQuick && !B.value && l.options.length > 0 }]), style: H({ ...g(se)(l.width) }) }, [b(g(ue), { title: l.title, size: g(i).size, titleAttrs: e.$attrs.titleAttrs ?? {} }, null, 8, ["title", "size", "titleAttrs"]), b(J, L({ ref_key: "selectRef", ref: A, class: ["o-select__select", g(S)(r.value) && o.emptyColor ? "o-select__empty" : ""], modelValue: h.value, "onUpdate:modelValue": t[1] || (t[1] = (a) => h.value = a), placeholder: i.disabled ? l.disPlaceholder : i.placeholder || "请选择", "popper-class": "o-select__multiple-checkbox", multiple: o.multiple, onChange: T }, { clearable: !0, filterable: !0, ...Object.entries(e.$attrs).reduce((a, [d, R]) => (d !== "class" && d !== "style" && (a[d] = R), a), {}) }), M({ default: c(() => [o.multiple && l.showAll ? (u(), p("div", pe, [b(s, { indeterminate: Y.value, modelValue: E.value, "onUpdate:modelValue": t[0] || (t[0] = (a) => E.value = a), onChange: K, class: "o-select__all-select f-st-ct" }, { default: c(() => [ce]), _: 1 }, 8, ["indeterminate", "modelValue"]), b(n, { type: "primary", onClick: $(X, ["stop"]), size: "small", class: "reverse-select" }, { default: c(() => [ee("反选")]), _: 1 })])) : F("", !0), (u(!0), p(le, null, x(r.value, (a) => (u(), te(G, { key: o.type === "simple" ? a : a[l.value], label: o.type === "simple" ? a : j(a), value: o.type === "simple" ? a : a[l.value], disabled: o.optionDisabled(a) }, { default: c(() => [k(e.$slots, "default", { options: r.value, item: a }, void 0, !0)]), _: 2 }, 1032, ["label", "value", "disabled"]))), 128))]), _: 2 }, [l.showPrefix ? { name: "prefix", fn: c(() => [k(e.$slots, "prefix", {}, () => [Array.isArray(h.value) ? (u(), p("span", re, V(h.value.length) + "/" + V(l.options.length), 1)) : (u(), p("span", de, V(l.options.length) + "个", 1))], !0)]), key: "0" } : void 0, x(O.value, (a, d) => ({ name: d, fn: c(() => [k(e.$slots, d, {}, void 0, !0)]) }))]), 1040, ["class", "modelValue", "placeholder", "multiple"]), o.showQuick && !B.value && l.options.length > 0 ? (u(), p("div", { key: 0, class: "o-select__select-box", onClick: D }, [I("img", { src: g("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA3tJREFUWEfFlzFo1GAUx/8vd4iCQ0eHigoOdetgwcFBQVC3ghVbcEhySSbFQYcWlLYotEMdRKckl3yD0IoVuqkg6OAg1MHNDoIVO3TsULDIXZ79ksslud6lufZssxyX+/K93/d/7/7vhXDIF+0lvmEY/bWArgA4ioA+CWGv7GUf+UxhAFU3VRCugjEcBk6uLeE5x3oCoJrmIOo0XFYC13XdNbmpahgXECjzAJ9OByGiTWZeA+iV8OypVgCtYj5kpvIOsBIvCcf5Ft/PKKDq1hTAkwBNCM+e1XRjjkH3m5sQFijgN77vLuadWKtYd5j5efs1NJ0GbgtARC6Y+xgYCTchWkAJ08IulmtVt8YBnmmekqgGQAD8q0QsYnV31ECsABHVmLkcfQaPhOfOdpPjGICAHyA6He4FLPqec7N1nw4pkIemGis8lM5XUYimAkTvoPAEBbQcQfBT33MfZGop/SWpgVCcdRDCYiFgrUTBdFq6PJg0gKja11XdGAdoRh6KGJc9z/7cqQgzucsEIYyJqrNQRAW1Yo6CMS9rya/apnxG083XjZpaEZ5zrj2AqvZR6chtZhzPBuJ14TmiSPB4jfSNssIfYtWkedVZ+SlTgdRhChtRN8E7rdUqlrPtHUZamQMFiFMDoOmeBwoQOqtusvwsK3xSpucwAP40eokm6yoEkD1A/lfBwbPW/2kvcp/eQ9OtZQafJ6K7ftV+EQLE3k2gr75nD/U6aBbAmAMp92KTixSQrRbw08XxPyF2OGFjwPgtfxCec6B10Qym6mZUHF04Xi9UagK0M4leBNhtj0SBxL9rJQrOpC1Uzn97sWKATmTyTdjk+t+XQoiNDs3I/A5gIN27Y2W6SU3K8doIEE1bbQF03brIhI9hwwBPyEFErVhvwXwtHtN2k1T+3mg8kwz0h+sZgwA31MgZyaK2Gc2B8UCCgGa6BUhDxiYXHUpeuwBEEFHvlhBgXmXgbDcKJC3ZGCdSHifjnYTIAYikIxWgU9KfEuqQPJO7vFSoljWAOibBPBo+CSyCaEO24lyA7EiWDRF7d15gTTNGWKEbYISBo+DRHJhMynljeePFpDUIEdf8qvOk9X4D+Nb2gNHPzC1TFK1CCcaE636JC7MWKAbyXkyKVHimwGL3TG5ugbAExvuivrEv31dVawAKX5JNLD3/dXOQfQF0E6jT2n+839ww67q/YQAAAABJRU5ErkJggg=="), alt: "", width: "12px" }, null, 8, me)])) : F("", !0)], 6);
63
+ };
64
+ } }), [["__scopeId", "data-v-d3a669d0"]]));
65
+ export {
66
+ ye as default
67
+ };
@@ -0,0 +1,52 @@
1
+ import { defineComponent as Y, useAttrs as yt, ref as z, computed as A, watch as Q, resolveComponent as w, createElementBlock as r, openBlock as s, createVNode as T, createCommentVNode as f, mergeProps as u, withCtx as d, renderSlot as $, createBlock as i, Fragment as c, renderList as E, normalizeProps as U, unref as W, resolveDynamicComponent as I, createTextVNode as j, toDisplayString as b, withModifiers as X, createElementVNode as h, pushScopeId as wt, popScopeId as ft } from "vue";
2
+ import bt from "./index-BIcu2-wb.js";
3
+ import ht from "./index-eagdaWyv.js";
4
+ import { m as gt, _ as kt, w as vt } from "./index-oKZkmdJE.js";
5
+ const V = (y) => (wt("data-v-a65d44b8"), y = y(), ft(), y), xt = { class: "o-table" }, Bt = V(() => h("span", null, "序号", -1)), St = ["onClick"], Ct = { key: 2 }, _t = { key: 3 }, zt = { key: 0, style: { height: "64px" } }, Tt = { class: "page-wrap" }, $t = { class: "page-left" }, Pt = V(() => h("span", null, "共", -1)), Nt = { class: "m-lr-5" }, Ot = V(() => h("span", null, "项数据", -1)), At = Y({ name: "OTable" }), Lt = vt(kt(Y({ ...At, props: { data: { type: Array, default: () => [] }, columns: { type: Array, default: () => [] }, showPage: { type: Boolean, default: !0 }, showIndex: { type: Boolean, default: !0 }, pageSize: { type: Number, default: 30 }, pageSizes: { type: Array, default: () => [10, 30, 50, 100] }, total: { type: Number }, columnEmptyText: { type: String, default: "-" }, isLoading: { type: Boolean } }, emits: ["update"], setup(y, { emit: Z }) {
6
+ const C = yt(), m = y, tt = z(null), L = A(() => m.total || m.data.length), k = z(m.pageSize), et = Z, D = z([]);
7
+ Q(() => m.columns, () => {
8
+ D.value = m.columns.map((t) => {
9
+ let n = [], o = [];
10
+ t.btns && (t.maxBtns = t.maxBtns || 3, t.btns = t.btns.map((B) => (B.isShow === void 0 && (B.isShow = !0), B)), t.btns.length > t.maxBtns ? (n = t.btns.slice(0, t.maxBtns), o = t.btns.slice(t.maxBtns)) : n = t.btns);
11
+ let x = { showOverflowTooltip: !0, baseBtns: n, hideBtns: o, maxBtns: t.maxBtns || 3 };
12
+ return Object.assign({}, x, t);
13
+ });
14
+ }, { immediate: !0, deep: !0 }), Q(() => m.pageSize, (t) => {
15
+ k.value = t;
16
+ }, { immediate: !0 });
17
+ const P = (t, n = "", o = "") => typeof t == "function" ? !n || t(n, o) : t === void 0 || t, g = (t, n = "", o = "") => typeof t == "function" ? !!n && t(n, o) : t !== void 0 && t, N = (t, n = "", o = "") => typeof t == "function" ? t(n, o) : t === void 0 || t, at = (t, n = "", o = "") => typeof t == "function" ? t(n, o) : t !== void 0 && t, lt = (t) => t + 1 + (v.value - 1) * k.value, H = (t, n) => {
18
+ const o = gt(t.row[n.prop]) === "string" && t.row[n.prop].trim().length === 0;
19
+ return t.row[n.prop] === null || t.row[n.prop] === void 0 || t.row[n.prop] === "" || o ? n.columnEmptyText || m.columnEmptyText : t.row[n.prop];
20
+ }, v = z(1);
21
+ function st(t) {
22
+ k.value = t, v.value = 1, F();
23
+ }
24
+ function nt(t) {
25
+ v.value = t, F();
26
+ }
27
+ function F() {
28
+ et("update", v.value, k.value);
29
+ }
30
+ const ot = A(() => m.isLoading === !0 ? "" : "暂无数据"), rt = A(() => C.hasOwnProperty("empty-text") ? C["empty-text"] : C.hasOwnProperty("emptyText") ? C.emptyText : ot.value);
31
+ return (t, n) => {
32
+ const o = w("el-table-column"), x = w("el-button"), B = w("el-dropdown-item"), it = w("el-dropdown-menu"), dt = w("el-dropdown"), pt = w("el-table"), ut = w("el-pagination");
33
+ return s(), r("div", xt, [T(pt, u({ data: m.data, ref_key: "tableRef", ref: tt, "header-cell-style": { background: "#f7f8fa", color: "rgba(39,48,75,0.85)", height: "50px", textAlign: "center", ...t.$attrs["header-cell-style"] || {} }, "empty-text": rt.value }, { stripe: !0, border: !0, ...t.$attrs }), { default: d(() => [$(t.$slots, "default", {}, void 0, !0), y.showIndex ? (s(), i(o, { key: 0, type: "index", width: "60", align: "center", index: lt }, { header: d(({ column: l }) => [Bt]), _: 1 })) : f("", !0), (s(!0), r(c, null, E(D.value, (l, G) => {
34
+ return s(), r(c, { key: G }, [(S = l.isShowColumn, q = l, J = G, (typeof S == "function" ? S(q, J) : S === void 0 || S) ? (s(), r(c, { key: 0 }, [l.type ? (s(), i(o, u({ key: l.type }, { align: "center", ...l }), null, 16)) : l.baseBtns && l.baseBtns.length > 0 ? (s(), i(o, U(u({ key: 1 }, { fixed: "right", width: (M = l.baseBtns, R = l.hideBtns, 26 + 36 * (M.length + (R.length === 0 ? 0 : 1)) + "px"), ...l })), { default: d((e) => [N(l.isShow, e.row, e) ? (s(), r(c, { key: 0 }, [(s(!0), r(c, null, E(l.baseBtns, (a, O) => (s(), r(c, { key: O }, [N(a.isShow, e.row, e) ? (s(), r(c, { key: 0 }, [a.useSlot ? $(t.$slots, a.prop, { key: 0, row: e.row, scope: e, value: e.row[a.prop] }, void 0, !0) : at(a.reConfirm, e.row, e) ? (s(), i(W(bt), { key: 1, trigger: "click", title: a.title ?? "确定删除吗?", onConfirm: (_) => {
35
+ var p;
36
+ return (p = a.handler) == null ? void 0 : p.call(a, e.row, e);
37
+ }, class: "f-st-ct" }, { default: d(() => [a.comp ? (s(), i(I(a.comp), u({ key: 0, class: "mlr cp" }, a.attrs, { disabled: g(a.disabled, e.row, e) }), null, 16, ["disabled"])) : (s(), i(x, u({ key: 1 }, { ...a }, { link: "", class: "hide-btns-button", disabled: g(a.disabled, e.row, e) }), { default: d(() => [j(b(P(a.content, e.row, e)), 1)]), _: 2 }, 1040, ["disabled"]))]), _: 2 }, 1032, ["title", "onConfirm"])) : a.comp ? (s(), i(I(a.comp), u({ key: 2, class: "mlr cp" }, a.attrs, { disabled: g(a.disabled, e.row, e), onClick: (_) => ((p, ct, mt, K) => {
38
+ p && (K.stopPropagation(), p(ct, mt, K));
39
+ })(a.handler, e.row, e, _) }), null, 16, ["disabled", "onClick"])) : (s(), i(x, u({ key: 3 }, { ...a }, { link: "", disabled: g(a.disabled, e.row, e), class: "hide-btns-button", onClick: X((_) => {
40
+ var p;
41
+ return (p = a.handler) == null ? void 0 : p.call(a, e.row, e);
42
+ }, ["stop"]) }), { default: d(() => [j(b(P(a.content, e.row, e)), 1)]), _: 2 }, 1040, ["disabled", "onClick"]))], 64)) : f("", !0)], 64))), 128)), l.hideBtns.length > 0 ? (s(), i(dt, { key: 0, class: "", trigger: "click" }, { dropdown: d(() => [T(it, { "hide-on-click": !1 }, { default: d(() => [(s(!0), r(c, null, E(l.hideBtns, (a, O) => (s(), r(c, { key: O }, [N(a.isShow, e.row, e) ? (s(), i(B, { key: 0, "hide-on-click": !1, onClick: (_) => {
43
+ var p;
44
+ return (p = a.handler) == null ? void 0 : p.call(a, e.row, e);
45
+ } }, { default: d(() => [a.useSlot ? $(t.$slots, a.prop, { key: 0, row: e.row, scope: e, value: e.row[a.prop] }, void 0, !0) : (s(), r(c, { key: 1 }, [a.comp ? (s(), i(I(a.comp), u({ key: 0 }, a.attrs, { disabled: g(a.disabled, e.row, e) }), null, 16, ["disabled"])) : (s(), i(x, u({ key: 1 }, { ...a }, { link: "", class: "hide-btns-button", disabled: g(a.disabled, e.row, e) }), { default: d(() => [j(b(P(a.content, e.row, e)), 1)]), _: 2 }, 1040, ["disabled"]))], 64))]), _: 2 }, 1032, ["onClick"])) : f("", !0)], 64))), 128))]), _: 2 }, 1024)]), default: d(() => [T(W(ht), { name: "more" })]), _: 2 }, 1024)) : f("", !0)], 64)) : f("", !0)]), _: 2 }, 1040)) : (s(), i(o, U(u({ key: 2 }, { ...l })), { default: d((e) => [l.useSlot ? $(t.$slots, l.prop, { key: 0, row: e.row, scope: e, value: e.row[l.prop] }, void 0, !0) : l.handler ? (s(), r("span", { key: 1, class: "hide-btns-button", onClick: X((a) => l.handler(e.row, e), ["stop"]) }, [h("span", null, b(l.filter ? l.filter(e.row[l.prop], e.row, e) : H(e, l)), 1)], 8, St)) : l.filter ? (s(), r("span", Ct, b(l.filter(e.row[l.prop], e.row, e)), 1)) : (s(), r("span", _t, b(H(e, l)), 1))]), _: 2 }, 1040))], 64)) : f("", !0))], 64);
46
+ var M, R, S, q, J;
47
+ }), 128))]), _: 3 }, 16, ["data", "header-cell-style", "empty-text"]), y.showPage ? (s(), r("div", zt, [h("div", Tt, [h("div", $t, [Pt, h("span", Nt, b(L.value), 1), Ot]), T(ut, { class: "tab_pagination", background: "", "current-page": v.value, "page-size": k.value, "page-sizes": y.pageSizes, layout: "prev, pager, next, sizes, jumper", total: L.value, onSizeChange: st, onCurrentChange: nt }, null, 8, ["current-page", "page-size", "page-sizes", "total"])])])) : f("", !0)]);
48
+ };
49
+ } }), [["__scopeId", "data-v-a65d44b8"]]));
50
+ export {
51
+ Lt as default
52
+ };
@@ -0,0 +1,45 @@
1
+ import { defineComponent as f, ref as c, watch as b, createElementBlock as n, openBlock as u, createElementVNode as d, createBlock as C, createCommentVNode as w, createVNode as _, Fragment as A, renderList as B, normalizeClass as D, toDisplayString as K, unref as m, withKeys as j, withModifiers as E } from "vue";
2
+ import I from "./index-YVlUw8GC.js";
3
+ import N from "./index-eagdaWyv.js";
4
+ import { o as p, $ as v, _ as O, w as L } from "./index-oKZkmdJE.js";
5
+ const S = { class: "o-input-box cl-blue" }, $ = { class: "o-input-box__content" }, z = { key: 0, class: "spanclose", style: { cursor: "not-allowed" } }, F = ["onClick"], M = f({ name: "OInputLabel" }), P = L(O(f({ ...M, props: { modelValue: { type: Array, default: () => [] }, isComplex: { type: Boolean, default: !1 }, regexp: { tupe: RegExp, default: "" }, message: { tupe: String, default: "输入有误" }, inputAttrs: { type: Object, default: () => ({}) } }, emits: ["update:modelValue"], setup(g, { expose: x, emit: h }) {
6
+ const t = c(""), l = c([]), o = g, r = h;
7
+ function y() {
8
+ var s;
9
+ if (console.log("props.regexp", o.regexp), console.log("currentval.value", t.value), o.regexp && !o.regexp.test(t.value))
10
+ return v(o.message, "e");
11
+ if (!t.value)
12
+ return !1;
13
+ let a = !1;
14
+ for (let e = 0; e < l.value.length; e++)
15
+ if (o.isComplex) {
16
+ if (((s = l.value[e]) == null ? void 0 : s.name) == t.value) {
17
+ a = !0;
18
+ break;
19
+ }
20
+ } else if (l.value[e] == t.value) {
21
+ a = !0;
22
+ break;
23
+ }
24
+ a ? v("重复项不允许添加", "e") : (typeof t.value == "string" && o.isComplex ? l.value.push({ name: t.value }) : l.value.push(t.value), t.value = "", r("update:modelValue", l.value));
25
+ }
26
+ function V() {
27
+ r("update:modelValue", []);
28
+ }
29
+ return b(() => o.modelValue, (a) => {
30
+ var s;
31
+ if (a && a.length > 0) {
32
+ l.value = [];
33
+ for (let e = 0; e < a.length; e++)
34
+ (!o.isComplex && p(a[e]) || p(a[e]) && p((s = a[e]) == null ? void 0 : s.name)) && l.value.push(a[e]);
35
+ } else
36
+ l.value = [];
37
+ }, { immediate: !0 }), x({ $getValue: function() {
38
+ return l.value;
39
+ } }), (a, s) => (u(), n("div", S, [d("div", $, [(u(!0), n(A, null, B(l.value, (e, i) => (u(), n("div", { key: i, class: D(e.isDelete === 0 ? "disbox" : "spanbox") }, [d("span", null, K(e.name || e), 1), e.isDelete === 0 ? (u(), n("i", z)) : (u(), n("i", { key: 1, class: "spanclose", onClick: (R) => function(k, U) {
40
+ l.value.splice(k, 1), r("update:modelValue", l.value);
41
+ }(i) }, null, 8, F))], 2))), 128)), _(m(I), { placeholder: o.inputAttrs.placeholder || "输入后回车", width: o.inputAttrs.width || 120, modelValue: t.value, "onUpdate:modelValue": s[0] || (s[0] = (e) => t.value = e), onKeyup: j(E(y, ["stop"]), ["enter"]), clearable: "", type: "text" }, null, 8, ["placeholder", "width", "modelValue", "onKeyup"])]), l.value.length > 0 ? (u(), C(m(N), { key: 0, name: "circle-close", class: "o-input-label__clear", onClick: V })) : w("", !0)]));
42
+ } }), [["__scopeId", "data-v-5c5c95f2"]]));
43
+ export {
44
+ P as default
45
+ };
@@ -0,0 +1,9 @@
1
+ import { defineComponent as d, getCurrentInstance as y, createElementBlock as o, openBlock as a, createCommentVNode as r, createElementVNode as c, normalizeStyle as s, renderSlot as l } from "vue";
2
+ import { _ as n, w as i } from "./index-oKZkmdJE.js";
3
+ const f = { class: "basic-layout-box" }, m = d({ name: "OBasicLayout" }), b = i(n(d({ ...m, props: { headerStyle: { type: Object, default: () => ({}) }, mainStyle: { type: Object, default: () => ({}) }, footerStyle: { type: Object, default: () => ({}) } }, setup(t) {
4
+ const { proxy: p } = y();
5
+ return (e, u) => (a(), o("div", f, [e.$slots.header ? (a(), o("div", { key: 0, class: "header", style: s(t.headerStyle) }, [l(e.$slots, "header", {}, void 0, !0)], 4)) : r("", !0), c("div", { class: "main", style: s(t.mainStyle) }, [l(e.$slots, "default", {}, void 0, !0)], 4), e.$slots.footer ? (a(), o("div", { key: 1, class: "footer", style: s(t.footerStyle) }, [l(e.$slots, "footer", {}, void 0, !0)], 4)) : r("", !0)]));
6
+ } }), [["__scopeId", "data-v-01f88f5c"]]));
7
+ export {
8
+ b as default
9
+ };
@@ -0,0 +1,12 @@
1
+ import { defineComponent as p, computed as r, resolveComponent as v, createBlock as s, openBlock as t, normalizeProps as n, guardReactiveProps as d, withCtx as u, renderSlot as i, createElementBlock as f, Fragment as g, renderList as S, resolveDynamicComponent as B, mergeProps as h, createTextVNode as k, toDisplayString as w } from "vue";
2
+ import { w as C } from "./index-oKZkmdJE.js";
3
+ const x = p({ name: "ORadio" }), T = C(p({ ...x, props: { type: { type: String, validator: (a) => ["boolean", "simple", ""].includes(a), default: "" }, showType: { type: String, validator: (a) => ["radio", "button"].includes(a), default: "radio" }, options: { type: Array, default: () => [] }, border: { type: Boolean, default: !1 }, value: { type: [String, Number, Boolean], default: "value" }, label: { type: [String, Number, Boolean], default: "label" }, subAttrs: { type: Object, default: () => ({}) } }, setup(a) {
4
+ const e = a, b = r(() => ({ radio: "el-radio", button: "el-radio-button" })[e.showType] ?? "el-radio"), m = r(() => e.type === "boolean" ? [{ label: !0, value: !0 }, { label: !1, value: !1 }] : e.type === "simple" && e.options.length > 0 ? e.options.map((o) => ({ label: o, value: o })) : e.options);
5
+ return (o, A) => {
6
+ const c = v("el-radio-group");
7
+ return t(), s(c, n(d(o.$attrs)), { default: u(() => [i(o.$slots, "default", {}, () => [(t(!0), f(g, null, S(m.value, (l, y) => (t(), s(B(b.value), h(l, { key: y, label: l[e.label], value: l[e.value], border: a.border, disabled: l[a.subAttrs.disabled] }), { default: u(() => [i(o.$slots, l.slot, n(d(l)), () => [k(w(l[e.label]), 1)])]), _: 2 }, 1040, ["label", "value", "border", "disabled"]))), 128))])]), _: 3 }, 16);
8
+ };
9
+ } }));
10
+ export {
11
+ T as default
12
+ };
@@ -0,0 +1,69 @@
1
+ import { getCurrentInstance as J, ref as W, watch as B, nextTick as M, computed as $, defineComponent as G, useAttrs as U, resolveComponent as j, createElementBlock as q, openBlock as w, mergeProps as b, createVNode as F, createBlock as C, createCommentVNode as P, unref as y, withCtx as u, createElementVNode as N, isRef as E, createSlots as L, normalizeStyle as T, toDisplayString as I, renderSlot as x } from "vue";
2
+ import { m as R, p as z, _ as H, w as K } from "./index-oKZkmdJE.js";
3
+ import D from "./index-eagdaWyv.js";
4
+ function Q(r, o, a, h = {}) {
5
+ var f, n, g;
6
+ const { clone: m = !1, passive: k = !1, eventName: A, deep: _ = !1, defaultValue: O, shouldEmit: S } = h, i = J(), V = (i == null ? void 0 : i.emit) || ((f = i == null ? void 0 : i.$emit) == null ? void 0 : f.bind(i)) || ((g = (n = i == null ? void 0 : i.proxy) == null ? void 0 : n.$emit) == null ? void 0 : g.bind(i == null ? void 0 : i.proxy));
7
+ let p = A;
8
+ o || (o = "modelValue"), p = p || `update:${o.toString()}`;
9
+ const e = (s) => {
10
+ return m ? typeof m == "function" ? m(s) : (d = s, JSON.parse(JSON.stringify(d))) : s;
11
+ var d;
12
+ }, t = () => r[o] !== void 0 ? e(r[o]) : O, v = (s) => {
13
+ S ? S(s) && V(p, s) : V(p, s);
14
+ };
15
+ if (k) {
16
+ const s = t(), d = W(s);
17
+ let l = !1;
18
+ return B(() => r[o], (c) => {
19
+ l || (l = !0, d.value = e(c), M(() => l = !1));
20
+ }), B(d, (c) => {
21
+ l || c === r[o] && !_ || v(c);
22
+ }, { deep: _ }), d;
23
+ }
24
+ return $({ get: () => t(), set(s) {
25
+ v(s);
26
+ } });
27
+ }
28
+ const X = G({ name: "OInput" }), te = K(H(G({ ...X, props: { modelValue: { required: !0 }, titleAttrs: { type: Object, default: () => {
29
+ } }, width: { type: [String, Number], default: "100%" }, showWordLimit: { type: [Boolean, String], default: "" }, block: { type: Boolean, default: !1 }, disPlaceholder: { type: String, default: "" }, subAttrs: { type: Object, default: () => ({}) }, tooltipAttrs: { type: Object, default: () => ({}) }, iconAttrs: { type: Object, default: () => ({}) }, hideTooltip: { type: Boolean, default: !1 }, options: { type: Array }, content: { type: String, default: "" } }, setup(r) {
30
+ const o = U(), a = r, h = W([]), f = W(!0), n = Q(a), g = $(() => o.type === "textarea" ? o.maxlength || 1e3 : o.maxlength || "");
31
+ B(() => a.options, (e) => {
32
+ e && (h.value = e.map((t) => R(t) === "object" ? t : { value: t }));
33
+ }, { deep: !0, immediate: !0 });
34
+ const m = $(() => {
35
+ var e;
36
+ if ((e = a.titleAttrs) != null && e.width) {
37
+ let t = parseInt(a.titleAttrs.width) - 8 + "px";
38
+ return { ...a.titleAttrs, width: z(t, !0) };
39
+ }
40
+ return a.titleAttrs;
41
+ });
42
+ function k() {
43
+ return o.disabled === "" || o.disabled ? a.disPlaceholder : o.placeholder || "请输入";
44
+ }
45
+ function A(e) {
46
+ const t = e.target;
47
+ t.offsetWidth + 4 < t.scrollWidth ? f.value = !1 : f.value = !0;
48
+ }
49
+ const _ = () => {
50
+ if (!a.width)
51
+ return {};
52
+ let e = z(a.width, !0);
53
+ return a.content && e && (e = `calc(${e} - 32px)`), { width: e };
54
+ }, O = () => {
55
+ n.value = "";
56
+ }, S = $(() => o.type === "password" && o.showPassword !== !1), i = (e, t) => {
57
+ t(e ? h.value.filter(V(e)) : h.value);
58
+ }, V = (e) => (t) => t.value.toLowerCase().indexOf(e.toLowerCase()) === 0, p = $(() => ({ resize: "none", rows: 2, clearable: !0, ...Object.entries(o).reduce((e, [t, v]) => (t !== "class" && t !== "style" && (e[t] = v), e), {}) }));
59
+ return (e, t) => {
60
+ const v = j("el-autocomplete"), s = j("el-input"), d = j("el-tooltip");
61
+ return w(), q("div", b({ class: "o-input" }, r.subAttrs, { style: { ..._() } }), [F(d, b({ content: "" + y(n), disabled: f.value || r.hideTooltip }, r.tooltipAttrs), { default: u(() => [N("div", null, [a.options ? (w(), C(v, b({ key: 0, modelValue: y(n), "onUpdate:modelValue": t[0] || (t[0] = (l) => E(n) ? n.value = l : null), "fetch-suggestions": i, placeholder: k(), clearable: e.$attrs.clearable !== !1, onMouseover: t[1] || (t[1] = (l) => A(l)) }, p.value), L({ _: 2 }, [e.$attrs.title ? { name: "prepend", fn: u(() => [N("div", { style: T({ ...m.value }), class: "o-input__title" }, I(e.$attrs.title), 5)]), key: "0" } : void 0]), 1040, ["modelValue", "placeholder", "clearable"])) : (w(), C(s, b({ key: 1, modelValue: y(n), "onUpdate:modelValue": t[2] || (t[2] = (l) => E(n) ? n.value = l : null), placeholder: k(), class: ["kd-ipt", { "kd-textarea": e.$attrs.type === "textarea" }], showPassword: S.value, maxlength: g.value }, p.value, { "show-word-limit": typeof a.showWordLimit == "boolean" ? a.showWordLimit : o.type === "textarea", onFocus: t[3] || (t[3] = (l) => {
62
+ return c = l, void (o.type === "password" && c.currentTarget.select());
63
+ var c;
64
+ }), onMouseover: t[4] || (t[4] = (l) => A(l)) }), L({ default: u(() => [x(e.$slots, "default", {}, void 0, !0)]), _: 2 }, [e.$attrs.title ? { name: "prepend", fn: u(() => [N("div", { style: T({ ...m.value }), class: "o-input__title" }, I(e.$attrs.title), 5)]), key: "0" } : void 0, e.$slots.prefix ? { name: "prefix", fn: u(() => [x(e.$slots, "prefix", {}, void 0, !0)]), key: "1" } : void 0, e.$slots.suffix ? { name: "suffix", fn: u(() => [x(e.$slots, "suffix", {}, void 0, !0)]), key: "2" } : void 0, e.$slots.append ? { name: "append", fn: u(() => [x(e.$slots, "append", {}, void 0, !0)]), key: "3" } : void 0, e.$slots.prepend ? { name: "prepend", fn: u(() => [x(e.$slots, "prepend", {}, void 0, !0)]), key: "4" } : void 0]), 1040, ["modelValue", "placeholder", "showPassword", "class", "maxlength", "show-word-limit"]))])]), _: 3 }, 16, ["content", "disabled"]), r.content ? (w(), C(y(D), b({ key: 0, class: "o-input__icon" }, { name: "warning", color: "#DCDEE0", size: "16px", ...a.iconAttrs }, { content: r.content }), null, 16, ["content"])) : P("", !0), e.$attrs.type === "textarea" && y(n) && e.$attrs.disabled !== !0 && e.$attrs.disabled !== "" ? (w(), C(y(D), { key: 1, name: "circle-close", class: "o-input__clear", onClick: O })) : P("", !0)], 16);
65
+ };
66
+ } }), [["__scopeId", "data-v-1cf0b7d9"]]));
67
+ export {
68
+ te as default
69
+ };
@@ -0,0 +1,77 @@
1
+ import { defineComponent as N, withDirectives as z, h as E, inject as H, createElementBlock as m, unref as n, openBlock as a, Fragment as v, createElementVNode as x, renderList as B, createBlock as $, createVNode as O, useSlots as U, provide as X, computed as q, normalizeClass as C, createCommentVNode as Y, renderSlot as F, createTextVNode as L, toDisplayString as P, useCssVars as Z, mergeProps as ee, withCtx as j } from "vue";
2
+ import { g as le, a as I, u as J, b as te, c as R, d as ae, e as K, f as se, h as ne, j as re, k as oe, l as ie, p as ce, _ as de, w as pe } from "./index-oKZkmdJE.js";
3
+ import G from "./index-C5trOMLF.js";
4
+ const T = Symbol("elDescriptions");
5
+ var A = N({ name: "ElDescriptionsCell", props: { cell: { type: Object }, tag: { type: String, default: "td" }, type: { type: String } }, setup: () => ({ descriptions: H(T, {}) }), render() {
6
+ var g;
7
+ const l = le(this.cell), s = (((g = this.cell) == null ? void 0 : g.dirs) || []).map((b) => {
8
+ const { dir: i, arg: c, modifiers: V, value: S } = b;
9
+ return [i, S, c, V];
10
+ }), { border: k, direction: t } = this.descriptions, r = t === "vertical", o = () => {
11
+ var b, i, c;
12
+ return ((c = (i = (b = this.cell) == null ? void 0 : b.children) == null ? void 0 : i.label) == null ? void 0 : c.call(i)) || l.label;
13
+ }, W = () => {
14
+ var b, i, c;
15
+ return (c = (i = (b = this.cell) == null ? void 0 : b.children) == null ? void 0 : i.default) == null ? void 0 : c.call(i);
16
+ }, e = l.span, y = l.rowspan, d = l.align ? `is-${l.align}` : "", p = l.labelAlign ? `is-${l.labelAlign}` : d, D = l.className, h = l.labelClassName, f = this.type === "label" && (l.labelWidth || this.descriptions.labelWidth) || l.width, w = { width: I(f), minWidth: I(l.minWidth) }, u = J("descriptions");
17
+ switch (this.type) {
18
+ case "label":
19
+ return z(E(this.tag, { style: w, class: [u.e("cell"), u.e("label"), u.is("bordered-label", k), u.is("vertical-label", r), p, h], colSpan: r ? e : 1, rowspan: r ? 1 : y }, o()), s);
20
+ case "content":
21
+ return z(E(this.tag, { style: w, class: [u.e("cell"), u.e("content"), u.is("bordered-content", k), u.is("vertical-content", r), d, D], colSpan: r ? e : 2 * e - 1, rowspan: r ? 2 * y - 1 : y }, W()), s);
22
+ default: {
23
+ const b = o(), i = {}, c = I(l.labelWidth || this.descriptions.labelWidth);
24
+ return c && (i.width = c, i.display = "inline-block"), z(E("td", { style: w, class: [u.e("cell"), d], colSpan: e, rowspan: y }, [te(b) ? void 0 : E("span", { style: i, class: [u.e("label"), h] }, b), E("span", { class: [u.e("content"), D] }, W())]), s);
25
+ }
26
+ }
27
+ } });
28
+ const ue = R({ row: { type: ae(Array), default: () => [] } }), ye = N({ name: "ElDescriptionsRow" });
29
+ var be = K(N({ ...ye, props: ue, setup(g) {
30
+ const l = H(T, {});
31
+ return (s, k) => n(l).direction === "vertical" ? (a(), m(v, { key: 0 }, [x("tr", null, [(a(!0), m(v, null, B(s.row, (t, r) => (a(), $(n(A), { key: `tr1-${r}`, cell: t, tag: "th", type: "label" }, null, 8, ["cell"]))), 128))]), x("tr", null, [(a(!0), m(v, null, B(s.row, (t, r) => (a(), $(n(A), { key: `tr2-${r}`, cell: t, tag: "td", type: "content" }, null, 8, ["cell"]))), 128))])], 64)) : (a(), m("tr", { key: 1 }, [(a(!0), m(v, null, B(s.row, (t, r) => (a(), m(v, { key: `tr3-${r}` }, [n(l).border ? (a(), m(v, { key: 0 }, [O(n(A), { cell: t, tag: "td", type: "label" }, null, 8, ["cell"]), O(n(A), { cell: t, tag: "td", type: "content" }, null, 8, ["cell"])], 64)) : (a(), $(n(A), { key: 1, cell: t, tag: "td", type: "both" }, null, 8, ["cell"]))], 64))), 128))]));
32
+ } }), [["__file", "descriptions-row.vue"]]);
33
+ const me = R({ border: Boolean, column: { type: Number, default: 3 }, direction: { type: String, values: ["horizontal", "vertical"], default: "horizontal" }, size: se, title: { type: String, default: "" }, extra: { type: String, default: "" }, labelWidth: { type: [String, Number], default: "" } }), M = "ElDescriptionsItem", he = N({ name: "ElDescriptions" });
34
+ var fe = K(N({ ...he, props: me, setup(g) {
35
+ const l = g, s = J("descriptions"), k = ne(), t = U();
36
+ X(T, l);
37
+ const r = q(() => [s.b(), s.m(k.value)]), o = (e, y, d, p = !1) => (e.props || (e.props = {}), y > d && (e.props.span = d), p && (e.props.span = y), e), W = () => {
38
+ if (!t.default)
39
+ return [];
40
+ const e = re(t.default()).filter((f) => {
41
+ var w;
42
+ return ((w = f == null ? void 0 : f.type) == null ? void 0 : w.name) === M;
43
+ }), y = [];
44
+ let d = [], p = l.column, D = 0;
45
+ const h = [];
46
+ return e.forEach((f, w) => {
47
+ var u, b, i;
48
+ const c = ((u = f.props) == null ? void 0 : u.span) || 1, V = ((b = f.props) == null ? void 0 : b.rowspan) || 1, S = y.length;
49
+ if (h[S] || (h[S] = 0), V > 1)
50
+ for (let _ = 1; _ < V; _++)
51
+ h[i = S + _] || (h[i] = 0), h[S + _]++, D++;
52
+ if (h[S] > 0 && (p -= h[S], h[S] = 0), w < e.length - 1 && (D += c > p ? p : c), w === e.length - 1) {
53
+ const _ = l.column - D % l.column;
54
+ return d.push(o(f, _, p, !0)), void y.push(d);
55
+ }
56
+ c < p ? (p -= c, d.push(f)) : (d.push(o(f, c, p)), y.push(d), p = l.column, d = []);
57
+ }), y;
58
+ };
59
+ return (e, y) => (a(), m("div", { class: C(n(r)) }, [e.title || e.extra || e.$slots.title || e.$slots.extra ? (a(), m("div", { key: 0, class: C(n(s).e("header")) }, [x("div", { class: C(n(s).e("title")) }, [F(e.$slots, "title", {}, () => [L(P(e.title), 1)])], 2), x("div", { class: C(n(s).e("extra")) }, [F(e.$slots, "extra", {}, () => [L(P(e.extra), 1)])], 2)], 2)) : Y("v-if", !0), x("div", { class: C(n(s).e("body")) }, [x("table", { class: C([n(s).e("table"), n(s).is("bordered", e.border)]) }, [x("tbody", null, [(a(!0), m(v, null, B(W(), (d, p) => (a(), $(be, { key: p, row: d }, null, 8, ["row"]))), 128))])], 2)], 2)], 2));
60
+ } }), [["__file", "description.vue"]]);
61
+ const ve = R({ label: { type: String, default: "" }, span: { type: Number, default: 1 }, rowspan: { type: Number, default: 1 }, width: { type: [String, Number], default: "" }, minWidth: { type: [String, Number], default: "" }, labelWidth: { type: [String, Number], default: "" }, align: { type: String, default: "left" }, labelAlign: { type: String, default: "" }, className: { type: String, default: "" }, labelClassName: { type: String, default: "" } }), Q = N({ name: M, props: ve }), ge = oe(fe, { DescriptionsItem: Q }), we = ie(Q), Se = N({ name: "ODescription" }), xe = pe(de(N({ ...Se, props: { options: { type: Array, required: !0 }, column: { type: Number, default: 3 }, labelWidth: { type: String, default: "" }, showAll: { type: Boolean, default: !1 } }, setup(g) {
62
+ Z((t) => ({ f1d9efd0: s.value, "4e3d7188": k.value }));
63
+ const l = g, s = q(() => {
64
+ let t = 1;
65
+ return (l.options ?? []).forEach((r) => {
66
+ let o = r.label.length;
67
+ o > t && (t = o);
68
+ }), l.labelWidth ? ce(l.labelWidth, !0) : 12 * t + "px";
69
+ }), k = q(() => l.column);
70
+ return (t, r) => (a(), $(n(ge), ee({ border: !0, ...t.$attrs }, { column: k.value, class: "o-description" }), { default: j(() => [(a(!0), m(v, null, B(g.options, (o, W) => (a(), $(n(we), { key: W }, { label: j(() => [O(n(G), { content: o.label }, null, 8, ["content"])]), default: j(() => {
71
+ return [o.slotName ? F(t.$slots, o.slotName, { key: 0, item: o, label: o.label, value: o.value, index: W }, void 0, !0) : (a(), m(v, { key: 1 }, [g.showAll ? (a(), m(v, { key: 0 }, [L(P(o.value), 1)], 64)) : (a(), $(n(G), { key: 1, class: "w-100%", content: (e = o.value, typeof e == "function" ? e() : e) }, null, 8, ["content"]))], 64))];
72
+ var e;
73
+ }), _: 2 }, 1024))), 128))]), _: 3 }, 16, ["column"]));
74
+ } }), [["__scopeId", "data-v-eee7bd51"]]));
75
+ export {
76
+ xe as default
77
+ };
@@ -0,0 +1,33 @@
1
+ import { defineComponent as x, ref as i, watch as $, computed as j, resolveComponent as b, createElementBlock as y, openBlock as c, createBlock as h, createCommentVNode as A, createVNode as B, mergeProps as r, withCtx as m, createTextVNode as k, renderSlot as V, Fragment as O, renderList as F, resolveDynamicComponent as N, normalizeProps as P, guardReactiveProps as T, toDisplayString as U } from "vue";
2
+ import { i as g, _ as z, w as E } from "./index-oKZkmdJE.js";
3
+ const I = { class: "checkbox" }, R = x({ name: "OCheckbox" }), H = E(z(x({ ...R, props: { type: { type: String, default: "" }, options: { type: Object, default: () => [] }, showType: { type: String, validator: (u) => ["check", "button"].includes(u), default: "check" }, modelValue: { type: Array, defalut: () => [] }, label: { type: String, default: "label" }, value: { type: String, default: "value" }, showAll: { type: Boolean, default: !0 }, attrs: { type: Object, default: () => {
4
+ } }, customDisabled: { type: Function, default: () => {
5
+ } }, customLabel: { type: [Function, String], default: "" } }, emits: ["update:modelValue"], setup(u, { emit: w }) {
6
+ const e = u, o = i(!1), s = i(!1), v = i([]);
7
+ $(() => e.modelValue, (a) => {
8
+ let l = [];
9
+ l = g(a) || typeof a != "object" ? [] : a.filter((d) => e.options.some((n) => e.type === "simple" ? n === d : n[e.value])), g(l) ? (s.value = !1, o.value = !1) : l.length === e.options.length ? (s.value = !1, o.value = !0) : (s.value = !0, o.value = !1);
10
+ }, { deep: !0, immediate: !0 });
11
+ const C = w;
12
+ function S() {
13
+ const a = e.options.map((l) => e.type === "simple" ? l : l[e.value]);
14
+ s.value || o.value === !1 && s.value === !0 || o.value === !0 && s.value === !1 ? p(a) : o.value === !1 && s.value === !1 && p([]);
15
+ }
16
+ const _ = j(() => ({ check: "el-checkbox", button: "el-checkbox-button" })[e.showType] ?? "el-checkbox");
17
+ function D(a, l) {
18
+ p(a);
19
+ }
20
+ function p(a) {
21
+ v.value = a, C("update:modelValue", v.value);
22
+ }
23
+ function L(a, l) {
24
+ return typeof e.customLabel == "function" ? e.customLabel(a, l) : e.type === "simple" ? a : a[e.label];
25
+ }
26
+ return (a, l) => {
27
+ const d = b("el-checkbox"), n = b("el-checkbox-group");
28
+ return c(), y("div", I, [u.showAll ? (c(), h(d, r({ key: 0, modelValue: o.value, "onUpdate:modelValue": l[0] || (l[0] = (t) => o.value = t), class: "checkbox__all", indeterminate: s.value, onChange: S }, a.$attrs), { default: m(() => [k(" 全选 ")]), _: 1 }, 16, ["modelValue", "indeterminate"])) : A("", !0), B(n, r({ modelValue: e.modelValue, "onUpdate:modelValue": l[1] || (l[1] = (t) => e.modelValue = t), onChange: D }, a.$attrs), { default: m(() => [V(a.$slots, "default", {}, () => [(c(!0), y(O, null, F(e.options, (t, f) => (c(), h(N(_.value), r(u.attrs, { key: f, value: e.type === "simple" ? t : t[e.value], label: e.type === "simple" ? t : t[e.label], disabled: e.customDisabled(t) }), { default: m(() => [V(a.$slots, e.type === "simple" ? t : t.slot, P(T(e.type === "simple" ? {} : t)), () => [k(U(L(t, f)), 1)], !0)]), _: 2 }, 1040, ["value", "label", "disabled"]))), 128))], !0)]), _: 3 }, 16, ["modelValue"])]);
29
+ };
30
+ } }), [["__scopeId", "data-v-e6ef015c"]]));
31
+ export {
32
+ H as default
33
+ };
@@ -0,0 +1,22 @@
1
+ import { defineComponent as p, computed as g, resolveComponent as c, createBlock as a, openBlock as n, normalizeClass as k, withCtx as r, createVNode as _, mergeProps as i, createElementVNode as C, unref as d, resolveDynamicComponent as z } from "vue";
2
+ import { O, t as m, _ as S, E as $ } from "./index-oKZkmdJE.js";
3
+ const j = { ref: "contentRef" }, x = p({ name: "OIcon" }), B = p({ ...x, props: { name: { type: String, required: !0 }, color: { type: String }, size: { type: [String, Number], default: "16px" }, disabled: { type: Boolean, default: !1 }, type: { type: String, default: "" }, svgAttrs: { type: Object, default: () => ({}) } }, emits: ["click"], setup(t, { emit: o }) {
4
+ const e = t, f = o;
5
+ function u(s) {
6
+ e.disabled || f("click", s);
7
+ }
8
+ const b = g(() => e.disabled ? "#c8c9cc" : e.color);
9
+ return (s, N) => {
10
+ const v = c("el-tooltip"), y = c("el-icon");
11
+ return n(), a(y, { color: b.value, "props.disabled": "", size: e.size, class: k(["o-icon", e.disabled && "o-icon__not-allowed"]), onClick: u }, { default: r(() => [_(v, i({ disabled: !s.$attrs.content }, s.$attrs), { default: r(() => [C("span", j, [t.type === "svg" ? (n(), a(d(O), i({ key: 0 }, t.svgAttrs, { name: t.name }), null, 16, ["name"])) : (n(), a(z(`el-icon-${d(m)(e.name)}`), { key: 1 }))], 512)]), _: 1 }, 16, ["disabled"])]), _: 1 }, 8, ["color", "size", "class"]);
12
+ };
13
+ } }), E = ((l = S(B, [["__scopeId", "data-v-8bfad049"]])).install = (t) => {
14
+ for (const o of [l, ...Object.values({})])
15
+ t.component(o.name, o);
16
+ for (const [o, e] of Object.entries($))
17
+ t.component(`el-icon-${m(o)}`, e);
18
+ }, l);
19
+ var l;
20
+ export {
21
+ E as default
22
+ };