oeos-components 0.2.24 → 0.2.26

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.
@@ -1,25 +0,0 @@
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-Bc1JbUHT.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
- };
@@ -1,18 +0,0 @@
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-Bc1JbUHT.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
- };
@@ -1,25 +0,0 @@
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-Bc1JbUHT.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
- };
@@ -1,13 +0,0 @@
1
- import { defineComponent as n, resolveComponent as d, createBlock as l, openBlock as c, normalizeProps as m, guardReactiveProps as g, withCtx as a, renderSlot as r, createTextVNode as u, toDisplayString as h, createElementVNode as y, normalizeStyle as f, unref as o } from "vue";
2
- import { p as i, n as S, _ as w, w as v } from "./index-Bc1JbUHT.js";
3
- const N = ["src"], _ = n({ name: "OEmpty" }), C = v(w(n({ ..._, props: { description: { type: String, default: "暂无数据" }, width: { type: [String, Number], default: 60 }, height: { type: [String, Number] }, imgAttrs: { type: Object, default: () => {
4
- } }, src: { type: String, default: () => S } }, setup(s) {
5
- const t = s;
6
- return (e, $) => {
7
- const p = d("el-empty");
8
- return c(), l(p, m(g({ ...e.$attrs, ...t })), { image: a(() => [r(e.$slots, "image", {}, () => [y("img", { src: s.src, style: f({ width: o(i)(t.width, !0), height: o(i)(t.height, !0), ...t.imgAttrs }) }, null, 12, N)], !0)]), description: a(() => [r(e.$slots, "description", {}, () => [u(h(s.description), 1)], !0)]), default: a(() => [r(e.$slots, "default", {}, void 0, !0)]), _: 3 }, 16);
9
- };
10
- } }), [["__scopeId", "data-v-73fd1aa7"]]));
11
- export {
12
- C as default
13
- };
@@ -1,52 +0,0 @@
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-6I_N2Hxr.js";
3
- import ht from "./index-DA6a6Ugv.js";
4
- import { m as gt, _ as kt, w as vt } from "./index-Bc1JbUHT.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
- };
@@ -1,12 +0,0 @@
1
- import { defineComponent as l, getCurrentInstance as d, useAttrs as u, computed as i, createElementBlock as h, createCommentVNode as f, openBlock as g, mergeProps as v, toDisplayString as y } from "vue";
2
- import { _ as A, w as _ } from "./index-Bc1JbUHT.js";
3
- const w = l({ name: "OCompTitle" }), k = _(A(l({ ...w, props: { title: { type: String, default: "" }, titleAttrs: { type: Object, default: () => ({}) } }, setup(o) {
4
- const { proxy: r } = d(), s = u(), t = o, p = ["small", "large"], n = i(() => {
5
- var e, a;
6
- return (e = t.titleAttrs) != null && e.width ? { ...t.titleAttrs, width: r.processWidth((a = t.titleAttrs) == null ? void 0 : a.width, !0) } : t.titleAttrs;
7
- }), c = i(() => s.size ? `el-input--${s.size}` : "o-comp-title__base-size"), m = i(() => ({ height: !p.includes(s.size) && "32px" }));
8
- return (e, a) => t.title ? (g(), h("div", v({ key: 0, class: ["o-comp-title", c.value], style: { ...m.value, ...n.value } }, e.$attrs), y(t.title), 17)) : f("", !0);
9
- } }), [["__scopeId", "data-v-47a44559"]]));
10
- export {
11
- k as default
12
- };
@@ -1,21 +0,0 @@
1
- import { defineComponent as c, ref as i, watch as x, resolveComponent as v, createBlock as n, openBlock as p, unref as y } from "vue";
2
- import { H as f } from "./index.esm.min-CAtOnJMt.js";
3
- import { x as b, _ as h, w as g } from "./index-Bc1JbUHT.js";
4
- const L = c({ name: "OCountBar" }), B = g(h(c({ ...L, props: { data: { type: Array, default: () => [] } }, setup(d) {
5
- const u = d, r = i(), l = i(!1);
6
- let o = { tooltip: { trigger: "axis", formatter: (a) => {
7
- const t = a[0];
8
- return `${t.name}: ${t.value}个`;
9
- } }, grid: { containLabel: !0 }, xAxis: { type: "category", data: [], axisLabel: { color: "#8e97ae", interval: 0, rotate: 0 } }, yAxis: { type: "value", axisLine: { show: !1 }, splitLine: { lineStyle: { type: "dashed", color: "#ccc" } }, axisLabel: { color: "#8e97ae" } }, series: [{ data: [120, 200, 150, 80, 70, 110, 130], type: "bar", barWidth: "30%", label: { show: !0, position: "top" }, itemStyle: { borderRadius: 10, color: "#1b78fc" } }] };
10
- return x(() => u.data, (a) => {
11
- console.log("98 val", a), l.value = a.every((e) => !e.value);
12
- let t = a.filter((e) => e.value), s = t.map((e) => e.name), m = t.map((e) => e.value);
13
- s.length > 4 ? o.xAxis.axisLabel.rotate = 45 : o.xAxis.axisLabel.rotate = 0, o.series[0].data = m, o.xAxis.data = s, r.value = b(o);
14
- }, { deep: !0, immediate: !0 }), (a, t) => {
15
- const s = v("o-empty");
16
- return l.value ? (p(), n(s, { key: 0, class: "h-100%" })) : (p(), n(y(f), { key: 1, class: "calc-height", option: r.value, autoresize: "" }, null, 8, ["option"]));
17
- };
18
- } }), [["__scopeId", "data-v-e4fd3fae"]]));
19
- export {
20
- B as default
21
- };
@@ -1,16 +0,0 @@
1
- import { defineComponent as u, computed as f, createElementBlock as n, openBlock as p, mergeProps as d, createElementVNode as c, createCommentVNode as h, renderSlot as m, normalizeStyle as y, normalizeClass as w, toDisplayString as g } from "vue";
2
- import { p as s, _ as b, w as S } from "./index-Bc1JbUHT.js";
3
- const _ = { class: "o-title__top" }, x = { key: 0, src: "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1742261310954'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='12261'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M800.512%20474.944h-377.6a24.256%2024.256%200%200%200-24.32%2024.32c0%2013.504%2010.816%2024.32%2024.32%2024.32h377.6c13.504%200%2024.32-10.816%2024.32-24.32a24.576%2024.576%200%200%200-24.32-24.32z%20m-377.6%20203.776a24.256%2024.256%200%200%200-24.32%2024.32c0%2013.504%2010.816%2024.32%2024.32%2024.32h377.6c13.504%200%2024.32-10.816%2024.32-24.32a24.576%2024.576%200%200%200-24.32-24.32h-377.6z'%20fill='%23101317'%20p-id='12262'%3e%3c/path%3e%3cpath%20d='M928.064%20209.6h-252.736l-5.376-15.68c-37.824-104.832-110.272-129.728-164.288-132.416h-409.728a62.592%2062.592%200%200%200-62.72%2062.144v776.704c0%2034.048%2028.096%2062.144%2062.72%2062.144h832.128a62.72%2062.72%200%200%200%2062.72-62.144v-628.608a62.272%2062.272%200%200%200-62.72-62.144z%20m-848.384-56.256c0-48.128%2017.856-41.6%2090.816-41.6h261.056c110.784%200%20139.456%2023.808%20160.512%2061.056l15.68%2036.736h-528.064v-56.192z%20m773.248%20759.424H170.496c-74.56%200-86.464-5.952-86.464-85.952v-566.464h784.576c78.912%200%2070.784%2030.784%2070.784%2085.952v492.928c0.064%2072.448-25.344%2073.536-86.464%2073.536z'%20fill='%23101317'%20p-id='12263'%3e%3c/path%3e%3cpath%20d='M196.992%20536.576h78.912v-78.912h-78.912v78.912z%20m0%20205.952h78.912v-78.912h-78.912v78.912z'%20fill='%23101317'%20p-id='12264'%3e%3c/path%3e%3c/svg%3e", width: "14", height: "14", alt: "Logo", class: "m-r-4" }, z = { class: "title-text" }, T = u({ name: "OTitle" }), k = S(b(u({ ...T, props: { title: { type: String, default: "" }, size: { type: String, default: "" }, subTitle: { type: String, default: "" }, subAttrs: { type: Object, default: () => ({}) }, inner: { type: Boolean, defalut: !1 }, t: { type: [String, Number], default: "" }, b: { type: [String, Number], default: "" }, l: { type: [String, Number], default: "" }, tb: { type: [String, Number] }, type: { type: String, default: "icon" } }, setup(e) {
4
- const o = e, v = f(() => {
5
- const { t, b: i, l: r, tb: l } = o;
6
- if (t || i || r || l) {
7
- let a = {};
8
- return l && (a.marginTop = s(l, !0), a.marginBottom = s(l, !0)), t && (a.marginTop = s(t, !0)), i && (a.marginBottom = s(i, !0)), r && (a.marginLeft = s(r, !0)), a;
9
- }
10
- return {};
11
- });
12
- return (t, i) => (p(), n("div", d({ class: "o-title", style: { ...v.value } }, t.$attrs), [c("div", _, [c("div", { class: w(e.type === "simple" || e.type === "icon" ? "o-title__top-simple-left" : "o-title__top-left"), style: y({ marginLeft: o.inner ? "8px" : 0 }) }, [m(t.$slots, "icon", {}, () => [o.type === "icon" ? (p(), n("img", x)) : h("", !0)], !0), c("span", z, g(e.title), 1), m(t.$slots, "default", {}, void 0, !0)], 6), m(t.$slots, "right", {}, void 0, !0)]), e.subTitle ? (p(), n("div", d({ key: 0, class: "o-title__subTitle" }, e.subAttrs), g(e.subTitle), 17)) : h("", !0)], 16));
13
- } }), [["__scopeId", "data-v-eae10c67"]]));
14
- export {
15
- k as default
16
- };
@@ -1,12 +0,0 @@
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-Bc1JbUHT.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
- };
@@ -1,18 +0,0 @@
1
- import { defineComponent as s, ref as p, watch as i, resolveComponent as m, createElementBlock as u, openBlock as d, createVNode as v, mergeProps as g, withCtx as f, renderSlot as h } from "vue";
2
- import { _ as w, w as N } from "./index-Bc1JbUHT.js";
3
- const _ = { class: "o-progress" }, b = s({ name: "OProgress" }), B = N(w(s({ ...b, props: { percentage: { type: Number, required: !0 }, animationTime: { type: Number, default: 500 }, isAnimation: { type: Boolean, default: !0 } }, setup(n) {
4
- const e = n, l = { "stroke-width": 16 }, t = p(0), c = (a) => a < 30 ? "#909399" : a < 70 ? "#e6a23c" : "#67c23a";
5
- return i(() => e.percentage, (a) => {
6
- e.isAnimation && (() => {
7
- let o = Math.ceil(e.animationTime / e.percentage), r = setInterval(() => {
8
- t.value = Number(t.value) + 1, (t.value >= e.percentage || t.value >= 100) && (t.value = e.percentage >= 100 ? 100 : e.percentage, clearInterval(r));
9
- }, o);
10
- })();
11
- }, { immediate: !0 }), (a, o) => {
12
- const r = m("el-progress");
13
- return d(), u("div", _, [v(r, g({ percentage: t.value }, { ...l, ...a.$attrs }, { color: a.$attrs.color || c }), { default: f(() => [h(a.$slots, "default", {}, void 0, !0)]), _: 3 }, 16, ["percentage", "color"])]);
14
- };
15
- } }), [["__scopeId", "data-v-8e18af94"]]));
16
- export {
17
- B as default
18
- };
@@ -1,22 +0,0 @@
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-Bc1JbUHT.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
- };
@@ -1,12 +0,0 @@
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-Bc1JbUHT.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
- };
@@ -1,67 +0,0 @@
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-Bc1JbUHT.js";
3
- import ue from "./index-CZE57h1w.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
- };
@@ -1,10 +0,0 @@
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-DA6a6Ugv.js";
3
- import { p as y, _ as b, w as d } from "./index-Bc1JbUHT.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
- };
@@ -1,68 +0,0 @@
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-Bc1JbUHT.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
- };
@@ -1,45 +0,0 @@
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-FqLNWrgU.js";
3
- import N from "./index-DA6a6Ugv.js";
4
- import { o as p, $ as v, _ as O, w as L } from "./index-Bc1JbUHT.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
- };