oeos-components 0.2.21 → 0.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
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-oKZkmdJE.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
+ };
@@ -0,0 +1,12 @@
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-oKZkmdJE.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
+ };
@@ -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-oKZkmdJE.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,35 @@
1
+ import { defineComponent as v, ref as u, computed as y, onMounted as b, onUnmounted as x, resolveComponent as p, createElementBlock as N, openBlock as f, createVNode as k, createBlock as h, createCommentVNode as _, mergeProps as m, withCtx as $, createElementVNode as o, normalizeStyle as C, toDisplayString as S, renderSlot as z } from "vue";
2
+ import { r as B, s as E, _ as q, w as V } from "./index-oKZkmdJE.js";
3
+ const j = { class: "f-st-ct w-100%" }, A = { class: "percentage-value" }, L = { class: "" }, O = v({ name: "OCapacityProgress" }), D = V(q(v({ ...O, props: { total: { type: [String, Number], required: !0 }, used: { type: [String, Number], required: !0 }, iconAttrs: { type: Object, default: () => {
4
+ } } }, setup(l) {
5
+ const t = u(null), i = u(null), c = l;
6
+ function d() {
7
+ return `${s.value}%`;
8
+ }
9
+ const s = y(() => {
10
+ let e = 100 * Number((c.used || 0) / (c.total || 0)) || 0;
11
+ return isNaN(e) ? 0 : Number(e.toFixed(2));
12
+ });
13
+ function g(e) {
14
+ return B(e < 90 ? "--blue" : "--red");
15
+ }
16
+ const a = async () => {
17
+ var e, n;
18
+ if (await E(), t.value && ((n = (e = t.value) == null ? void 0 : e.$el) == null ? void 0 : n.offsetWidth)) {
19
+ let r = t.value.$el.offsetWidth - 16 + "px";
20
+ return i.value.style.width = r, { width: r };
21
+ }
22
+ return { width: "200px" };
23
+ };
24
+ return b(() => {
25
+ window.addEventListener("resize", a);
26
+ }), x(() => {
27
+ window.removeEventListener("resize", a);
28
+ }), (e, n) => {
29
+ const r = p("o-progress"), w = p("o-icon");
30
+ return f(), N("div", j, [k(r, m({ ref_key: "progressBoxRef", ref: t, class: "progress-box", percentage: s.value, type: "line", "stroke-width": 20, "text-inside": "", format: d, color: g }, e.$attrs), { default: $(({ percentage: P }) => [o("div", { ref_key: "percentageRef", ref: i, class: "f-bt-ct", style: C({ ...a() }) }, [o("div", A, S(d()), 1), o("div", L, [z(e.$slots, "default", {}, void 0, !0)])], 4)]), _: 3 }, 16, ["percentage"]), s.value > 100 ? (f(), h(w, m({ key: 0, name: "warning", content: "已用容量远超总容量, 请扩容 ", class: "ml" }, l.iconAttrs), null, 16)) : _("", !0)]);
31
+ };
32
+ } }), [["__scopeId", "data-v-56fcbcdd"]]));
33
+ export {
34
+ D as default
35
+ };
@@ -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-eagdaWyv.js";
3
+ import { p as y, _ as b, w as d } from "./index-oKZkmdJE.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,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-oKZkmdJE.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,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-oKZkmdJE.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
+ };