oeos-components 0.2.21 → 0.2.23

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,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-Pgb7joEc.js";
3
+ import U from "./index-NXvTgPcC.js";
4
+ import E from "./index-DmTxRLqL.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,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-Pgb7joEc.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,68 @@
1
+ import { getCurrentInstance as J, ref as j, watch as B, nextTick as M, computed as x, defineComponent as G, useAttrs as U, resolveComponent as V, createElementBlock as q, openBlock as h, mergeProps as w, createVNode as F, createBlock as C, createCommentVNode as E, unref as O, withCtx as u, createElementVNode as W, isRef as L, createSlots as T, normalizeStyle as I, toDisplayString as z, renderSlot as b } from "vue";
2
+ import { m as R, p as D, _ as H, w as K } from "./index-Pgb7joEc.js";
3
+ function Q(n, o, a, y = {}) {
4
+ var f, r, $;
5
+ const { clone: v = !1, passive: g = !1, eventName: k, deep: A = !1, defaultValue: N, shouldEmit: S } = y, i = J(), _ = (i == null ? void 0 : i.emit) || ((f = i == null ? void 0 : i.$emit) == null ? void 0 : f.bind(i)) || (($ = (r = i == null ? void 0 : i.proxy) == null ? void 0 : r.$emit) == null ? void 0 : $.bind(i == null ? void 0 : i.proxy));
6
+ let p = k;
7
+ o || (o = "modelValue"), p = p || `update:${o.toString()}`;
8
+ const e = (s) => {
9
+ return v ? typeof v == "function" ? v(s) : (d = s, JSON.parse(JSON.stringify(d))) : s;
10
+ var d;
11
+ }, t = () => n[o] !== void 0 ? e(n[o]) : N, m = (s) => {
12
+ S ? S(s) && _(p, s) : _(p, s);
13
+ };
14
+ if (g) {
15
+ const s = t(), d = j(s);
16
+ let c = !1;
17
+ return B(() => n[o], (l) => {
18
+ c || (c = !0, d.value = e(l), M(() => c = !1));
19
+ }), B(d, (l) => {
20
+ c || l === n[o] && !A || m(l);
21
+ }, { deep: A }), d;
22
+ }
23
+ return x({ get: () => t(), set(s) {
24
+ m(s);
25
+ } });
26
+ }
27
+ const X = G({ name: "OInput" }), ee = K(H(G({ ...X, props: { modelValue: { required: !0 }, titleAttrs: { type: Object, default: () => {
28
+ } }, 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(n) {
29
+ const o = U(), a = n, y = j([]), f = j(!0), r = Q(a), $ = x(() => o.type === "textarea" ? o.maxlength || 1e3 : o.maxlength || "");
30
+ B(() => a.options, (e) => {
31
+ e && (y.value = e.map((t) => R(t) === "object" ? t : { value: t }));
32
+ }, { deep: !0, immediate: !0 });
33
+ const v = x(() => {
34
+ var e;
35
+ if ((e = a.titleAttrs) != null && e.width) {
36
+ let t = parseInt(a.titleAttrs.width) - 8 + "px";
37
+ return { ...a.titleAttrs, width: D(t, !0) };
38
+ }
39
+ return a.titleAttrs;
40
+ });
41
+ function g() {
42
+ return o.disabled === "" || o.disabled ? a.disPlaceholder : o.placeholder || "请输入";
43
+ }
44
+ function k(e) {
45
+ const t = e.target;
46
+ t.offsetWidth + 4 < t.scrollWidth ? f.value = !1 : f.value = !0;
47
+ }
48
+ const A = () => {
49
+ if (!a.width)
50
+ return {};
51
+ let e = D(a.width, !0);
52
+ return a.content && e && (e = `calc(${e} - 32px)`), { width: e };
53
+ }, N = () => {
54
+ r.value = "";
55
+ }, S = x(() => o.type === "password" && o.showPassword !== !1), i = (e, t) => {
56
+ t(e ? y.value.filter(_(e)) : y.value);
57
+ }, _ = (e) => (t) => t.value.toLowerCase().indexOf(e.toLowerCase()) === 0, p = x(() => ({ resize: "none", rows: 2, clearable: !0, ...Object.entries(o).reduce((e, [t, m]) => (t !== "class" && t !== "style" && (e[t] = m), e), {}) }));
58
+ return (e, t) => {
59
+ const m = V("el-autocomplete"), s = V("el-input"), d = V("el-tooltip"), c = V("o-icon");
60
+ return h(), q("div", w({ class: "o-input" }, n.subAttrs, { style: { ...A() } }), [F(d, w({ content: "" + O(r), disabled: f.value || n.hideTooltip }, n.tooltipAttrs), { default: u(() => [W("div", null, [a.options ? (h(), C(m, w({ key: 0, modelValue: O(r), "onUpdate:modelValue": t[0] || (t[0] = (l) => L(r) ? r.value = l : null), "fetch-suggestions": i, placeholder: g(), clearable: e.$attrs.clearable !== !1, onMouseover: t[1] || (t[1] = (l) => k(l)) }, p.value), T({ _: 2 }, [e.$attrs.title ? { name: "prepend", fn: u(() => [W("div", { style: I({ ...v.value }), class: "o-input__title" }, z(e.$attrs.title), 5)]), key: "0" } : void 0]), 1040, ["modelValue", "placeholder", "clearable"])) : (h(), C(s, w({ key: 1, modelValue: O(r), "onUpdate:modelValue": t[2] || (t[2] = (l) => L(r) ? r.value = l : null), placeholder: g(), class: ["kd-ipt", { "kd-textarea": e.$attrs.type === "textarea" }], showPassword: S.value, maxlength: $.value }, p.value, { "show-word-limit": typeof a.showWordLimit == "boolean" ? a.showWordLimit : o.type === "textarea", onFocus: t[3] || (t[3] = (l) => {
61
+ return P = l, void (o.type === "password" && P.currentTarget.select());
62
+ var P;
63
+ }), onMouseover: t[4] || (t[4] = (l) => k(l)) }), T({ default: u(() => [b(e.$slots, "default", {}, void 0, !0)]), _: 2 }, [e.$attrs.title ? { name: "prepend", fn: u(() => [W("div", { style: I({ ...v.value }), class: "o-input__title" }, z(e.$attrs.title), 5)]), key: "0" } : void 0, e.$slots.prefix ? { name: "prefix", fn: u(() => [b(e.$slots, "prefix", {}, void 0, !0)]), key: "1" } : void 0, e.$slots.suffix ? { name: "suffix", fn: u(() => [b(e.$slots, "suffix", {}, void 0, !0)]), key: "2" } : void 0, e.$slots.append ? { name: "append", fn: u(() => [b(e.$slots, "append", {}, void 0, !0)]), key: "3" } : void 0, e.$slots.prepend ? { name: "prepend", fn: u(() => [b(e.$slots, "prepend", {}, void 0, !0)]), key: "4" } : void 0]), 1040, ["modelValue", "placeholder", "showPassword", "class", "maxlength", "show-word-limit"]))])]), _: 3 }, 16, ["content", "disabled"]), n.content ? (h(), C(c, w({ key: 0, class: "o-input__icon" }, { name: "warning", color: "#DCDEE0", size: "16px", ...a.iconAttrs }, { content: n.content }), null, 16, ["content"])) : E("", !0), e.$attrs.type === "textarea" && O(r) && e.$attrs.disabled !== !0 && e.$attrs.disabled !== "" ? (h(), C(c, { key: 1, name: "circle-close", class: "o-input__clear", onClick: N })) : E("", !0)], 16);
64
+ };
65
+ } }), [["__scopeId", "data-v-fa217d2f"]]));
66
+ export {
67
+ ee as default
68
+ };
@@ -0,0 +1,19 @@
1
+ import { defineComponent as u, useSlots as m, ref as p, onMounted as d, h as v, resolveComponent as C, createBlock as g, openBlock as h, mergeProps as y, withModifiers as x, withCtx as b, renderSlot as P } from "vue";
2
+ import { q as i, w as k } from "./index-Pgb7joEc.js";
3
+ const w = u({ name: "OText" }), $ = k(u({ ...w, props: { lineClamp: { type: [String, Number] }, tippyProps: { type: Object, default: () => ({}) } }, setup(a) {
4
+ const s = a, o = m(), n = p(), l = p(), r = () => ({ content: v(o.content || o.default), ...s.tippyProps });
5
+ function c(e) {
6
+ var t;
7
+ t = e.target, (s.lineClamp ? t.scrollHeight > t.clientHeight : t.scrollWidth > t.clientWidth) ? (l.value.setProps(r()), l.value.enable()) : l.value.disable();
8
+ }
9
+ return d(() => {
10
+ var e;
11
+ console.log("89 useTippy", i), l.value = i((e = n.value) == null ? void 0 : e.$el, r());
12
+ }), (e, t) => {
13
+ const f = C("el-text");
14
+ return h(), g(f, y({ truncated: !a.lineClamp, lineClamp: a.lineClamp, ...e.$attrs }, { ref_key: "textRef", ref: n, onMouseover: x(c, ["self"]) }), { default: b(() => [P(e.$slots, "default")]), _: 3 }, 16);
15
+ };
16
+ } }));
17
+ export {
18
+ $ as default
19
+ };
@@ -0,0 +1,50 @@
1
+ import { defineComponent as m, useAttrs as p, computed as l, resolveComponent as d, createElementBlock as T, openBlock as v, normalizeStyle as x, createVNode as D, unref as i, mergeProps as h } from "vue";
2
+ import { p as f, _ as Y, w as y } from "./index-Pgb7joEc.js";
3
+ import M from "./index-l1_Vs-iC.js";
4
+ const S = m({ name: "ODateRange" }), z = y(Y(m({ ...S, props: { title: { type: String, default: "" }, width: { type: [String, Number], default: "300px" } }, setup(u) {
5
+ const r = p(), s = u, n = 864e5, w = l(() => o.value.type === "daterange" || o.value.type === "datetimerange" ? [{ text: "今天", value: () => {
6
+ const e = new Date((/* @__PURE__ */ new Date()).toLocaleDateString()).getTime();
7
+ return [new Date(e), new Date(e + n - 1)];
8
+ } }, { text: "昨天", value: () => [new Date(new Date((/* @__PURE__ */ new Date()).toLocaleDateString()).getTime() - n), new Date(new Date((/* @__PURE__ */ new Date()).toLocaleDateString()).getTime() - 1)] }, { text: "最近7天", value: () => {
9
+ const e = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
10
+ return t.setTime(t.getTime() - 5184e5), [t, e];
11
+ } }, { text: "本周", value: () => {
12
+ const e = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date(), a = t.getDay() || 7;
13
+ return t.setTime(t.getTime() - 864e5 * (a - 1)), [t, e];
14
+ } }, { text: "上周", value: () => {
15
+ const e = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date(), a = t.getDay() || 7;
16
+ return console.log("63 nows", a), t.setTime(t.getTime() - 864e5 * (a - 1 + 7)), e.setTime(e.getTime() - 864e5 * a), [t, e];
17
+ } }, { text: "本月", value: () => {
18
+ (/* @__PURE__ */ new Date()).getTime(), (/* @__PURE__ */ new Date()).getDate();
19
+ const e = /* @__PURE__ */ new Date();
20
+ return [new Date(new Date((/* @__PURE__ */ new Date()).toLocaleDateString()).setDate(1)), e];
21
+ } }, { text: "上月", value: () => {
22
+ const e = /* @__PURE__ */ new Date(), t = new Date(e);
23
+ return t.setMonth(e.getMonth()), e.setMonth(e.getMonth() - 1), t.setDate(0), e.setDate(1), [e, t];
24
+ } }, { text: "最近30天", value: () => {
25
+ const e = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
26
+ return t.setTime(t.getTime() - 2592e6), [t, e];
27
+ } }, { text: "最近90天", value: () => {
28
+ const e = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
29
+ return t.setTime(t.getTime() - 7776e6), [t, e];
30
+ } }, { text: "最近1年", value: () => {
31
+ const e = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
32
+ return t.setTime(t.getTime() - 31536e6), [t, e];
33
+ } }, { text: "一月以前30天", value: () => [new Date(new Date((/* @__PURE__ */ new Date()).toLocaleDateString()).getTime() - 60 * n), new Date(new Date((/* @__PURE__ */ new Date()).toLocaleDateString()).getTime() - 30 * n)] }] : [{ text: "今天", value: /* @__PURE__ */ new Date() }, { text: "昨天", value: () => {
34
+ const e = /* @__PURE__ */ new Date();
35
+ return e.setTime(e.getTime() - 864e5), e;
36
+ } }, { text: "一周前", value: () => {
37
+ const e = /* @__PURE__ */ new Date();
38
+ return e.setTime(e.getTime() - 6048e5), e;
39
+ } }]), c = () => s.width ? { width: f(s.width, !0) } : {}, o = l(() => {
40
+ const e = { "value-format": "YYYY-MM-DD HH:mm:ss", format: r.type !== "datetime" ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm:ss", type: "daterange", placeholder: "请选择日期", "start-placeholder": "开始日期", "end-placeholder": "结束日期", "range-separator": "-", ...Object.entries(r).reduce((t, [a, g]) => (a !== "class" && a !== "style" && (t[a] = g), t), {}) };
41
+ return console.log("66 merged", e), e;
42
+ });
43
+ return (e, t) => {
44
+ const a = d("el-date-picker");
45
+ return v(), T("span", { class: "o-date-range", style: x({ ...c() }) }, [D(i(M), { title: s.title, size: i(r).size, titleAttrs: e.$attrs.titleAttrs ?? {} }, null, 8, ["title", "size", "titleAttrs"]), D(a, h({ shortcuts: w.value }, o.value, { class: "o-date-range__picker" }), null, 16, ["shortcuts"])], 4);
46
+ };
47
+ } }), [["__scopeId", "data-v-f01c46a3"]]));
48
+ export {
49
+ z as default
50
+ };
@@ -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-Pgb7joEc.js";
3
+ import G from "./index-DmTxRLqL.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,27 @@
1
+ import { defineComponent as y, ref as g, resolveComponent as p, createElementBlock as f, openBlock as m, createVNode as a, mergeProps as $, withCtx as n, renderSlot as i, createElementVNode as u, toDisplayString as x, createTextVNode as v, onMounted as N } from "vue";
2
+ import { _ as B, w as E } from "./index-Pgb7joEc.js";
3
+ const V = { key: 0 }, q = { class: "o-popconfirm__content" }, z = { class: "o-popconfirm__footer" }, P = y({ name: "OPopconfirm" }), L = E(B(y({ ...P, props: { title: { type: String, default: "删除" }, width: { type: [String, Number], default: 200 }, content: { type: String, required: !0 }, reConfirm: { type: Boolean, default: !0 } }, emits: ["confirm", "cancel"], setup(t, { expose: _, emit: k }) {
4
+ const s = g(!1), C = () => {
5
+ N(() => {
6
+ document.addEventListener("click", b);
7
+ });
8
+ }, b = (e) => {
9
+ document.querySelector(".el-popover").contains(e.target) || o();
10
+ }, r = k;
11
+ function l() {
12
+ o(), r("confirm");
13
+ }
14
+ function o() {
15
+ s.value = !1;
16
+ }
17
+ function w() {
18
+ o(), r("cancel");
19
+ }
20
+ return _({ close: o }), (e, c) => {
21
+ const d = p("el-button"), S = p("el-popover");
22
+ return t.reConfirm ? (m(), f("div", V, [a(S, $({ class: "o-popconfirm", title: t.title, width: t.width }, e.$attrs, { onShow: C, visible: s.value, "onUpdate:visible": c[0] || (c[0] = (h) => s.value = h) }), { reference: n(() => [i(e.$slots, "default", {}, void 0, !0)]), default: n(() => [i(e.$slots, "content", {}, () => [u("div", q, x(t.content), 1)], !0), u("div", z, [i(e.$slots, "footer", {}, () => [a(d, { size: "small", type: "info", onClick: w }, { default: n(() => [v("取消")]), _: 1 }), a(d, { size: "small", type: "primary", onClick: l }, { default: n(() => [v("确定")]), _: 1 })], !0)])]), _: 3 }, 16, ["title", "width", "visible"])])) : (m(), f("div", { key: 1, onClick: l }, [i(e.$slots, "default", {}, void 0, !0)]));
23
+ };
24
+ } }), [["__scopeId", "data-v-10b276e7"]]));
25
+ export {
26
+ L as default
27
+ };
@@ -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-Pgb7joEc.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,25 @@
1
+ import { defineComponent as h, useAttrs as O, computed as _, resolveComponent as c, createElementBlock as C, openBlock as l, createVNode as w, mergeProps as d, withCtx as s, createElementVNode as y, createCommentVNode as i, renderSlot as p, createBlock as b, createTextVNode as f, toDisplayString as u, unref as z } from "vue";
2
+ import { _ as g, w as V } from "./index-Pgb7joEc.js";
3
+ const S = { class: "o-drawer" }, j = { class: "drawer-main" }, N = { class: "content" }, $ = { key: 0, class: "kd-drawer-footer" }, D = h({ name: "ODrawer" }), P = V(g(h({ ...D, props: { confirmText: { type: String, default: "提交" }, cancelText: { type: String, default: "取消" }, showFooter: { type: Boolean, default: !0 }, showConfirm: { type: Boolean, default: !0 }, showCancel: { type: Boolean, default: !0 }, wrapperClosable: { type: Boolean, default: !0 }, confirmAttrs: { type: Object, default: () => ({}) }, cancelAttrs: { type: Object, default: () => ({}) }, detailAttrs: { type: Object, default: () => {
4
+ } }, type: { type: String, default: "" } }, emits: ["update:modelValue"], setup(e, { emit: v }) {
5
+ const k = v, o = e, a = O(), r = _(() => {
6
+ let t = { size: a.size || 640, confirmText: o.confirmText, showCancel: o.showCancel, wrapperClosable: o.wrapperClosable, destroyOnClose: !0 };
7
+ return o.type === "detail" && (t = Object.assign({ size: 400, confirmText: "关闭", showCancel: !1, wrapperClosable: !0, destroyOnClose: !0 }, o.detailAttrs)), t;
8
+ });
9
+ function A() {
10
+ a.onConfirm ? a.onConfirm() : n();
11
+ }
12
+ function x() {
13
+ a.onCancel ? a.onCancel() : n();
14
+ }
15
+ function n() {
16
+ k("update:modelValue", !1);
17
+ }
18
+ return (t, E) => {
19
+ const T = c("el-scrollbar"), m = c("el-button"), B = c("el-drawer");
20
+ return l(), C("div", S, [w(B, d({ "wrapper-closable": r.value.wrapperClosable, "destroy-on-close": r.value.wrapperClosable !== !1, "with-header": !0, size: r.value.size }, t.$attrs, { onClose: n }), { header: s(() => [p(t.$slots, "header", {}, () => [f(u(z(a).title), 1)], !0)]), default: s(() => [y("div", j, [w(T, { class: "drawer-scrollbar" }, { default: s(() => [y("div", N, [p(t.$slots, "default", {}, void 0, !0)])]), _: 3 })]), e.showFooter ? (l(), C("div", $, [p(t.$slots, "footer", {}, () => [e.showConfirm ? (l(), b(m, d({ key: 0, id: "kdDrawerConfirmBtn", type: e.confirmAttrs.type || "primary" }, e.confirmAttrs, { class: "mr", onClick: A }), { default: s(() => [f(u(r.value.confirmText), 1)]), _: 1 }, 16, ["type"])) : i("", !0), r.value.showCancel ? (l(), b(m, d({ key: 1, type: e.cancelAttrs.type || "info" }, e.cancelAttrs, { onClick: x }), { default: s(() => [f(u(e.cancelText), 1)]), _: 1 }, 16, ["type"])) : i("", !0)], !0)])) : i("", !0)]), _: 3 }, 16, ["wrapper-closable", "destroy-on-close", "size"])]);
21
+ };
22
+ } }), [["__scopeId", "data-v-d9b92024"]]));
23
+ export {
24
+ P as default
25
+ };
@@ -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-Pgb7joEc.js";
3
+ import ue from "./index-l1_Vs-iC.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,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-Pgb7joEc.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,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-Pgb7joEc.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,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-Pgb7joEc.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,10 @@
1
+ import { defineComponent as s, computed as l, createElementBlock as a, openBlock as n, mergeProps as A, unref as r, createBlock as i, renderSlot as g, createElementVNode as p } from "vue";
2
+ import m from "./index-NXvTgPcC.js";
3
+ import { p as y, _ as b, w as d } from "./index-Pgb7joEc.js";
4
+ const h = { key: 0, src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAqJJREFUWEftl0tPE2EUht/TGW90oKWlJhqXeI0ujIQF0b9gXIhJt0oKM1VD2Lhi5cqNIQpTWi9bEnFh/AsaFo3GhXdhqya0UyhM8UJnjk5bDHTaudQqG77dZM457zPvOedLhrDNh7ZZHzsAOw607MCi0tUrsnEPBBYgJELqykIrA90ygCZLN0G4URFl3Iqm9PH/BqANSycg4CWAvTXR7zBwJprW3/mF8O3AlwQ69ojBOwBd2SrGD36US9cPZrDmB8I3QEEJxhmUAhCqEyoSWI6opZl/BsCDEAr7g3Ng6m8oQpyNLJYGaBaGVwjPDlTEY8GrAE04F+fRSK406RXCM0BO7jxKxDMEnLYACFgA8/0KDNEQA73VhcArZorHUqsfvbjgGUBLSmkwEpuKPjfL5iXrOSAGHgE4++cdIROd0ofbBpBXpOMEZAFIngAAnYH+HlV/7wbh6sCyHOo2yXjIwIW6Ys0dqLboSYCFy+FUcckJwhVAU6SLAKxe16+dIwCAIoChqKo/bhlAuxbpgvHzBYDDtiLEWRMsV2bAuhcar+Y8hN190buFlWYQjg7kZSlJhMkmyasAPtXeHQHQ2SiOgGRE1VXfALnhUJ8gGDMb6+U2TA4CC4YhxGPpouWk3chmiXmla4pgjlQcbnzmwTxduwesOHubqnkmIzDdo64kPQNoSucAwM8cxK1abkO4Wc8E6FxUXZ2rh7DNwNJoOGyulzNgDLrY/gGg29UYHgNwzDGeMBvYJSa6J5aXN8fZAAqyNMIEq/C+VvveJO8bMcYiKb3attqxAWiK9BrAyTaLb5R7+/te2FLbBpBXgk8JOAUEXC8pf5CmycCbHrV03tGBXKLjAIniIZjt/WkRmcx1Xv8cy6x9dQTw91V/H91mm/0D7QD8AkUR3SFsA4XSAAAAAElFTkSuQmCC", class: "icon" }, u = s({ name: "OWarning" }), C = d(b(s({ ...u, props: { content: { type: String, required: !0 }, type: { type: String, default: "" }, width: { type: [String, Number], default: "100%" }, dangerouslyUseHTMLString: { type: Boolean, default: !1 } }, setup(e) {
5
+ const t = e, c = l(() => t.dangerouslyUseHTMLString ? { innerHTML: t.content } : { textContent: t.content });
6
+ return (o, E) => (n(), a("div", A({ class: [e.type === "icon" ? "icon-box" : e.type === "info" ? "info-box" : "warning-box", "base-box"], style: { ...r(y)(t.width) } }, o.$attrs), [e.type === "" ? (n(), a("img", h)) : (n(), i(r(m), A({ key: 1, name: "warning", color: "var(--45)" }, o.$attrs, { class: "icon", size: "16" }), null, 16, ["color"])), g(o.$slots, "content", {}, () => [p("span", A({ class: ["warning-box__content", e.type === "icon" && "cl-45 fs-14"] }, c.value), null, 16)], !0)], 16));
7
+ } }), [["__scopeId", "data-v-5146fae0"]]));
8
+ export {
9
+ C as default
10
+ };
@@ -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-BdG9MfHW.js";
3
+ import N from "./index-NXvTgPcC.js";
4
+ import { o as p, $ as v, _ as O, w as L } from "./index-Pgb7joEc.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
+ };