mc-plus 1.0.35 → 1.0.37
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.
- package/dist/es/index.js +72 -71
- package/dist/es/mc-alert-CFJMHk3q.js +35 -0
- package/dist/es/mc-step-DdMi1lIU.js +113 -0
- package/dist/es/mc-tab-Dwtoou7p.js +359 -0
- package/dist/es/mc-toast-DcwxAhCM.js +70 -0
- package/dist/es/theme/mc-alert.css +1 -1
- package/dist/es/theme/mc-step.css +1 -1
- package/dist/es/theme/mc-tab.css +1 -1
- package/dist/es/theme/mc-toast.css +1 -1
- package/dist/index.css +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/mc-alert-message/index.d.ts +77 -0
- package/dist/types/components/mc-alert-message/types.d.ts +24 -0
- package/dist/types/components/mc-step-v2/index.d.ts +6 -0
- package/dist/types/components/mc-step-v2/types.d.ts +3 -0
- package/dist/types/components/mc-table/composables/usePagination.d.ts +1 -1
- package/dist/types/components/mc-table/index.d.ts +3 -0
- package/dist/types/components/mc-table/types.d.ts +1 -0
- package/dist/types/components/mc-toast/types.d.ts +1 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +13 -13
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +1 -1
- package/dist/es/mc-alert-AIxygnUo.js +0 -12
- package/dist/es/mc-step-I5vwIGON.js +0 -110
- package/dist/es/mc-tab-D3avK9mA.js +0 -359
- package/dist/es/mc-toast-DP5xhbZh.js +0 -70
package/dist/es/index.js
CHANGED
|
@@ -1,82 +1,83 @@
|
|
|
1
1
|
import { p as s, m } from "./utils-D21VRfU7.js";
|
|
2
|
-
import { M as o } from "./mc-alert-
|
|
3
|
-
import { a as
|
|
4
|
-
import { a as
|
|
5
|
-
import { M as
|
|
2
|
+
import { M as o, a as r } from "./mc-alert-CFJMHk3q.js";
|
|
3
|
+
import { a as p } from "./mc-button-hcAGlzEu.js";
|
|
4
|
+
import { a as i, b as e } from "./mc-checkbox-jkjExOp6.js";
|
|
5
|
+
import { M as f } from "./mc-collapse-MQfStqbB.js";
|
|
6
6
|
import { a } from "./mc-collapse-MQfStqbB.js";
|
|
7
|
-
import { M as
|
|
8
|
-
import { M } from "./mc-message-48fHlepl.js";
|
|
7
|
+
import { M as j, a as M } from "./mc-input-FK4bitme.js";
|
|
8
|
+
import { M as l } from "./mc-message-48fHlepl.js";
|
|
9
9
|
import { a as a2 } from "./mc-message-48fHlepl.js";
|
|
10
|
-
import { M as
|
|
11
|
-
import { M as
|
|
12
|
-
import { M as
|
|
13
|
-
import { u, c, d } from "./mc-tab-
|
|
14
|
-
import { M as
|
|
15
|
-
import { t } from "./mc-toast-
|
|
16
|
-
import { M as
|
|
17
|
-
import { a as
|
|
18
|
-
import { a as
|
|
19
|
-
import { a as
|
|
20
|
-
import { a as
|
|
21
|
-
import { a as
|
|
22
|
-
import { M as
|
|
23
|
-
import { M as
|
|
24
|
-
import { M as
|
|
25
|
-
import { M as
|
|
26
|
-
import { M as
|
|
27
|
-
import { M as
|
|
28
|
-
import { a as
|
|
29
|
-
import { M as
|
|
30
|
-
import { M as
|
|
31
|
-
import { M as
|
|
32
|
-
import { M as
|
|
33
|
-
const
|
|
10
|
+
import { M as b, a as n } from "./mc-radio-U7FdzncU.js";
|
|
11
|
+
import { M as g, a as x, b as h } from "./mc-select-BaRpys43.js";
|
|
12
|
+
import { M as k, a as v, b as w } from "./mc-tab-Dwtoou7p.js";
|
|
13
|
+
import { u, c, d } from "./mc-tab-Dwtoou7p.js";
|
|
14
|
+
import { M as S } from "./mc-toast-DcwxAhCM.js";
|
|
15
|
+
import { t } from "./mc-toast-DcwxAhCM.js";
|
|
16
|
+
import { M as T, b as q } from "./mc-form-Chwbio85.js";
|
|
17
|
+
import { a as C } from "./mc-icon-DvE6ycGS.js";
|
|
18
|
+
import { a as I } from "./mc-success-icon-Dyn_2pZn.js";
|
|
19
|
+
import { a as P, b as y } from "./mc-title-B1UukBBT.js";
|
|
20
|
+
import { a as z } from "./mc-footer-ULbWEGpm.js";
|
|
21
|
+
import { a as A } from "./mc-modal-header-DuUkFIht.js";
|
|
22
|
+
import { M as B } from "./mc-drawer-zHMyUMT7.js";
|
|
23
|
+
import { M as D } from "./mc-reset-B2ZLJeZU.js";
|
|
24
|
+
import { M as E } from "./mc-divider-CPyBJO2I.js";
|
|
25
|
+
import { M as F } from "./mc-lightbox-Mi1LrLbX.js";
|
|
26
|
+
import { M as G, a as H } from "./mc-upload-Bh4PzxtV.js";
|
|
27
|
+
import { M as J } from "./mc-popper-BqOyoovY.js";
|
|
28
|
+
import { a as K } from "./mc-tooltip-DI6epum_.js";
|
|
29
|
+
import { M as L } from "./mc-tag-Cbc0gzGd.js";
|
|
30
|
+
import { M as N } from "./mc-status-5uYdAcv7.js";
|
|
31
|
+
import { M as O } from "./mc-switch-DHgrcJ0-.js";
|
|
32
|
+
import { M as Q, a as R, b as U, c as V } from "./mc-step-DdMi1lIU.js";
|
|
33
|
+
const W = [p, f, k, b, n, g, x, h, i, e, o, l, S, T, q, j, M, C, I, P, z, y, A, B, v, w, D, E, F, G, H, J, K, L, N, O, Q, R, U, V, r];
|
|
34
34
|
s();
|
|
35
|
-
const
|
|
35
|
+
const X = m(W);
|
|
36
36
|
export {
|
|
37
37
|
o as McAlert,
|
|
38
|
-
r as
|
|
39
|
-
p as
|
|
40
|
-
i as
|
|
41
|
-
e as
|
|
38
|
+
r as McAlertMessage,
|
|
39
|
+
p as McButton,
|
|
40
|
+
i as McCheckbox,
|
|
41
|
+
e as McCheckboxGroup,
|
|
42
|
+
f as McCollapse,
|
|
42
43
|
a as McCollapseItem,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
44
|
+
E as McDivider,
|
|
45
|
+
B as McDrawer,
|
|
46
|
+
H as McFileList,
|
|
47
|
+
z as McFooter,
|
|
48
|
+
T as McForm,
|
|
49
|
+
q as McFormItem,
|
|
50
|
+
C as McIcon,
|
|
51
|
+
j as McInput,
|
|
52
|
+
M as McInputGroup,
|
|
53
|
+
F as McLightbox,
|
|
54
|
+
l as McMessage,
|
|
55
|
+
A as McModalHeader,
|
|
56
|
+
J as McPopper,
|
|
57
|
+
b as McRadio,
|
|
58
|
+
n as McRadioGroup,
|
|
59
|
+
D as McReset,
|
|
60
|
+
g as McSelect,
|
|
61
|
+
x as McSelectGroup,
|
|
62
|
+
h as McSelectOption,
|
|
63
|
+
N as McStatus,
|
|
64
|
+
Q as McStep,
|
|
65
|
+
V as McStepChildItemV2,
|
|
66
|
+
U as McStepItemV2,
|
|
67
|
+
R as McStepV2,
|
|
68
|
+
I as McSuccessIcon,
|
|
69
|
+
O as McSwitch,
|
|
70
|
+
v as McTab,
|
|
71
|
+
w as McTabItem,
|
|
72
|
+
k as McTable,
|
|
73
|
+
L as McTag,
|
|
74
|
+
P as McTitle,
|
|
75
|
+
y as McTitleToolBar,
|
|
76
|
+
S as McToast,
|
|
77
|
+
K as McTooltip,
|
|
78
|
+
G as McUpload,
|
|
78
79
|
a2 as Message,
|
|
79
|
-
|
|
80
|
+
X as default,
|
|
80
81
|
t as toast,
|
|
81
82
|
u as usePagination,
|
|
82
83
|
c as useTableScroll,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { _ as e, w as a } from "./utils-D21VRfU7.js";
|
|
2
|
+
import { defineComponent as t, ref as s, useAttrs as l, computed as o, createElementBlock as c, createCommentVNode as n, openBlock as r, normalizeClass as i, normalizeStyle as d, createElementVNode as m, createBlock as p, renderSlot as u, toDisplayString as f, useSlots as _, createVNode as v, createTextVNode as y, withModifiers as g, Transition as h, withCtx as k } from "vue";
|
|
3
|
+
import { M as x } from "./mc-icon-DvE6ycGS.js";
|
|
4
|
+
const w = { class: "mc-alert__content" }, b = { class: "mc-alert__header" }, I = { class: "mc-alert__header-left" }, $ = { key: 1, class: "mc-alert__title" }, z = { key: 0, class: "mc-alert__description" }, B = { key: 1, class: "mc-alert__description" }, C = a(e(t({ name: "McAlert", __name: "mc-alert", props: { type: { default: "info" }, title: {}, description: {}, closable: { type: Boolean, default: false }, showIcon: { type: Boolean, default: true }, height: {}, width: {} }, emits: ["close"], setup(e2, { expose: a2, emit: t2 }) {
|
|
5
|
+
const _2 = e2, v2 = t2, y2 = s(), g2 = s(true), h2 = l(), k2 = o(() => ({ ...h2.style || {}, width: _2.width, height: _2.height })), C2 = { success: "Accept_02", info: "Info_02", warning: "Error_02", error: "Error_04" }, M2 = (e3) => {
|
|
6
|
+
g2.value = false, v2("close", e3);
|
|
7
|
+
};
|
|
8
|
+
return a2({ ref: y2 }), (e3, a3) => g2.value ? (r(), c("div", { key: 0, ref_key: "_ref", ref: y2, style: d(k2.value), class: i(["mc-alert", [`mc-alert--${e3.type}`]]) }, [m("div", w, [m("div", b, [m("div", I, [e3.showIcon ? (r(), p(x, { key: 0, name: C2[e3.type], size: 24, class: "mc-alert__icon" }, null, 8, ["name"])) : n("", true), e3.title ? (r(), c("div", $, f(e3.title), 1)) : u(e3.$slots, "title", { key: 2 }, void 0, true)]), e3.closable ? (r(), p(x, { key: 0, name: "Cross", size: 24, class: "mc-alert__close", onClick: M2 })) : n("", true)]), e3.description ? (r(), c("div", z, f(e3.description), 1)) : (r(), c("div", B, [u(e3.$slots, "description", {}, void 0, true)]))])], 6)) : n("", true);
|
|
9
|
+
} }), [["__scopeId", "data-v-fc038f58"]])), M = { class: "mc-alert-message-header" }, A = { class: "mc-alert-message-title-container" }, E = { key: 0, class: "mc-alert-message-icon" }, V = { key: 0, class: "mc-alert-message-icon-group" }, j = { key: 0, class: "mc-alert-message-body" }, D = a(e(t({ name: "McAlertMessage", __name: "mc-alert-message", props: { modelValue: { type: Boolean, default: true }, width: {}, height: {}, type: { default: "info" }, message: {}, content: {}, closable: { type: Boolean, default: false }, hideIcon: { type: Boolean, default: false }, expandable: { type: Boolean, default: false } }, emits: ["click", "close", "update:modelValue", "expand"], setup(e2, { expose: a2, emit: t2 }) {
|
|
10
|
+
const l2 = e2, w2 = t2, b2 = s(), I2 = _(), $2 = o(() => l2.content || I2.content), z2 = o(() => D2.value || I2.icon), B2 = s(false), C2 = o(() => !l2.expandable || B2.value), D2 = o(() => {
|
|
11
|
+
if (!l2.hideIcon) switch (l2.type) {
|
|
12
|
+
case "success":
|
|
13
|
+
return "Accept_02";
|
|
14
|
+
case "error":
|
|
15
|
+
return "Error_04";
|
|
16
|
+
case "warning":
|
|
17
|
+
return "Error_02";
|
|
18
|
+
case "info":
|
|
19
|
+
return "Info_02";
|
|
20
|
+
default:
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
}), L = () => {
|
|
24
|
+
w2("update:modelValue", false), w2("close");
|
|
25
|
+
}, S = () => {
|
|
26
|
+
B2.value = !B2.value, w2("expand", B2.value);
|
|
27
|
+
}, W = () => {
|
|
28
|
+
w2("click"), l2.expandable && S();
|
|
29
|
+
};
|
|
30
|
+
return a2({ ref: b2, close: L, expand: S }), (e3, a3) => (r(), c("div", { ref_key: "_ref", ref: b2, class: i(["mc-alert-message", [`mc-alert-message-${e3.type}`]]), style: d({ width: e3.width, height: e3.height, cursor: e3.expandable ? "pointer" : "default" }), onClick: W }, [m("div", M, [m("div", A, [z2.value ? (r(), c("div", E, [u(e3.$slots, "icon", {}, () => [v(x, { name: D2.value, size: 24 }, null, 8, ["name"])], true)])) : n("", true), m("div", { class: "mc-alert-message-title", style: d({ fontSize: $2.value ? "18px" : "16px", fontWeight: $2.value ? "600" : "400" }) }, [u(e3.$slots, "default", {}, () => [y(f(e3.message), 1)], true)], 4)]), e3.closable || e3.expandable ? (r(), c("div", V, [e3.expandable ? (r(), p(x, { key: 0, name: "Down-Chevron", size: 24, class: "mc-alert-message-tool-icon mc-alert-message-tool-icon-expand", style: d({ transform: C2.value ? "rotate(180deg)" : "rotate(0deg)" }) }, null, 8, ["style"])) : n("", true), e3.closable ? (r(), p(x, { key: 1, name: "Cross", size: 24, class: "mc-alert-message-tool-icon mc-alert-message-tool-icon-close", onClick: g(L, ["stop"]) })) : n("", true)])) : n("", true)]), $2.value ? (r(), c("div", j, [v(h, { name: "mc-alert-message-content-transition" }, { default: k(() => [C2.value ? (r(), c("div", { key: 0, class: "mc-alert-message-content", style: d({ paddingLeft: z2.value ? "48px" : "16px" }) }, [u(e3.$slots, "content", {}, () => [y(f(e3.content), 1)], true)], 4)) : n("", true)]), _: 3 })])) : n("", true)], 6));
|
|
31
|
+
} }), [["__scopeId", "data-v-e7f8c2df"]]));
|
|
32
|
+
export {
|
|
33
|
+
C as M,
|
|
34
|
+
D as a
|
|
35
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { defineComponent as e, computed as t, ref as s, watch as l, onMounted as c, nextTick as a, createElementBlock as m, openBlock as n, normalizeClass as i, createElementVNode as o, createCommentVNode as u, Fragment as p, renderList as d, createBlock as v, toDisplayString as r, resolveDynamicComponent as y, provide as h, renderSlot as f, inject as b, onBeforeUnmount as g, createTextVNode as k } from "vue";
|
|
2
|
+
import { M as S } from "./mc-success-icon-Dyn_2pZn.js";
|
|
3
|
+
import { c as _, u as C } from "./hooks-B1LgtMzq.js";
|
|
4
|
+
import { v as w, w as B, t as I, b as V, d as x } from "./vendor-C4NlnvFG.js";
|
|
5
|
+
import { _ as R, w as $ } from "./utils-D21VRfU7.js";
|
|
6
|
+
import { M } from "./mc-icon-DvE6ycGS.js";
|
|
7
|
+
const j = { class: "mc-step-number-container" }, q = { class: "mc-step-item-number" }, A = { key: 0, class: "mc-step-item-number-text" }, L = { class: "mc-step-item-content" }, z = { key: 0, class: "mc-step-item-content-title" }, D = { class: "mc-step-item-label" }, E = { class: "mc-step-item-desc" }, F = { key: 1, class: "mc-step-item-component" }, G = { key: 0, class: "mc-step-item-component" }, H = $(R(e({ name: "McStep", __name: "mc-step", props: { modelValue: {}, steps: {}, type: { default: "vertical" } }, emits: ["change", "success"], setup(e2, { expose: h2, emit: f2 }) {
|
|
8
|
+
const b2 = e2, g2 = t(() => "vertical" === b2.type), k2 = f2, C2 = s(), V2 = s(), x2 = s(), R2 = s(), $2 = t(() => w(b2.steps, (e3) => e3.key === b2.modelValue)), M2 = t(() => {
|
|
9
|
+
var _a;
|
|
10
|
+
return (_a = b2.steps[$2.value - 1]) == null ? void 0 : _a.key;
|
|
11
|
+
});
|
|
12
|
+
l(() => b2.modelValue, (e3) => {
|
|
13
|
+
J2(), k2("change", e3);
|
|
14
|
+
}, { flush: "post" });
|
|
15
|
+
const H2 = s(), J2 = (e3 = M2.value) => {
|
|
16
|
+
H2.value = e3, k2("success", e3);
|
|
17
|
+
}, K2 = t(() => w(b2.steps, (e3) => e3.key === H2.value));
|
|
18
|
+
c(() => {
|
|
19
|
+
g2.value ? N2() : (O2(), P2()), J2();
|
|
20
|
+
});
|
|
21
|
+
const N2 = async () => {
|
|
22
|
+
await a();
|
|
23
|
+
const e3 = K2.value, t2 = R2.value;
|
|
24
|
+
if (e3 < 0) return void (t2.style.height = "0");
|
|
25
|
+
const s2 = V2.value, l2 = s2.querySelectorAll(".mc-step-item");
|
|
26
|
+
if (e3 + 1 > l2.length - 1) return void (t2.style.height = "100%");
|
|
27
|
+
const c2 = l2 == null ? void 0 : l2[e3 + 1], m2 = s2.getBoundingClientRect(), n2 = (c2.getBoundingClientRect().top - m2.top) / (m2.height - 24);
|
|
28
|
+
t2.style.height = 100 * n2 + "%";
|
|
29
|
+
}, O2 = () => {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
const e3 = V2.value, t2 = x2.value, s2 = e3.querySelectorAll(".mc-step-item"), l2 = (_a = s2 == null ? void 0 : s2[0]) == null ? void 0 : _a.querySelector(".mc-step-item-number"), c2 = (_b = s2 == null ? void 0 : s2[s2.length - 1]) == null ? void 0 : _b.querySelector(".mc-step-item-number");
|
|
32
|
+
if (!l2 || !c2) return void (t2.style.width = "0px");
|
|
33
|
+
const a2 = e3.getBoundingClientRect(), m2 = l2.getBoundingClientRect(), n2 = c2.getBoundingClientRect();
|
|
34
|
+
t2.style.width = n2.left - m2.left - m2.width + "px", t2.style.left = `${m2.left - a2.left + m2.width}px`;
|
|
35
|
+
}, P2 = () => {
|
|
36
|
+
const e3 = R2.value, t2 = K2.value;
|
|
37
|
+
if (t2 < 0) return void (e3.style.width = "0");
|
|
38
|
+
const s2 = (t2 + 1) / (b2.steps.length - 1), l2 = s2 > 1 ? 1 : s2;
|
|
39
|
+
e3.style.width = 100 * l2 + "%";
|
|
40
|
+
}, Q2 = (e3) => g2.value && e3.component && e3.key === b2.modelValue, T2 = t(() => {
|
|
41
|
+
var _a;
|
|
42
|
+
return !g2.value && ((_a = B(b2.steps, (e3) => e3.key === b2.modelValue)) == null ? void 0 : _a.component);
|
|
43
|
+
});
|
|
44
|
+
return l(() => H2.value, () => {
|
|
45
|
+
g2.value ? N2() : P2();
|
|
46
|
+
}), _(I(() => {
|
|
47
|
+
g2.value ? N2() : (O2(), P2());
|
|
48
|
+
}, 50)), h2({ ref: C2, setSuccessStep: J2 }), (e3, t2) => (n(), m("div", { class: i(["mc-step", `mc-step-${e3.type}`]), ref_key: "_ref", ref: C2 }, [o("ul", { class: "mc-step-item-container", ref_key: "stepContainerRef", ref: V2 }, [(n(true), m(p, null, d(e3.steps, (t3, s2) => (n(), m("li", { class: i(["mc-step-item", { "mc-step-item-active": e3.modelValue === t3.key, "mc-step-item-disabled": t3.disabled, "mc-step-item-success": s2 <= K2.value }]), key: t3.key }, [o("div", j, [o("div", q, [s2 > K2.value || t3.disabled ? (n(), m("span", A, r(s2 + 1), 1)) : (n(), v(S, { key: 1 }))])]), o("div", L, [t3.label || t3.desc ? (n(), m("div", z, [o("h3", D, r(t3.label), 1), o("p", E, r(t3.desc), 1)])) : u("", true), Q2(t3) ? (n(), m("div", F, [(n(), v(y(t3.component)))])) : u("", true)])], 2))), 128)), o("div", { ref_key: "unsuccessLineRef", ref: x2, class: "mc-step-line mc-step-unsuccess-line" }, [o("div", { ref_key: "successLineRef", ref: R2, class: "mc-step-success-line" }, null, 512)], 512)], 512), T2.value ? (n(), m("div", G, [(n(), v(y(T2.value)))])) : u("", true)], 2));
|
|
49
|
+
} }), [["__scopeId", "data-v-3e1df60e"]])), J = Symbol("StepV2Context"), K = Symbol("StepItemV2Context"), N = { class: "mc-step-v2" }, O = e({ name: "McStepV2", __name: "mc-step-v2", props: { modelValue: {}, succeed: { type: Boolean, default: void 0 }, showContent: { type: Boolean, default: false } }, emits: ["update:modelValue", "change"], setup(e2, { expose: a2 }) {
|
|
50
|
+
const i2 = e2, o2 = s([]), u2 = s(-1), p2 = (e3) => {
|
|
51
|
+
e3 > -1 ? e3 > o2.value.length - 1 ? u2.value = o2.value.length - 1 : u2.value = e3 : u2.value = -1;
|
|
52
|
+
}, d2 = () => {
|
|
53
|
+
const e3 = w(o2.value, (e4) => e4.name === i2.modelValue);
|
|
54
|
+
p2(e3 - 1);
|
|
55
|
+
};
|
|
56
|
+
return c(() => {
|
|
57
|
+
d2();
|
|
58
|
+
}), l(() => i2.modelValue, () => {
|
|
59
|
+
d2();
|
|
60
|
+
}, { flush: "post" }), h(J, { successStepIndex: u2, activeStep: t(() => i2.modelValue), succeed: t(() => i2.succeed), showContent: t(() => i2.showContent), stepItems: o2.value, addStepItem: (e3) => {
|
|
61
|
+
o2.value.push(e3);
|
|
62
|
+
}, removeStepItem: (e3) => {
|
|
63
|
+
const t2 = w(o2.value, (t3) => t3.name === e3.name);
|
|
64
|
+
t2 > -1 && o2.value.splice(t2, 1);
|
|
65
|
+
} }), a2({ setSuccessIndex: p2, setSuccessStep: (e3) => {
|
|
66
|
+
const t2 = w(o2.value, (t3) => t3.name === e3);
|
|
67
|
+
p2(t2);
|
|
68
|
+
} }), (e3, t2) => (n(), m("div", N, [f(e3.$slots, "default")]));
|
|
69
|
+
} }), P = { class: "mc-step-item-step-bar-number" }, Q = { key: 0, class: "mc-step-item-step-bar-number-text" }, T = { key: 0, class: "mc-step-item-label" }, U = { class: "mc-step-item-label-title" }, W = { class: "mc-step-item-label-desc" }, X = { key: 1, class: "mc-step-item-slot" }, Y = R(e({ name: "McStepItemV2", __name: "mc-step-item-v2", props: { icon: {}, name: {}, label: {}, desc: {}, disabled: { type: Boolean }, succeed: { type: Boolean, default: void 0 }, showContent: { type: Boolean, default: false } }, setup(e2) {
|
|
70
|
+
const l2 = e2, a2 = s(), p2 = s(), d2 = b(J);
|
|
71
|
+
c(() => {
|
|
72
|
+
d2 == null ? void 0 : d2.addStepItem(l2);
|
|
73
|
+
}), g(() => {
|
|
74
|
+
d2 == null ? void 0 : d2.removeStepItem(l2);
|
|
75
|
+
});
|
|
76
|
+
const y2 = t(() => V(d2 == null ? void 0 : d2.stepItems, l2)), _2 = t(() => {
|
|
77
|
+
var _a;
|
|
78
|
+
return ((_a = d2 == null ? void 0 : d2.activeStep) == null ? void 0 : _a.value) === l2.name;
|
|
79
|
+
}), w2 = t(() => {
|
|
80
|
+
var _a;
|
|
81
|
+
return ((_a = d2 == null ? void 0 : d2.showContent) == null ? void 0 : _a.value) || l2.showContent || _2.value;
|
|
82
|
+
}), B2 = t(() => {
|
|
83
|
+
var _a, _b, _c;
|
|
84
|
+
return x((_a = d2 == null ? void 0 : d2.succeed) == null ? void 0 : _a.value) ? x(l2.succeed) ? (((_b = d2 == null ? void 0 : d2.successStepIndex) == null ? void 0 : _b.value) ?? -1) >= y2.value : l2.succeed : (_c = d2 == null ? void 0 : d2.succeed) == null ? void 0 : _c.value;
|
|
85
|
+
}), I2 = t(() => {
|
|
86
|
+
var _a;
|
|
87
|
+
return ((_a = d2 == null ? void 0 : d2.stepItems) == null ? void 0 : _a.length) === y2.value + 1;
|
|
88
|
+
});
|
|
89
|
+
return C(a2, () => {
|
|
90
|
+
if (I2.value && a2.value && p2.value) {
|
|
91
|
+
const e3 = Array.from(a2.value.querySelectorAll(".mc-step-child-item-v2") ?? []);
|
|
92
|
+
if (e3.length > 0) {
|
|
93
|
+
const t2 = e3[e3.length - 1], { top: s2 } = t2.getBoundingClientRect(), { top: l3 } = p2.value.getBoundingClientRect(), c2 = s2 - l3;
|
|
94
|
+
p2.value.style.height = `${c2 + 4}px`;
|
|
95
|
+
} else p2.value.style.height = "40px";
|
|
96
|
+
}
|
|
97
|
+
}), h(K, { succeed: t(() => B2.value), actived: t(() => _2.value) }), (e3, t2) => (n(), m("div", { class: i(["mc-step-item-v2", { "mc-step-item-actived": _2.value, "mc-step-item-success": B2.value }]) }, [o("div", { class: "mc-step-item-step-bar", ref_key: "stepBarRef", ref: p2 }, [o("div", P, [B2.value ? (n(), v(S, { key: 1, class: "mc-step-item-step-bar-success-icon" })) : (n(), m("div", Q, [e3.icon ? (n(), v(M, { key: 0, name: e3.icon, class: "mc-step-item-step-bar-icon" }, null, 8, ["name"])) : f(e3.$slots, "step-number", { key: 1 }, () => [k(r(y2.value + 1), 1)], true)]))])], 512), o("div", { class: "mc-step-item-content", ref_key: "contentRef", ref: a2 }, [e3.label || e3.desc ? (n(), m("div", T, [f(e3.$slots, "label", {}, () => [o("span", U, r(e3.label), 1)], true), f(e3.$slots, "desc", {}, () => [o("p", W, r(e3.desc), 1)], true)])) : u("", true), w2.value ? (n(), m("div", X, [f(e3.$slots, "default", {}, void 0, true)])) : u("", true)], 512)], 2));
|
|
98
|
+
} }), [["__scopeId", "data-v-4e14b568"]]), Z = { class: "mc-step-child-item-content" }, ee = { key: 0, class: "mc-step-child-item-label" }, te = { class: "mc-step-child-item-label-title" }, se = { class: "mc-step-child-item-label-desc" }, le = { key: 1, class: "mc-step-child-item-slot" }, ce = R(e({ name: "McStepChildItemV2", __name: "mc-step-child-item-v2", props: { name: {}, label: {}, desc: {}, disabled: { type: Boolean }, succeed: { type: Boolean, default: void 0 }, showContent: { type: Boolean } }, setup(e2) {
|
|
99
|
+
const s2 = e2, l2 = b(K), c2 = t(() => {
|
|
100
|
+
var _a;
|
|
101
|
+
return (_a = l2 == null ? void 0 : l2.actived) == null ? void 0 : _a.value;
|
|
102
|
+
}), a2 = t(() => {
|
|
103
|
+
var _a, _b;
|
|
104
|
+
return ((_a = l2 == null ? void 0 : l2.succeed) == null ? void 0 : _a.value) ? (_b = l2 == null ? void 0 : l2.succeed) == null ? void 0 : _b.value : s2.succeed;
|
|
105
|
+
});
|
|
106
|
+
return (e3, t2) => (n(), m("div", { class: i(["mc-step-child-item-v2", { "mc-step-child-item-actived": c2.value, "mc-step-child-item-success": a2.value }]) }, [o("div", Z, [e3.label || e3.desc ? (n(), m("div", ee, [o("span", te, r(e3.label), 1), o("p", se, r(e3.desc), 1)])) : u("", true), e3.$slots.default ? (n(), m("div", le, [f(e3.$slots, "default", {}, void 0, true)])) : u("", true)])], 2));
|
|
107
|
+
} }), [["__scopeId", "data-v-dbb161eb"]]), ae = $(O), me = $(Y), ne = $(ce);
|
|
108
|
+
export {
|
|
109
|
+
H as M,
|
|
110
|
+
ae as a,
|
|
111
|
+
me as b,
|
|
112
|
+
ne as c
|
|
113
|
+
};
|