bp-aicc-editor 1.2.521 → 1.2.522
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/lib/{ScreenPreview-CV95NWOd.js → ScreenPreview-yUHo60be.js} +51 -105
- package/lib/atlas-BMjKIOwk.js +3891 -0
- package/lib/{button-base-DHNVBrQ9.js → button-base-CXl1z-_m.js} +1 -1
- package/lib/{cache-lsjsKZHu.js → cache-DbHSDjJy.js} +1 -1
- package/lib/config-provider-Bui8m4GV.js +62 -0
- package/lib/{container-group-DqAcKEBy.js → container-group-D6Extorz.js} +1 -1
- package/lib/{copy-C5Pi6nJh.js → copy-CsCmPy4J.js} +1 -1
- package/lib/{datav-BER95ty-.js → datav-BTD-HJhV.js} +27 -27
- package/lib/{delete-C2EW4JCs.js → delete-COj0ilHh.js} +1 -1
- package/lib/{divider-BazBGRgV.js → divider-B3K_URZc.js} +1 -1
- package/lib/dropdown-CWvnuJsO.js +105 -0
- package/lib/{edit-B2pfd2q1.js → edit-vdJaEine.js} +1 -1
- package/lib/{el-form-item-BDdxk5F5.js → el-form-item-BbaNohQv.js} +51 -51
- package/lib/{el-link-D2ol9BHQ.js → el-link-Dq721Q7-.js} +12 -12
- package/lib/{el-loading-Cgwgez55.js → el-loading-DOxnN3bm.js} +17 -17
- package/lib/{fullscreen-OChDsSnk.js → fullscreen-DXSogbcG.js} +1 -1
- package/lib/{image-C5ZAY3yt.js → image-Cu7JTK9-.js} +1 -1
- package/lib/{index-Ci8AbyIq.js → index-68soBnbK.js} +8 -8
- package/lib/{index-BatyRVpL.js → index-B-d8WIg1.js} +7 -7
- package/lib/{index-BfIEunKC.js → index-B4zV3cxV.js} +18 -17
- package/lib/{index-CZJriuFt.js → index-B8QqTLfg.js} +4974 -4898
- package/lib/index-BBMItxtW.js +619 -0
- package/lib/{index-CGrR_i0u.js → index-BMm0MRz5.js} +14 -15
- package/lib/index-BMn8EzMD.js +1027 -0
- package/lib/index-BNTW8F-9.js +322 -0
- package/lib/index-BTI518b1.js +69 -0
- package/lib/{index-BWPVi43E.js → index-BZxUAT4z.js} +4 -4
- package/lib/{index-Ck7uFsPE.js → index-BdYTc41r.js} +24 -24
- package/lib/index-BfI55Ioc.js +404 -0
- package/lib/{index-BhP9eBCp.js → index-BmAcetSf.js} +19 -20
- package/lib/index-C35Yp3i8.js +545 -0
- package/lib/{index-B19lEYui.js → index-C6GUNRx9.js} +2 -2
- package/lib/index-CC28_8Jl.js +567 -0
- package/lib/index-CDhmvVt8.js +338 -0
- package/lib/index-CDx0y0fp.js +144 -0
- package/lib/{el-button-DvLKp6Ga.js → index-CJjljoJG.js} +106 -106
- package/lib/index-CNCgXPiO.js +235 -0
- package/lib/{index-CWbZmzNT.js → index-CPa_MnOD.js} +30 -29
- package/lib/index-CW6ljdNf.js +1582 -0
- package/lib/index-C_WopEui.js +513 -0
- package/lib/{index-CX_Ghcb6.js → index-CejowjGd.js} +56 -53
- package/lib/{index-BwCQWH-N.js → index-CfZXOvi-.js} +42 -40
- package/lib/{index-CVsy2qTh.js → index-CgzRTmPh.js} +16 -15
- package/lib/index-CmzuNM9v.js +32 -0
- package/lib/index-CrxcAFt8.js +5343 -0
- package/lib/{index-C7k49L2T.js → index-CuHA7QXu.js} +10 -10
- package/lib/{index-qVyixI57.js → index-CyBGAB7D.js} +21 -20
- package/lib/index-D6J7coU0.js +129 -0
- package/lib/index-DDHxrdAo.js +1773 -0
- package/lib/index-DDL-yqq0.js +1401 -0
- package/lib/{index-BPcvYtHf.js → index-DOxy-bey.js} +6 -6
- package/lib/{index-CVE37oE7.js → index-DOyr0BHr.js} +7 -7
- package/lib/index-DPOanmXI.js +887 -0
- package/lib/{index-3pzVrvby.js → index-DR_husZg.js} +46 -46
- package/lib/{el-tab-pane-DD2eM9rB.js → index-DUzOCQrW.js} +125 -124
- package/lib/{index-CGFEhUh9.js → index-DVYI-g8Q.js} +53 -52
- package/lib/index-DVyjilLy.js +51 -0
- package/lib/{index-CJyYGViv.js → index-DWAJ9GyC.js} +9 -9
- package/lib/index-Dj2qCwPD.js +178 -0
- package/lib/{index-D4X0_jbv.js → index-Dx2Gld1J.js} +32 -32
- package/lib/{index-C2XeCqtq.js → index-E9T-y2Yz.js} +3 -3
- package/lib/{index-Buoc0ISP.js → index-FlmXAW0Z.js} +60 -58
- package/lib/index-NqqOvc6V.js +169 -0
- package/lib/{index-BkdiXCRY.js → index-ObKRNOmJ.js} +6 -7
- package/lib/index-bOWjoplU.js +448 -0
- package/lib/{index-CXQ258ID.js → index-buU8mDzi.js} +15 -16
- package/lib/{index-tbhuYbb0.js → index-mGKAWDJZ.js} +11 -12
- package/lib/index.es.js +4 -4
- package/lib/index.umd.js +46 -40
- package/lib/{layer-setting-panel-VvDSQ-cn.js → layer-setting-panel-BGPj32nP.js} +2 -2
- package/lib/{line-show-Bp4G-LqO.js → line-show-DUn1bu_P.js} +1 -1
- package/lib/{multi-layout-config-drSy7ezf.js → multi-layout-config-BTWxJeuc.js} +7 -8
- package/lib/{multiline-text-D89kYrA2.js → multiline-text-CPJdCWJ7.js} +1 -1
- package/lib/{navigation-YAGxZ0OT.js → navigation-ZLJaBOUj.js} +1 -1
- package/lib/page-config-CHP07Ndf.js +253 -0
- package/lib/{page-tabs-wFeNBY4c.js → page-tabs-CKLhgrip.js} +45 -41
- package/lib/{plus-3mdO6yXY.js → plus-xgpQU22I.js} +1 -1
- package/lib/raf-CJog_tcv.js +6 -0
- package/lib/refs-DZMysoBI.js +8 -0
- package/lib/{requestOld-DRcjsmRQ.js → requestOld-CaGzCXrV.js} +97 -96
- package/lib/{schema-BsnIOGBI.js → schema-BaFWGeFt.js} +1 -1
- package/lib/{schema-_APJMUW3.js → schema-CUR-UK2S.js} +44 -41
- package/lib/{schema-BavJE-SK.js → schema-WUk7XVq7.js} +58 -54
- package/lib/{schema-qKI1F8Bt.js → schema-geZfujv8.js} +1 -1
- package/lib/{schema-BflqDw-a.js → schema-iosjRxCC.js} +1 -1
- package/lib/{schema-Bo30dbBx.js → schema-tuPllxn6.js} +1 -1
- package/lib/scroll-CWfl60Tu.js +58 -0
- package/lib/{setting-panel-BgzN3BUP.js → setting-panel-0qLcwYyT.js} +154 -151
- package/lib/{show-C4AeWlKj.js → show-BCwE3hGY.js} +1 -1
- package/lib/{stepper-D5EFeJWG.js → stepper-Bud1Jppr.js} +1 -1
- package/lib/strings-BvUQWzDM.js +6 -0
- package/lib/{switch-B0dR4LM_.js → switch-VlaUmSpJ.js} +1 -1
- package/lib/{unlock-Cq9PLhBA.js → unlock-B2FVPQlm.js} +1 -1
- package/lib/{use-env-url-BM9dgwx_.js → use-env-url-D1p8ib2L.js} +1 -1
- package/lib/use-global-config-D_yoqf3Q.js +90 -0
- package/lib/validator-BOXH2OMA.js +5 -0
- package/lib/{vnode-B_Dj8zxu.js → vnode-Bxs1g06p.js} +1 -1
- package/package.json +1 -1
- package/lib/atlas-DsmLq2V0.js +0 -38
- package/lib/el-overlay-BK0_UIU6.js +0 -704
- package/lib/index-B1yAU2Cb.js +0 -390
- package/lib/index-BCFXuK7k.js +0 -68
- package/lib/index-BD4Jwo8Z.js +0 -449
- package/lib/index-BMWqf88L.js +0 -356
- package/lib/index-Belsn8kt.js +0 -107
- package/lib/index-CIADz1i0.js +0 -8494
- package/lib/index-DKTrbqcA.js +0 -56
- package/lib/index-Ge_d2xqD.js +0 -127
- package/lib/page-config-Cmsi8Vpr.js +0 -582
- package/lib/strings-_mHAdgA4.js +0 -6
- package/lib/use-global-config-CflpFoxU.js +0 -115
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { shallowRef as se, defineComponent as K, h as
|
|
2
|
-
import {
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { shallowRef as se, defineComponent as K, h as Ie, triggerRef as H, onMounted as Ne, isVNode as Le, inject as ce, ref as w, computed as S, watch as L, nextTick as Y, onBeforeUnmount as Ce, createElementBlock as _e, createCommentVNode as we, openBlock as Te, normalizeStyle as We, normalizeClass as Se, unref as j, onUpdated as De, createVNode as y, getCurrentInstance as Ee, provide as Ke, renderSlot as le, useSlots as Ue, reactive as He, onBeforeUpdate as je, withDirectives as Xe, vShow as Ye } from "vue";
|
|
2
|
+
import { bx as qe, e as G, m as oe, f as q, g as xe, al as ue, h as Z, aU as D, b6 as re, by as Ge, bz as Ze, bA as he, E as X, F as Je, G as Qe, c as et, M as ie, N as z, bp as tt, V as at, i as nt, bu as st, bB as lt, ah as Pe, w as ot, an as rt } from "./index-B8QqTLfg.js";
|
|
3
|
+
import { c as it, r as Re } from "./raf-CJog_tcv.js";
|
|
4
|
+
import { c as A } from "./strings-BvUQWzDM.js";
|
|
5
|
+
import { f as ct } from "./vnode-Bxs1g06p.js";
|
|
6
|
+
const ut = (e, c, u) => ct(e.subTree).filter(
|
|
6
7
|
(n) => {
|
|
7
8
|
var N;
|
|
8
|
-
return
|
|
9
|
+
return Le(n) && ((N = n.type) == null ? void 0 : N.name) === c && !!n.component;
|
|
9
10
|
}
|
|
10
|
-
).map((n) => n.component.uid).map((n) => u[n]).filter((n) => !!n),
|
|
11
|
+
).map((n) => n.component.uid).map((n) => u[n]).filter((n) => !!n), dt = (e, c) => {
|
|
11
12
|
const u = se({}), f = se([]), t = /* @__PURE__ */ new WeakMap(), n = (d) => {
|
|
12
|
-
u.value[d.uid] = d,
|
|
13
|
+
u.value[d.uid] = d, H(u), Ne(() => {
|
|
13
14
|
const v = d.getVnode().el, o = v.parentNode;
|
|
14
15
|
if (!t.has(o)) {
|
|
15
16
|
t.set(o, []);
|
|
16
17
|
const a = o.insertBefore.bind(o);
|
|
17
|
-
o.insertBefore = (C, s) => (t.get(o).some((E) => C === E || s === E) &&
|
|
18
|
+
o.insertBefore = (C, s) => (t.get(o).some((E) => C === E || s === E) && H(u), a(C, s));
|
|
18
19
|
}
|
|
19
20
|
t.get(o).push(v);
|
|
20
21
|
});
|
|
21
22
|
}, N = (d) => {
|
|
22
|
-
delete u.value[d.uid],
|
|
23
|
+
delete u.value[d.uid], H(u);
|
|
23
24
|
const v = d.getVnode().el, o = v.parentNode, a = t.get(o), C = a.indexOf(v);
|
|
24
25
|
a.splice(C, 1);
|
|
25
26
|
}, h = () => {
|
|
26
|
-
f.value =
|
|
27
|
+
f.value = ut(
|
|
27
28
|
e,
|
|
28
29
|
c,
|
|
29
30
|
u.value
|
|
30
31
|
);
|
|
31
32
|
}, p = (d) => d.render(), m = K({
|
|
32
33
|
setup(d, { slots: v }) {
|
|
33
|
-
return () => (h(), v.default ?
|
|
34
|
+
return () => (h(), v.default ? Ie(p, {
|
|
34
35
|
render: v.default
|
|
35
36
|
}) : null);
|
|
36
37
|
}
|
|
@@ -41,39 +42,39 @@ const Be = (e) => Pe ? window.requestAnimationFrame(e) : setTimeout(e, 16), ut =
|
|
|
41
42
|
removeChild: N,
|
|
42
43
|
ChildrenSorter: m
|
|
43
44
|
};
|
|
44
|
-
},
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
},
|
|
45
|
+
}, vt = "horizontal", bt = "vertical", ft = {
|
|
46
|
+
[vt]: "deltaX",
|
|
47
|
+
[bt]: "deltaY"
|
|
48
|
+
}, mt = ({ atEndEdge: e, atStartEdge: c, layout: u }, f) => {
|
|
48
49
|
let t, n = 0;
|
|
49
50
|
const N = (p) => p < 0 && c.value || p > 0 && e.value;
|
|
50
51
|
return {
|
|
51
52
|
hasReachedEdge: N,
|
|
52
53
|
onWheel: (p) => {
|
|
53
|
-
|
|
54
|
-
const m = p[
|
|
55
|
-
N(n) && N(n + m) || (n += m,
|
|
54
|
+
it(t);
|
|
55
|
+
const m = p[ft[u.value]];
|
|
56
|
+
N(n) && N(n + m) || (n += m, qe() || p.preventDefault(), t = Re(() => {
|
|
56
57
|
f(n), n = 0;
|
|
57
58
|
}));
|
|
58
59
|
}
|
|
59
60
|
};
|
|
60
|
-
}, J = Symbol("tabsRootContextKey"),
|
|
61
|
+
}, J = Symbol("tabsRootContextKey"), ht = G({
|
|
61
62
|
tabs: {
|
|
62
|
-
type:
|
|
63
|
+
type: q(Array),
|
|
63
64
|
default: () => oe([])
|
|
64
65
|
},
|
|
65
66
|
tabRefs: {
|
|
66
|
-
type:
|
|
67
|
+
type: q(Object),
|
|
67
68
|
default: () => oe({})
|
|
68
69
|
}
|
|
69
|
-
}), pe = "ElTabBar",
|
|
70
|
+
}), pe = "ElTabBar", pt = K({
|
|
70
71
|
name: pe,
|
|
71
72
|
__name: "tab-bar",
|
|
72
|
-
props:
|
|
73
|
+
props: ht,
|
|
73
74
|
setup(e, { expose: c }) {
|
|
74
75
|
const u = e, f = ce(J);
|
|
75
76
|
f || ue(pe, "<el-tabs><el-tab-bar /></el-tabs>");
|
|
76
|
-
const t =
|
|
77
|
+
const t = Z("tabs"), n = w(), N = w(), h = S(
|
|
77
78
|
() => {
|
|
78
79
|
var a;
|
|
79
80
|
return D(f.props.defaultValue) || !!((a = N.value) != null && a.transform);
|
|
@@ -81,20 +82,20 @@ const Be = (e) => Pe ? window.requestAnimationFrame(e) : setTimeout(e, 16), ut =
|
|
|
81
82
|
), p = () => {
|
|
82
83
|
let a = 0, C = 0;
|
|
83
84
|
const s = ["top", "bottom"].includes(f.props.tabPosition) ? "width" : "height", B = s === "width" ? "x" : "y", E = B === "x" ? "left" : "top";
|
|
84
|
-
return u.tabs.every((
|
|
85
|
-
if (D(
|
|
85
|
+
return u.tabs.every((x) => {
|
|
86
|
+
if (D(x.paneName))
|
|
86
87
|
return !1;
|
|
87
|
-
const l = u.tabRefs[
|
|
88
|
+
const l = u.tabRefs[x.paneName];
|
|
88
89
|
if (!l)
|
|
89
90
|
return !1;
|
|
90
|
-
if (!
|
|
91
|
+
if (!x.active)
|
|
91
92
|
return !0;
|
|
92
|
-
a = l[`offset${
|
|
93
|
+
a = l[`offset${A(E)}`], C = l[`client${A(s)}`];
|
|
93
94
|
const _ = window.getComputedStyle(l);
|
|
94
95
|
return s === "width" && (C -= Number.parseFloat(_.paddingLeft) + Number.parseFloat(_.paddingRight), a += Number.parseFloat(_.paddingLeft)), !1;
|
|
95
96
|
}), {
|
|
96
97
|
[s]: `${C}px`,
|
|
97
|
-
transform: `translate${
|
|
98
|
+
transform: `translate${A(B)}(${a}px)`
|
|
98
99
|
};
|
|
99
100
|
}, m = () => N.value = p(), d = [], v = () => {
|
|
100
101
|
d.forEach((a) => a.stop()), d.length = 0, Object.values(u.tabRefs).forEach((a) => {
|
|
@@ -104,7 +105,7 @@ const Be = (e) => Pe ? window.requestAnimationFrame(e) : setTimeout(e, 16), ut =
|
|
|
104
105
|
L(
|
|
105
106
|
() => u.tabs,
|
|
106
107
|
async () => {
|
|
107
|
-
await
|
|
108
|
+
await Y(), m(), v();
|
|
108
109
|
},
|
|
109
110
|
{ immediate: !0 }
|
|
110
111
|
);
|
|
@@ -121,17 +122,17 @@ const Be = (e) => Pe ? window.requestAnimationFrame(e) : setTimeout(e, 16), ut =
|
|
|
121
122
|
ref_key: "barRef",
|
|
122
123
|
ref: n,
|
|
123
124
|
class: Se([j(t).e("active-bar"), j(t).is(j(f).props.tabPosition)]),
|
|
124
|
-
style:
|
|
125
|
+
style: We(N.value)
|
|
125
126
|
},
|
|
126
127
|
null,
|
|
127
128
|
6
|
|
128
129
|
)) : we("v-if", !0);
|
|
129
130
|
}
|
|
130
131
|
});
|
|
131
|
-
var
|
|
132
|
-
const
|
|
132
|
+
var gt = /* @__PURE__ */ xe(pt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]);
|
|
133
|
+
const yt = G({
|
|
133
134
|
panes: {
|
|
134
|
-
type:
|
|
135
|
+
type: q(Array),
|
|
135
136
|
default: () => oe([])
|
|
136
137
|
},
|
|
137
138
|
currentName: {
|
|
@@ -149,24 +150,24 @@ const Nt = Z({
|
|
|
149
150
|
type: [String, Number],
|
|
150
151
|
default: void 0
|
|
151
152
|
}
|
|
152
|
-
}),
|
|
153
|
+
}), Nt = {
|
|
153
154
|
tabClick: (e, c, u) => u instanceof Event,
|
|
154
155
|
tabRemove: (e, c) => c instanceof Event
|
|
155
|
-
}, ge = "ElTabNav",
|
|
156
|
+
}, ge = "ElTabNav", Ct = K({
|
|
156
157
|
name: ge,
|
|
157
|
-
props:
|
|
158
|
-
emits:
|
|
158
|
+
props: yt,
|
|
159
|
+
emits: Nt,
|
|
159
160
|
setup(e, {
|
|
160
161
|
expose: c,
|
|
161
162
|
emit: u
|
|
162
163
|
}) {
|
|
163
164
|
const f = ce(J);
|
|
164
165
|
f || ue(ge, "<el-tabs><tab-nav /></el-tabs>");
|
|
165
|
-
const t =
|
|
166
|
-
transform: `translate${
|
|
166
|
+
const t = Z("tabs"), n = Ge(), N = Ze(), h = w(), p = w(), m = w(), d = w({}), v = w(), o = w(!1), a = w(0), C = w(!1), s = w(!0), B = se(), E = S(() => ["top", "bottom"].includes(f.props.tabPosition)), x = S(() => E.value ? "width" : "height"), l = S(() => ({
|
|
167
|
+
transform: `translate${x.value === "width" ? "X" : "Y"}(-${a.value}px)`
|
|
167
168
|
})), {
|
|
168
169
|
width: _,
|
|
169
|
-
height:
|
|
170
|
+
height: P
|
|
170
171
|
} = he(h), {
|
|
171
172
|
width: V,
|
|
172
173
|
height: I
|
|
@@ -175,18 +176,18 @@ const Nt = Z({
|
|
|
175
176
|
height: 0
|
|
176
177
|
}, {
|
|
177
178
|
box: "border-box"
|
|
178
|
-
}), W = S(() => E.value ? _.value :
|
|
179
|
+
}), W = S(() => E.value ? _.value : P.value), F = S(() => E.value ? V.value : I.value), {
|
|
179
180
|
onWheel: M
|
|
180
|
-
} =
|
|
181
|
+
} = mt({
|
|
181
182
|
atStartEdge: S(() => a.value <= 0),
|
|
182
183
|
atEndEdge: S(() => F.value - a.value <= W.value),
|
|
183
184
|
layout: S(() => E.value ? "horizontal" : "vertical")
|
|
184
185
|
}, (r) => {
|
|
185
|
-
a.value =
|
|
186
|
+
a.value = tt(a.value + r, 0, F.value - W.value);
|
|
186
187
|
}), Q = () => {
|
|
187
188
|
if (!h.value)
|
|
188
189
|
return;
|
|
189
|
-
const r = h.value[`offset${
|
|
190
|
+
const r = h.value[`offset${A(x.value)}`], g = a.value;
|
|
190
191
|
if (!g)
|
|
191
192
|
return;
|
|
192
193
|
const i = g > r ? g - r : 0;
|
|
@@ -194,7 +195,7 @@ const Nt = Z({
|
|
|
194
195
|
}, $e = () => {
|
|
195
196
|
if (!h.value || !p.value)
|
|
196
197
|
return;
|
|
197
|
-
const r = p.value[`offset${
|
|
198
|
+
const r = p.value[`offset${A(x.value)}`], g = h.value[`offset${A(x.value)}`], i = a.value;
|
|
198
199
|
if (r - i <= g)
|
|
199
200
|
return;
|
|
200
201
|
const b = r - i > g * 2 ? i + g : r - g;
|
|
@@ -203,46 +204,46 @@ const Nt = Z({
|
|
|
203
204
|
const r = p.value;
|
|
204
205
|
if (!o.value || !m.value || !h.value || !r)
|
|
205
206
|
return;
|
|
206
|
-
await
|
|
207
|
+
await Y();
|
|
207
208
|
const g = d.value[e.currentName];
|
|
208
209
|
if (!g)
|
|
209
210
|
return;
|
|
210
|
-
const i = h.value, b = g.getBoundingClientRect(), T = i.getBoundingClientRect(),
|
|
211
|
-
let
|
|
212
|
-
E.value ? (b.left < T.left && (
|
|
211
|
+
const i = h.value, b = g.getBoundingClientRect(), T = i.getBoundingClientRect(), R = E.value ? r.offsetWidth - T.width : r.offsetHeight - T.height, k = a.value;
|
|
212
|
+
let $ = k;
|
|
213
|
+
E.value ? (b.left < T.left && ($ = k - (T.left - b.left)), b.right > T.right && ($ = k + b.right - T.right)) : (b.top < T.top && ($ = k - (T.top - b.top)), b.bottom > T.bottom && ($ = k + (b.bottom - T.bottom))), $ = Math.max($, 0), a.value = Math.min($, R);
|
|
213
214
|
}, ve = () => {
|
|
214
215
|
var r;
|
|
215
216
|
if (!p.value || !h.value)
|
|
216
217
|
return;
|
|
217
218
|
e.stretch && ((r = v.value) == null || r.update());
|
|
218
|
-
const g = p.value[`offset${
|
|
219
|
+
const g = p.value[`offset${A(x.value)}`], i = h.value[`offset${A(x.value)}`], b = a.value;
|
|
219
220
|
i < g ? (o.value = o.value || {}, o.value.prev = b, o.value.next = b + i < g, g - b < i && (a.value = g - i)) : (o.value = !1, b > 0 && (a.value = 0));
|
|
220
|
-
},
|
|
221
|
+
}, ke = (r) => {
|
|
221
222
|
const g = ie(r);
|
|
222
223
|
let i = 0;
|
|
223
224
|
switch (g) {
|
|
224
|
-
case
|
|
225
|
-
case
|
|
225
|
+
case z.left:
|
|
226
|
+
case z.up:
|
|
226
227
|
i = -1;
|
|
227
228
|
break;
|
|
228
|
-
case
|
|
229
|
-
case
|
|
229
|
+
case z.right:
|
|
230
|
+
case z.down:
|
|
230
231
|
i = 1;
|
|
231
232
|
break;
|
|
232
233
|
default:
|
|
233
234
|
return;
|
|
234
235
|
}
|
|
235
236
|
const b = Array.from(r.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));
|
|
236
|
-
let
|
|
237
|
-
|
|
237
|
+
let R = b.indexOf(r.target) + i;
|
|
238
|
+
R < 0 ? R = b.length - 1 : R >= b.length && (R = 0), b[R].focus({
|
|
238
239
|
preventScroll: !0
|
|
239
|
-
}), b[
|
|
240
|
+
}), b[R].click(), be();
|
|
240
241
|
}, be = () => {
|
|
241
242
|
s.value && (C.value = !0);
|
|
242
|
-
}, ee = () => C.value = !1,
|
|
243
|
+
}, ee = () => C.value = !1, Oe = (r, g) => {
|
|
243
244
|
d.value[g] = r;
|
|
244
245
|
}, ze = async () => {
|
|
245
|
-
await
|
|
246
|
+
await Y();
|
|
246
247
|
const r = d.value[e.currentName];
|
|
247
248
|
r?.focus({
|
|
248
249
|
preventScroll: !0
|
|
@@ -253,54 +254,54 @@ const Nt = Z({
|
|
|
253
254
|
}), L(N, (r) => {
|
|
254
255
|
r ? setTimeout(() => s.value = !0, 50) : s.value = !1;
|
|
255
256
|
}), re(m, () => {
|
|
256
|
-
|
|
257
|
-
}), Ne(() => setTimeout(() => de(), 0)),
|
|
257
|
+
Re(ve);
|
|
258
|
+
}), Ne(() => setTimeout(() => de(), 0)), De(() => ve()), c({
|
|
258
259
|
scrollToActiveTab: de,
|
|
259
260
|
removeFocus: ee,
|
|
260
261
|
focusActiveTab: ze,
|
|
261
262
|
tabListRef: p,
|
|
262
263
|
tabBarRef: v,
|
|
263
|
-
scheduleRender: () =>
|
|
264
|
+
scheduleRender: () => H(B)
|
|
264
265
|
}), () => {
|
|
265
266
|
const r = o.value ? [y("span", {
|
|
266
267
|
class: [t.e("nav-prev"), t.is("disabled", !o.value.prev)],
|
|
267
268
|
onClick: Q
|
|
268
|
-
}, [y(
|
|
269
|
-
default: () => [y(
|
|
269
|
+
}, [y(X, null, {
|
|
270
|
+
default: () => [y(Je, null, null)]
|
|
270
271
|
})]), y("span", {
|
|
271
272
|
class: [t.e("nav-next"), t.is("disabled", !o.value.next)],
|
|
272
273
|
onClick: $e
|
|
273
|
-
}, [y(
|
|
274
|
-
default: () => [y(
|
|
274
|
+
}, [y(X, null, {
|
|
275
|
+
default: () => [y(Qe, null, null)]
|
|
275
276
|
})])] : null, g = e.panes.map((i, b) => {
|
|
276
|
-
var T,
|
|
277
|
-
const
|
|
277
|
+
var T, R, k, $, fe;
|
|
278
|
+
const Ae = i.uid, te = i.props.disabled, U = (R = (T = i.props.name) != null ? T : i.index) != null ? R : `${b}`, ae = !te && (i.isClosable || i.props.closable !== !1 && e.editable);
|
|
278
279
|
i.index = `${b}`;
|
|
279
|
-
const
|
|
280
|
+
const Ve = ae ? y(X, {
|
|
280
281
|
class: "is-icon-close",
|
|
281
282
|
onClick: (O) => u("tabRemove", i, O)
|
|
282
283
|
}, {
|
|
283
|
-
default: () => [y(
|
|
284
|
-
}) : null,
|
|
284
|
+
default: () => [y(et, null, null)]
|
|
285
|
+
}) : null, Fe = (($ = (k = i.slots).label) == null ? void 0 : $.call(k)) || i.props.label, Me = !te && i.active ? (fe = e.tabindex) != null ? fe : f.props.tabindex : -1;
|
|
285
286
|
return y("div", {
|
|
286
|
-
ref: (O) =>
|
|
287
|
+
ref: (O) => Oe(O, U),
|
|
287
288
|
class: [t.e("item"), t.is(f.props.tabPosition), t.is("active", i.active), t.is("disabled", te), t.is("closable", ae), t.is("focus", C.value)],
|
|
288
|
-
id: `tab-${
|
|
289
|
-
key: `tab-${
|
|
290
|
-
"aria-controls": `pane-${
|
|
289
|
+
id: `tab-${U}`,
|
|
290
|
+
key: `tab-${Ae}`,
|
|
291
|
+
"aria-controls": `pane-${U}`,
|
|
291
292
|
role: "tab",
|
|
292
293
|
"aria-selected": i.active,
|
|
293
|
-
tabindex:
|
|
294
|
+
tabindex: Me,
|
|
294
295
|
onFocus: () => be(),
|
|
295
296
|
onBlur: () => ee(),
|
|
296
297
|
onClick: (O) => {
|
|
297
|
-
ee(), u("tabClick", i,
|
|
298
|
+
ee(), u("tabClick", i, U, O);
|
|
298
299
|
},
|
|
299
300
|
onKeydown: (O) => {
|
|
300
301
|
const me = ie(O);
|
|
301
|
-
ae && (me ===
|
|
302
|
+
ae && (me === z.delete || me === z.backspace) && u("tabRemove", i, O);
|
|
302
303
|
}
|
|
303
|
-
}, [
|
|
304
|
+
}, [Fe, Ve]);
|
|
304
305
|
});
|
|
305
306
|
return B.value, y("div", {
|
|
306
307
|
ref: m,
|
|
@@ -313,16 +314,16 @@ const Nt = Z({
|
|
|
313
314
|
ref: p,
|
|
314
315
|
style: l.value,
|
|
315
316
|
role: "tablist",
|
|
316
|
-
onKeydown:
|
|
317
|
+
onKeydown: ke,
|
|
317
318
|
onWheel: M
|
|
318
|
-
}, [e.type ? null : y(
|
|
319
|
+
}, [e.type ? null : y(gt, {
|
|
319
320
|
ref: v,
|
|
320
321
|
tabs: [...e.panes],
|
|
321
322
|
tabRefs: d.value
|
|
322
323
|
}, null), g]) : null])]);
|
|
323
324
|
};
|
|
324
325
|
}
|
|
325
|
-
}),
|
|
326
|
+
}), _t = G({
|
|
326
327
|
type: {
|
|
327
328
|
type: String,
|
|
328
329
|
values: ["card", "border-card", ""],
|
|
@@ -343,7 +344,7 @@ const Nt = Z({
|
|
|
343
344
|
default: "top"
|
|
344
345
|
},
|
|
345
346
|
beforeLeave: {
|
|
346
|
-
type:
|
|
347
|
+
type: q(Function),
|
|
347
348
|
default: () => !0
|
|
348
349
|
},
|
|
349
350
|
stretch: Boolean,
|
|
@@ -351,30 +352,30 @@ const Nt = Z({
|
|
|
351
352
|
type: [String, Number],
|
|
352
353
|
default: 0
|
|
353
354
|
}
|
|
354
|
-
}), ne = (e) =>
|
|
355
|
-
[
|
|
355
|
+
}), ne = (e) => at(e) || nt(e), wt = {
|
|
356
|
+
[Pe]: (e) => ne(e),
|
|
356
357
|
tabClick: (e, c) => c instanceof Event,
|
|
357
358
|
tabChange: (e) => ne(e),
|
|
358
359
|
edit: (e, c) => ["remove", "add"].includes(c),
|
|
359
360
|
tabRemove: (e) => ne(e),
|
|
360
361
|
tabAdd: () => !0
|
|
361
|
-
},
|
|
362
|
+
}, Tt = K({
|
|
362
363
|
name: "ElTabs",
|
|
363
|
-
props:
|
|
364
|
-
emits:
|
|
364
|
+
props: _t,
|
|
365
|
+
emits: wt,
|
|
365
366
|
setup(e, {
|
|
366
367
|
emit: c,
|
|
367
368
|
slots: u,
|
|
368
369
|
expose: f
|
|
369
370
|
}) {
|
|
370
371
|
var t;
|
|
371
|
-
const n =
|
|
372
|
+
const n = Z("tabs"), N = S(() => ["left", "right"].includes(e.tabPosition)), {
|
|
372
373
|
children: h,
|
|
373
374
|
addChild: p,
|
|
374
375
|
removeChild: m,
|
|
375
376
|
ChildrenSorter: d
|
|
376
|
-
} =
|
|
377
|
-
var
|
|
377
|
+
} = dt(Ee(), "ElTabPane"), v = w(), o = w((t = D(e.modelValue) ? e.defaultValue : e.modelValue) != null ? t : "0"), a = async (l, _ = !1) => {
|
|
378
|
+
var P, V, I, W;
|
|
378
379
|
if (!(o.value === l || D(l)))
|
|
379
380
|
try {
|
|
380
381
|
let F;
|
|
@@ -384,28 +385,28 @@ const Nt = Z({
|
|
|
384
385
|
} else
|
|
385
386
|
F = !0;
|
|
386
387
|
if (F !== !1) {
|
|
387
|
-
const M = (
|
|
388
|
-
o.value = l, _ && (c(
|
|
388
|
+
const M = (P = h.value.find((Q) => Q.paneName === o.value)) == null ? void 0 : P.isFocusInsidePane();
|
|
389
|
+
o.value = l, _ && (c(Pe, l), c("tabChange", l)), (I = (V = v.value) == null ? void 0 : V.removeFocus) == null || I.call(V), M && ((W = v.value) == null || W.focusActiveTab());
|
|
389
390
|
}
|
|
390
391
|
} catch {
|
|
391
392
|
}
|
|
392
|
-
}, C = (l, _,
|
|
393
|
-
l.props.disabled || (c("tabClick", l,
|
|
393
|
+
}, C = (l, _, P) => {
|
|
394
|
+
l.props.disabled || (c("tabClick", l, P), a(_, !0));
|
|
394
395
|
}, s = (l, _) => {
|
|
395
396
|
l.props.disabled || D(l.props.name) || (_.stopPropagation(), c("edit", l.props.name, "remove"), c("tabRemove", l.props.name));
|
|
396
397
|
}, B = () => {
|
|
397
398
|
c("edit", void 0, "add"), c("tabAdd");
|
|
398
399
|
}, E = (l) => {
|
|
399
400
|
const _ = ie(l);
|
|
400
|
-
[
|
|
401
|
-
},
|
|
402
|
-
const _ = l.el.firstChild,
|
|
403
|
-
_ !==
|
|
401
|
+
[z.enter, z.numpadEnter].includes(_) && B();
|
|
402
|
+
}, x = (l) => {
|
|
403
|
+
const _ = l.el.firstChild, P = ["bottom", "right"].includes(e.tabPosition) ? l.children[0].el : l.children[1].el;
|
|
404
|
+
_ !== P && _.before(P);
|
|
404
405
|
};
|
|
405
406
|
return L(() => e.modelValue, (l) => a(l)), L(o, async () => {
|
|
406
407
|
var l;
|
|
407
|
-
await
|
|
408
|
-
}),
|
|
408
|
+
await Y(), (l = v.value) == null || l.scrollToActiveTab();
|
|
409
|
+
}), Ke(J, {
|
|
409
410
|
props: e,
|
|
410
411
|
currentName: o,
|
|
411
412
|
registerPane: p,
|
|
@@ -414,7 +415,7 @@ const Nt = Z({
|
|
|
414
415
|
}), f({
|
|
415
416
|
currentName: o,
|
|
416
417
|
get tabNavRef() {
|
|
417
|
-
return
|
|
418
|
+
return st(v.value, ["scheduleRender"]);
|
|
418
419
|
}
|
|
419
420
|
}), () => {
|
|
420
421
|
const l = u["add-icon"], _ = e.editable || e.addable ? y("div", {
|
|
@@ -422,11 +423,11 @@ const Nt = Z({
|
|
|
422
423
|
tabindex: e.tabindex,
|
|
423
424
|
onClick: B,
|
|
424
425
|
onKeydown: E
|
|
425
|
-
}, [l ? le(u, "add-icon") : y(
|
|
426
|
+
}, [l ? le(u, "add-icon") : y(X, {
|
|
426
427
|
class: n.is("icon-plus")
|
|
427
428
|
}, {
|
|
428
|
-
default: () => [y(
|
|
429
|
-
})]) : null,
|
|
429
|
+
default: () => [y(lt, null, null)]
|
|
430
|
+
})]) : null, P = () => y(Ct, {
|
|
430
431
|
ref: v,
|
|
431
432
|
currentName: o.value,
|
|
432
433
|
editable: e.editable,
|
|
@@ -438,7 +439,7 @@ const Nt = Z({
|
|
|
438
439
|
}, null), V = y("div", {
|
|
439
440
|
class: [n.e("header"), N.value && n.e("header-vertical"), n.is(e.tabPosition)]
|
|
440
441
|
}, [y(d, null, {
|
|
441
|
-
default:
|
|
442
|
+
default: P,
|
|
442
443
|
$stable: !0
|
|
443
444
|
}), _]), I = y("div", {
|
|
444
445
|
class: n.e("content")
|
|
@@ -448,12 +449,12 @@ const Nt = Z({
|
|
|
448
449
|
[n.m("card")]: e.type === "card",
|
|
449
450
|
[n.m("border-card")]: e.type === "border-card"
|
|
450
451
|
}],
|
|
451
|
-
onVnodeMounted:
|
|
452
|
-
onVnodeUpdated:
|
|
452
|
+
onVnodeMounted: x,
|
|
453
|
+
onVnodeUpdated: x
|
|
453
454
|
}, [I, V]);
|
|
454
455
|
};
|
|
455
456
|
}
|
|
456
|
-
}),
|
|
457
|
+
}), St = G({
|
|
457
458
|
label: {
|
|
458
459
|
type: String,
|
|
459
460
|
default: ""
|
|
@@ -467,14 +468,14 @@ const Nt = Z({
|
|
|
467
468
|
},
|
|
468
469
|
disabled: Boolean,
|
|
469
470
|
lazy: Boolean
|
|
470
|
-
}),
|
|
471
|
+
}), Et = ["id", "aria-hidden", "aria-labelledby"], ye = "ElTabPane", xt = K({
|
|
471
472
|
name: ye,
|
|
472
473
|
__name: "tab-pane",
|
|
473
|
-
props:
|
|
474
|
+
props: St,
|
|
474
475
|
setup(e) {
|
|
475
476
|
const c = e, u = Ee(), f = Ue(), t = ce(J);
|
|
476
477
|
t || ue(ye, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
|
|
477
|
-
const n =
|
|
478
|
+
const n = Z("tab-pane"), N = w(), h = w(), p = S(() => {
|
|
478
479
|
var s;
|
|
479
480
|
return (s = c.closable) != null ? s : t.props.closable;
|
|
480
481
|
}), m = S(
|
|
@@ -494,7 +495,7 @@ const Nt = Z({
|
|
|
494
495
|
L(m, (s) => {
|
|
495
496
|
s && (d.value = !0);
|
|
496
497
|
});
|
|
497
|
-
const C =
|
|
498
|
+
const C = He({
|
|
498
499
|
uid: u.uid,
|
|
499
500
|
getVnode: () => u.vnode,
|
|
500
501
|
slots: f,
|
|
@@ -507,7 +508,7 @@ const Nt = Z({
|
|
|
507
508
|
});
|
|
508
509
|
return t.registerPane(C), Ce(() => {
|
|
509
510
|
t.unregisterPane(C);
|
|
510
|
-
}),
|
|
511
|
+
}), je(() => {
|
|
511
512
|
var s;
|
|
512
513
|
f.label && ((s = t.nav$.value) == null || s.scheduleRender());
|
|
513
514
|
}), (s, B) => o.value ? Xe((Te(), _e("div", {
|
|
@@ -521,16 +522,16 @@ const Nt = Z({
|
|
|
521
522
|
"aria-labelledby": `tab-${v.value}`
|
|
522
523
|
}, [
|
|
523
524
|
le(s.$slots, "default")
|
|
524
|
-
], 10,
|
|
525
|
+
], 10, Et)), [
|
|
525
526
|
[Ye, m.value]
|
|
526
527
|
]) : we("v-if", !0);
|
|
527
528
|
}
|
|
528
529
|
});
|
|
529
|
-
var
|
|
530
|
-
const Ot =
|
|
531
|
-
TabPane:
|
|
532
|
-
}),
|
|
530
|
+
var Be = /* @__PURE__ */ xe(xt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]);
|
|
531
|
+
const Ot = ot(Tt, {
|
|
532
|
+
TabPane: Be
|
|
533
|
+
}), zt = rt(Be);
|
|
533
534
|
export {
|
|
534
535
|
Ot as E,
|
|
535
|
-
|
|
536
|
+
zt as a
|
|
536
537
|
};
|