st-comp 0.0.199 → 0.0.200
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/auto-imports.d.ts +3 -0
- package/components.d.ts +0 -3
- package/es/ChartLayout.js +4 -4
- package/es/ConfigProvider.cjs +1 -1
- package/es/ConfigProvider.js +1 -1
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +281 -217
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +68 -71
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +19 -21
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +28 -30
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +23 -25
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +18 -20
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +21 -23
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +2 -2
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +72 -74
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +157 -9
- package/es/Pie.cjs +1 -1
- package/es/Pie.js +1 -1
- package/es/Table.cjs +1 -1
- package/es/Table.js +50 -53
- package/es/User.cjs +1 -1
- package/es/User.js +1 -1223
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +26 -28
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +18 -19
- package/es/VarietySearch.cjs +7 -7
- package/es/VarietySearch.js +693 -697
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +15 -15
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +79 -80
- package/es/{base-a5af3db3.js → base-8348063b.js} +38 -38
- package/es/{castArray-7741a212.js → castArray-3f45c3ec.js} +1 -1
- package/es/{config-provider-b16efd62.js → config-provider-1a687690.js} +6 -6
- package/es/{config-provider-a584d81e.cjs → config-provider-eb0460f1.cjs} +1 -1
- package/es/el-autocomplete-86c0d989.cjs +1 -0
- package/es/{el-autocomplete-ba808eb6.js → el-autocomplete-d4cd96cd.js} +16 -16
- package/es/{el-button-c95adb85.js → el-button-2e680390.js} +33 -33
- package/es/{el-button-eec58cff.cjs → el-button-4ccd7122.cjs} +1 -1
- package/es/el-checkbox-group-dfdad075.cjs +1 -0
- package/es/el-checkbox-group-e26a4533.js +67 -0
- package/es/{el-dialog-ae86edb8.cjs → el-dialog-6413b4af.cjs} +1 -1
- package/es/{el-dialog-41ab8417.js → el-dialog-bafc4b2b.js} +6 -7
- package/es/{el-divider-4e059794.js → el-divider-93b0ee21.js} +1 -1
- package/es/{el-empty-33cb66f1.js → el-empty-56783dca.js} +3 -3
- package/es/el-form-item-41becb31.js +1749 -0
- package/es/el-form-item-95476197.cjs +12 -0
- package/es/{el-input-7fd293af.cjs → el-input-6c5ac889.cjs} +1 -1
- package/es/{el-input-2f75c4ba.js → el-input-735575f4.js} +34 -34
- package/es/{el-input-number-5193fe6d.js → el-input-number-6634a6ea.js} +35 -35
- package/es/{el-input-number-22e21d16.cjs → el-input-number-d5770776.cjs} +1 -1
- package/es/{el-loading-f6022062.js → el-loading-049dacc5.js} +5 -5
- package/es/{el-loading-cfd86c15.cjs → el-loading-98dcebee.cjs} +1 -1
- package/es/{el-menu-item-17dc717e.cjs → el-menu-item-828bc6fa.cjs} +1 -1
- package/es/{el-menu-item-7e881203.js → el-menu-item-8a210e21.js} +22 -22
- package/es/{el-message-5e6a6be9.cjs → el-message-a1ac37d4.cjs} +1 -1
- package/es/{el-message-e544a8f5.js → el-message-def216ae.js} +24 -24
- package/es/{el-overlay-09ad71cd.js → el-overlay-4ea38eab.js} +51 -51
- package/es/{el-overlay-9e34965f.cjs → el-overlay-69dfacb6.cjs} +1 -1
- package/es/{el-popconfirm-81dcd202.js → el-popconfirm-aace1104.js} +20 -20
- package/es/{el-popconfirm-70a976bf.cjs → el-popconfirm-bdeceeb7.cjs} +1 -1
- package/es/{_initCloneObject-52b6a510.cjs → el-popover-5421d52a.cjs} +1 -1
- package/es/{_initCloneObject-eaef9418.js → el-popover-7a1c6412.js} +9 -9
- package/es/{el-popper-b4f97157.js → el-popper-986a8371.js} +112 -115
- package/es/{el-popper-b6c99b28.cjs → el-popper-b962125f.cjs} +1 -1
- package/es/el-scrollbar-139aa96d.cjs +1 -0
- package/es/el-scrollbar-cdadd788.js +115 -0
- package/es/{el-segmented-f8fce9ac.cjs → el-segmented-6b057ed5.cjs} +1 -1
- package/es/{el-segmented-b868d074.js → el-segmented-f892ec18.js} +8 -8
- package/es/{el-select-95627997.js → el-select-2189a8ac.js} +41 -42
- package/es/el-select-e1046cc6.cjs +1 -0
- package/es/{el-table-column-72c50d58.js → el-table-column-91d69c86.js} +14 -14
- package/es/el-table-column-f1c4af89.cjs +14 -0
- package/es/{el-tag-66cab138.js → el-tag-75a7573a.js} +16 -16
- package/es/{el-tag-a33c4b22.cjs → el-tag-a15520b3.cjs} +1 -1
- package/es/{index-d77a7336.js → index-14c88a1a.js} +1 -1
- package/es/{index-11547a0c.cjs → index-16802b35.cjs} +1 -1
- package/es/{index-098c2447.cjs → index-1fb95601.cjs} +1 -1
- package/es/index-56ea97a9.js +122 -0
- package/es/{index-c108567d.cjs → index-5e0314ac.cjs} +1 -1
- package/es/{index-298075cf.cjs → index-680be212.cjs} +1 -1
- package/es/{index-bc8e277e.js → index-780e7fd2.js} +2 -2
- package/es/{index-d725fef6.cjs → index-78381381.cjs} +2 -2
- package/es/{index-a871c3eb.js → index-847d58bc.js} +62 -92
- package/es/index-8583c047.cjs +1 -0
- package/es/{index-7ed0999e.js → index-9cfb6ccf.js} +0 -2
- package/es/{index-e5566b94.js → index-c94b9543.js} +43 -43
- package/es/{index-8901a38c.cjs → index-cc200b99.cjs} +1 -1
- package/es/index-ce63356a.cjs +1 -0
- package/es/index-db1e1861.js +318 -0
- package/es/{index-960806da.js → index-e00ee015.js} +36 -36
- package/es/{index-844bdd85.js → index-f3a86049.js} +29 -29
- package/es/{index-d91dc23f.js → index-f45c2897.js} +20 -20
- package/es/{python-c27ba105.cjs → python-2e916d28.cjs} +1 -1
- package/es/{python-ecde9ff2.js → python-7cf0b6ba.js} +2 -2
- package/es/{raf-80ef0c0a.js → raf-8e5f0699.js} +1 -1
- package/es/{scroll-679bd6bf.js → scroll-c43468ab.js} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-fd9b61a0.cjs → use-form-common-props-d8866dc6.cjs} +1 -1
- package/es/{use-form-common-props-815d48a6.js → use-form-common-props-e6cba60f.js} +69 -69
- package/es/{use-global-config-30d7d8ce.cjs → use-global-config-72d50e62.cjs} +1 -1
- package/es/{use-global-config-b5e9d3d5.js → use-global-config-76ff2e3e.js} +14 -14
- package/es/{validator-764a9db0.js → validator-220652c5.js} +1 -1
- package/es/{validator-1b8a6128.cjs → validator-e759d43d.cjs} +1 -1
- package/es/{zh-cn-90317f62.cjs → zh-cn-33e7aee6.cjs} +1 -1
- package/es/{zh-cn-e963c628.js → zh-cn-c7fa42ea.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +205 -205
- package/lib/{index-c9dddb13.js → index-410c490f.js} +19955 -19802
- package/lib/{python-8de8f552.js → python-589861d2.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/CustomFunction/index.vue +141 -30
- package/packages/User/components/EditInfoDialog/Mobile.vue +110 -0
- package/packages/User/components/EditInfoDialog/index.vue +136 -0
- package/packages/User/components/SetPasswordDialog.vue +6 -3
- package/packages/User/index.vue +7 -22
- package/es/debounce-62f5b6e8.cjs +0 -1
- package/es/debounce-8d53f4dd.js +0 -83
- package/es/dropdown-071c5d7e.cjs +0 -1
- package/es/dropdown-a59bba73.js +0 -178
- package/es/el-autocomplete-a07e9439.cjs +0 -1
- package/es/el-form-item-c3fe189b.cjs +0 -12
- package/es/el-form-item-eeb64520.js +0 -1269
- package/es/el-message-box-48d71ee5.cjs +0 -1
- package/es/el-message-box-81ffd21e.js +0 -550
- package/es/el-popover-0ea8fbf8.cjs +0 -1
- package/es/el-popover-4ed993c7.js +0 -1
- package/es/el-scrollbar-323542e7.js +0 -34
- package/es/el-scrollbar-bc3f790d.cjs +0 -1
- package/es/el-select-d8d91db1.cjs +0 -1
- package/es/el-table-column-079b76f5.cjs +0 -14
- package/es/index-1f7d4f70.js +0 -157
- package/es/index-57672682.js +0 -113
- package/es/index-88546436.js +0 -163
- package/es/index-9b9ef5dd.cjs +0 -1
- package/es/index-f3562b52.cjs +0 -1
- package/es/index-f967d6c1.cjs +0 -1
- package/es/vnode-5ddb7ed1.js +0 -14
- package/es/vnode-b906ae6d.cjs +0 -1
- package/packages/User/components/EditInfoDialog.vue +0 -144
package/es/VirtualTable.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as Qt } from "./el-empty-
|
|
3
|
-
import { B as Fl } from "./el-scrollbar-
|
|
4
|
-
import { E as
|
|
5
|
-
import { E as
|
|
6
|
-
import { getCurrentInstance as nt, computed as E, defineComponent as xe, ref as F, reactive as
|
|
7
|
-
import { d as Zl } from "./debounce-8d53f4dd.js";
|
|
1
|
+
import { M as Oe, d as I, b as ae, u as Ie, g as xt, e as Q, m as We, h as Qe, a as Tt, i as Dl, c as Nt, z as Pl, p as $l, w as Jt } from "./base-8348063b.js";
|
|
2
|
+
import { E as Qt } from "./el-empty-56783dca.js";
|
|
3
|
+
import { B as Fl, d as Wl } from "./el-scrollbar-cdadd788.js";
|
|
4
|
+
import { E as Gl } from "./el-divider-93b0ee21.js";
|
|
5
|
+
import { E as kl } from "./el-button-2e680390.js";
|
|
6
|
+
import { getCurrentInstance as nt, computed as E, defineComponent as xe, ref as F, reactive as Vl, unref as n, watch as Re, onBeforeUnmount as el, h as ue, withModifiers as Kl, shallowRef as $e, nextTick as Se, isVNode as Ne, toRef as Lt, inject as Et, onUpdated as Bl, createVNode as C, onMounted as rt, resolveDynamicComponent as zt, Fragment as jl, provide as tl, onActivated as ql, mergeProps as Y, renderSlot as Ye, mergeModels as Dt, useModel as Ul, onUnmounted as Yl, openBlock as Xe, createBlock as it, withCtx as De, createElementBlock as Zl, createTextVNode as Pt, createCommentVNode as $t } from "vue";
|
|
8
7
|
import { m as ll } from "./typescript-7ae59c4c.js";
|
|
9
|
-
import { c as Xl } from "./castArray-
|
|
10
|
-
import {
|
|
11
|
-
import { c as ol, r as nl } from "./raf-
|
|
12
|
-
import {
|
|
13
|
-
import { g as to } from "./scroll-
|
|
14
|
-
import { E as rl,
|
|
15
|
-
import { g as ro } from "./index-
|
|
8
|
+
import { c as Xl } from "./castArray-3f45c3ec.js";
|
|
9
|
+
import { a as Jl, h as Ql } from "./use-form-common-props-e6cba60f.js";
|
|
10
|
+
import { c as ol, r as nl } from "./raf-8e5f0699.js";
|
|
11
|
+
import { o as eo } from "./index-e00ee015.js";
|
|
12
|
+
import { g as to } from "./scroll-c43468ab.js";
|
|
13
|
+
import { E as rl, r as lo, z as oo, A as no } from "./index-847d58bc.js";
|
|
14
|
+
import { g as ro } from "./index-14c88a1a.js";
|
|
16
15
|
import { _ as ao } from "./_plugin-vue_export-helper-dad06003.js";
|
|
17
16
|
import "./index-2e331d74.js";
|
|
18
|
-
import "./use-global-config-
|
|
19
|
-
import "./index-
|
|
17
|
+
import "./use-global-config-76ff2e3e.js";
|
|
18
|
+
import "./index-c94b9543.js";
|
|
20
19
|
import "./index-657047bb.js";
|
|
21
20
|
var Ft = Number.isNaN || function(t) {
|
|
22
21
|
return typeof t == "number" && t !== t;
|
|
@@ -57,7 +56,7 @@ const uo = () => {
|
|
|
57
56
|
const l = (o, a, r) => ({});
|
|
58
57
|
return t.perfMode ? eo(l) : co(l);
|
|
59
58
|
});
|
|
60
|
-
}, Wt = 50, Gt = "itemRendered", kt = "scroll",
|
|
59
|
+
}, Wt = 50, Gt = "itemRendered", kt = "scroll", Be = "forward", dt = "backward", He = "auto", al = "smart", ut = "start", Fe = "center", ht = "end", ft = "horizontal", sl = "vertical", il = "rtl", mt = "negative", cl = "positive-ascending", dl = "positive-descending", ho = {
|
|
61
60
|
[ft]: "left",
|
|
62
61
|
[sl]: "top"
|
|
63
62
|
}, fo = 20, vt = Oe({
|
|
@@ -173,7 +172,7 @@ const uo = () => {
|
|
|
173
172
|
startGap: fl,
|
|
174
173
|
endGap: ml,
|
|
175
174
|
visible: Boolean
|
|
176
|
-
}), Je = (e, t) => e < t ?
|
|
175
|
+
}), Je = (e, t) => e < t ? Be : dt, Vt = (e) => e === il;
|
|
177
176
|
let Pe = null;
|
|
178
177
|
function Kt(e = !1) {
|
|
179
178
|
if (Pe === null || e) {
|
|
@@ -188,14 +187,14 @@ function go({ move: e, size: t, bar: l }, o) {
|
|
|
188
187
|
const a = {}, r = `translate${l.axis}(${e}px)`;
|
|
189
188
|
return a[l.size] = t, a.transform = r, o === "horizontal" ? a.height = "100%" : a.width = "100%", a;
|
|
190
189
|
}
|
|
191
|
-
const
|
|
190
|
+
const Bt = xe({
|
|
192
191
|
name: "ElVirtualScrollBar",
|
|
193
192
|
props: vl,
|
|
194
193
|
emits: ["scroll", "start-move", "stop-move"],
|
|
195
194
|
setup(e, { emit: t }) {
|
|
196
195
|
const l = E(() => e.startGap + e.endGap), o = Ie("virtual-scrollbar"), a = Ie("scrollbar"), r = F(), s = F();
|
|
197
196
|
let c = null, m = null;
|
|
198
|
-
const f =
|
|
197
|
+
const f = Vl({
|
|
199
198
|
isDragging: !1,
|
|
200
199
|
traveled: 0
|
|
201
200
|
}), u = E(() => Fl[e.layout]), v = E(() => e.clientSize - n(l)), b = E(() => ({
|
|
@@ -266,7 +265,7 @@ const jt = xe({
|
|
|
266
265
|
(e.alwaysOn || f.isDragging) && "always-on"
|
|
267
266
|
],
|
|
268
267
|
style: b.value,
|
|
269
|
-
onMousedown:
|
|
268
|
+
onMousedown: Kl(M, ["stop", "prevent"]),
|
|
270
269
|
onTouchstartPrevent: g
|
|
271
270
|
}, ue("div", {
|
|
272
271
|
ref: s,
|
|
@@ -276,7 +275,7 @@ const jt = xe({
|
|
|
276
275
|
}, []));
|
|
277
276
|
}
|
|
278
277
|
});
|
|
279
|
-
var
|
|
278
|
+
var je = /* @__PURE__ */ ((e) => (e.ASC = "asc", e.DESC = "desc", e))(je || {}), qe = /* @__PURE__ */ ((e) => (e.LEFT = "left", e.CENTER = "center", e.RIGHT = "right", e))(qe || {}), gl = /* @__PURE__ */ ((e) => (e.LEFT = "left", e.RIGHT = "right", e))(gl || {});
|
|
280
279
|
const St = {
|
|
281
280
|
asc: "desc",
|
|
282
281
|
desc: "asc"
|
|
@@ -331,7 +330,7 @@ function wo(e, t, l) {
|
|
|
331
330
|
if (!g)
|
|
332
331
|
return;
|
|
333
332
|
const { sortState: S, sortBy: H } = e;
|
|
334
|
-
let M =
|
|
333
|
+
let M = je.ASC;
|
|
335
334
|
xt(S) ? M = St[S[g]] : M = St[H.order], (i = e.onColumnSort) == null || i.call(e, { column: b(g), key: g, order: M });
|
|
336
335
|
}
|
|
337
336
|
return {
|
|
@@ -411,8 +410,8 @@ const bo = (e, {
|
|
|
411
410
|
function H({ hovered: x, rowKey: A }) {
|
|
412
411
|
if (s.value)
|
|
413
412
|
return;
|
|
414
|
-
a.vnode.el.querySelectorAll(`[rowkey="${String(A)}"]`).forEach((
|
|
415
|
-
x ?
|
|
413
|
+
a.vnode.el.querySelectorAll(`[rowkey="${String(A)}"]`).forEach((B) => {
|
|
414
|
+
x ? B.classList.add(r.is("hovered")) : B.classList.remove(r.is("hovered"));
|
|
416
415
|
});
|
|
417
416
|
}
|
|
418
417
|
function M({
|
|
@@ -421,16 +420,16 @@ const bo = (e, {
|
|
|
421
420
|
rowIndex: W,
|
|
422
421
|
rowKey: N
|
|
423
422
|
}) {
|
|
424
|
-
var
|
|
423
|
+
var B, j;
|
|
425
424
|
const V = [...n(u)], U = V.indexOf(N);
|
|
426
|
-
x ? U === -1 && V.push(N) : U > -1 && V.splice(U, 1), u.value = V, m("update:expandedRowKeys", V), (
|
|
425
|
+
x ? U === -1 && V.push(N) : U > -1 && V.splice(U, 1), u.value = V, m("update:expandedRowKeys", V), (B = e.onRowExpand) == null || B.call(e, {
|
|
427
426
|
expanded: x,
|
|
428
427
|
rowData: A,
|
|
429
428
|
rowIndex: W,
|
|
430
429
|
rowKey: N
|
|
431
|
-
}), (
|
|
430
|
+
}), (j = e.onExpandedRowsChange) == null || j.call(e, V), a.vnode.el.querySelector(`.${r.is("hovered")}[rowkey="${String(N)}"]`) && Se(() => H({ hovered: !0, rowKey: N }));
|
|
432
431
|
}
|
|
433
|
-
const R =
|
|
432
|
+
const R = Wl(() => {
|
|
434
433
|
var x, A, W, N;
|
|
435
434
|
f.value = !0, y.value = { ...n(y), ...n(w) }, $(n(b), !1), w.value = {}, b.value = null, (x = t.value) == null || x.forceUpdate(), (A = l.value) == null || A.forceUpdate(), (W = o.value) == null || W.forceUpdate(), (N = c.proxy) == null || N.$forceUpdate(), f.value = !1;
|
|
436
435
|
}, 0);
|
|
@@ -446,8 +445,8 @@ const bo = (e, {
|
|
|
446
445
|
}
|
|
447
446
|
function G({ rowKey: x, height: A, rowIndex: W }, N) {
|
|
448
447
|
N ? N === gl.RIGHT ? i.value[x] = A : h.value[x] = A : d.value[x] = A;
|
|
449
|
-
const
|
|
450
|
-
n(y)[x] !==
|
|
448
|
+
const B = Math.max(...[h, i, d].map((j) => j.value[x] || 0));
|
|
449
|
+
n(y)[x] !== B && (z(x, B, W), R());
|
|
451
450
|
}
|
|
452
451
|
return {
|
|
453
452
|
expandedRowKeys: u,
|
|
@@ -568,8 +567,8 @@ function Eo(e) {
|
|
|
568
567
|
resetAfterIndex: A,
|
|
569
568
|
onRowExpanded: W,
|
|
570
569
|
onRowHeightChange: N,
|
|
571
|
-
onRowHovered:
|
|
572
|
-
onRowsRendered:
|
|
570
|
+
onRowHovered: B,
|
|
571
|
+
onRowsRendered: j
|
|
573
572
|
} = So(e, {
|
|
574
573
|
mainTableRef: t,
|
|
575
574
|
leftTableRef: l,
|
|
@@ -647,9 +646,9 @@ function Eo(e) {
|
|
|
647
646
|
showEmpty: Ge,
|
|
648
647
|
getRowHeight: ke,
|
|
649
648
|
onColumnSorted: v,
|
|
650
|
-
onRowHovered:
|
|
649
|
+
onRowHovered: B,
|
|
651
650
|
onRowExpanded: W,
|
|
652
|
-
onRowsRendered:
|
|
651
|
+
onRowsRendered: j,
|
|
653
652
|
onRowHeightChange: N,
|
|
654
653
|
scrollTo: b,
|
|
655
654
|
scrollToLeft: y,
|
|
@@ -667,7 +666,7 @@ const _t = Symbol("tableV2"), wl = "tableV2GridScrollLeft", bl = String, Ze = {
|
|
|
667
666
|
}, Sl = {
|
|
668
667
|
...Ct,
|
|
669
668
|
required: !0
|
|
670
|
-
}, _o = String,
|
|
669
|
+
}, _o = String, jt = {
|
|
671
670
|
type: I(Array),
|
|
672
671
|
default: () => ll([])
|
|
673
672
|
}, Ce = {
|
|
@@ -820,8 +819,8 @@ const _t = Symbol("tableV2"), wl = "tableV2GridScrollLeft", bl = String, Ze = {
|
|
|
820
819
|
},
|
|
821
820
|
fixedData: Ct,
|
|
822
821
|
expandColumnKey: pe.expandColumnKey,
|
|
823
|
-
expandedRowKeys:
|
|
824
|
-
defaultExpandedRowKeys:
|
|
822
|
+
expandedRowKeys: jt,
|
|
823
|
+
defaultExpandedRowKeys: jt,
|
|
825
824
|
class: bl,
|
|
826
825
|
fixed: Boolean,
|
|
827
826
|
style: {
|
|
@@ -921,7 +920,7 @@ const _t = Symbol("tableV2"), wl = "tableV2GridScrollLeft", bl = String, Ze = {
|
|
|
921
920
|
});
|
|
922
921
|
});
|
|
923
922
|
};
|
|
924
|
-
return
|
|
923
|
+
return Bl(() => {
|
|
925
924
|
a != null && a.value && f(a.value);
|
|
926
925
|
}), l({
|
|
927
926
|
scrollToLeft: f
|
|
@@ -986,24 +985,24 @@ const Io = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o },
|
|
|
986
985
|
scrollLeft: Q(h.initScrollLeft) ? h.initScrollLeft : 0,
|
|
987
986
|
scrollTop: Q(h.initScrollTop) ? h.initScrollTop : 0,
|
|
988
987
|
updateRequested: !1,
|
|
989
|
-
xAxisScrollDir:
|
|
990
|
-
yAxisScrollDir:
|
|
991
|
-
}), A = uo(), W = E(() => Number.parseInt(`${h.height}`, 10)), N = E(() => Number.parseInt(`${h.width}`, 10)),
|
|
988
|
+
xAxisScrollDir: Be,
|
|
989
|
+
yAxisScrollDir: Be
|
|
990
|
+
}), A = uo(), W = E(() => Number.parseInt(`${h.height}`, 10)), N = E(() => Number.parseInt(`${h.width}`, 10)), B = E(() => {
|
|
992
991
|
const { totalColumn: T, totalRow: _, columnCache: p } = h, { isScrolling: D, xAxisScrollDir: L, scrollLeft: O } = n(x);
|
|
993
992
|
if (T === 0 || _ === 0)
|
|
994
993
|
return [0, 0, 0, 0];
|
|
995
|
-
const P = o(h, O, n(M)), k = a(h, P, O, n(M)), K = !D || L === dt ? Math.max(1, p) : 1, X = !D || L ===
|
|
994
|
+
const P = o(h, O, n(M)), k = a(h, P, O, n(M)), K = !D || L === dt ? Math.max(1, p) : 1, X = !D || L === Be ? Math.max(1, p) : 1;
|
|
996
995
|
return [
|
|
997
996
|
Math.max(0, P - K),
|
|
998
997
|
Math.max(0, Math.min(T - 1, k + X)),
|
|
999
998
|
P,
|
|
1000
999
|
k
|
|
1001
1000
|
];
|
|
1002
|
-
}),
|
|
1001
|
+
}), j = E(() => {
|
|
1003
1002
|
const { totalColumn: T, totalRow: _, rowCache: p } = h, { isScrolling: D, yAxisScrollDir: L, scrollTop: O } = n(x);
|
|
1004
1003
|
if (T === 0 || _ === 0)
|
|
1005
1004
|
return [0, 0, 0, 0];
|
|
1006
|
-
const P = u(h, O, n(M)), k = v(h, P, O, n(M)), K = !D || L === dt ? Math.max(1, p) : 1, X = !D || L ===
|
|
1005
|
+
const P = u(h, O, n(M)), k = v(h, P, O, n(M)), K = !D || L === dt ? Math.max(1, p) : 1, X = !D || L === Be ? Math.max(1, p) : 1;
|
|
1007
1006
|
return [
|
|
1008
1007
|
Math.max(0, P - K),
|
|
1009
1008
|
Math.max(0, Math.min(_ - 1, k + X)),
|
|
@@ -1041,7 +1040,7 @@ const Io = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o },
|
|
|
1041
1040
|
K,
|
|
1042
1041
|
X,
|
|
1043
1042
|
te
|
|
1044
|
-
] = n(
|
|
1043
|
+
] = n(B), [J, ee, Ee, at] = n(j);
|
|
1045
1044
|
d(Gt, {
|
|
1046
1045
|
columnCacheStart: k,
|
|
1047
1046
|
columnCacheEnd: K,
|
|
@@ -1214,7 +1213,7 @@ const Io = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o },
|
|
|
1214
1213
|
scrollbarEndGap: p,
|
|
1215
1214
|
totalColumn: D,
|
|
1216
1215
|
totalRow: L
|
|
1217
|
-
} = h, O = n(N), P = n(W), k = n(U), K = n(V), { scrollLeft: X, scrollTop: te } = n(x), J = ue(
|
|
1216
|
+
} = h, O = n(N), P = n(W), k = n(U), K = n(V), { scrollLeft: X, scrollTop: te } = n(x), J = ue(Bt, {
|
|
1218
1217
|
ref: $,
|
|
1219
1218
|
alwaysOn: T,
|
|
1220
1219
|
startGap: _,
|
|
@@ -1227,7 +1226,7 @@ const Io = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o },
|
|
|
1227
1226
|
scrollFrom: X / (k - O),
|
|
1228
1227
|
total: L,
|
|
1229
1228
|
visible: !0
|
|
1230
|
-
}), ee = ue(
|
|
1229
|
+
}), ee = ue(Bt, {
|
|
1231
1230
|
ref: z,
|
|
1232
1231
|
alwaysOn: T,
|
|
1233
1232
|
startGap: _,
|
|
@@ -1247,7 +1246,7 @@ const Io = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o },
|
|
|
1247
1246
|
};
|
|
1248
1247
|
}, q = () => {
|
|
1249
1248
|
var T;
|
|
1250
|
-
const [_, p] = n(
|
|
1249
|
+
const [_, p] = n(B), [D, L] = n(j), { data: O, totalColumn: P, totalRow: k, useIsScrolling: K, itemKey: X } = h, te = [];
|
|
1251
1250
|
if (k > 0 && P > 0)
|
|
1252
1251
|
for (let J = D; J <= L; J++)
|
|
1253
1252
|
for (let ee = _; ee <= p; ee++) {
|
|
@@ -1608,7 +1607,7 @@ const Io = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o },
|
|
|
1608
1607
|
scrollToRow: i,
|
|
1609
1608
|
scrollLeft: g
|
|
1610
1609
|
} = Po(e);
|
|
1611
|
-
tl(wl, g),
|
|
1610
|
+
tl(wl, g), ql(async () => {
|
|
1612
1611
|
var H;
|
|
1613
1612
|
await Se();
|
|
1614
1613
|
const M = (H = a.value) == null ? void 0 : H.states.scrollTop;
|
|
@@ -1634,14 +1633,14 @@ const Io = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o },
|
|
|
1634
1633
|
scrollbarStartGap: A,
|
|
1635
1634
|
style: W,
|
|
1636
1635
|
rowHeight: N,
|
|
1637
|
-
bodyWidth:
|
|
1638
|
-
estimatedRowHeight:
|
|
1636
|
+
bodyWidth: B,
|
|
1637
|
+
estimatedRowHeight: j,
|
|
1639
1638
|
headerWidth: V,
|
|
1640
1639
|
height: U,
|
|
1641
1640
|
width: le,
|
|
1642
1641
|
getRowHeight: fe,
|
|
1643
1642
|
onScroll: se
|
|
1644
|
-
} = e, re = Q(
|
|
1643
|
+
} = e, re = Q(j), me = re ? Lo : zo, ie = n(f);
|
|
1645
1644
|
return C("div", {
|
|
1646
1645
|
role: "table",
|
|
1647
1646
|
class: [o.e("table"), e.class],
|
|
@@ -1652,7 +1651,7 @@ const Io = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o },
|
|
|
1652
1651
|
useIsScrolling: z,
|
|
1653
1652
|
itemKey: b,
|
|
1654
1653
|
columnCache: 0,
|
|
1655
|
-
columnWidth: re ? S :
|
|
1654
|
+
columnWidth: re ? S : B,
|
|
1656
1655
|
totalColumn: 1,
|
|
1657
1656
|
totalRow: R.length,
|
|
1658
1657
|
rowCache: H,
|
|
@@ -1732,10 +1731,10 @@ const Vo = (e, {
|
|
|
1732
1731
|
});
|
|
1733
1732
|
};
|
|
1734
1733
|
var Ko = Vo;
|
|
1735
|
-
function
|
|
1734
|
+
function Bo(e) {
|
|
1736
1735
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ne(e);
|
|
1737
1736
|
}
|
|
1738
|
-
const
|
|
1737
|
+
const jo = (e, {
|
|
1739
1738
|
slots: t
|
|
1740
1739
|
}) => {
|
|
1741
1740
|
if (!e.columns.length)
|
|
@@ -1746,11 +1745,11 @@ const Bo = (e, {
|
|
|
1746
1745
|
} = e;
|
|
1747
1746
|
return C(pt, Y({
|
|
1748
1747
|
ref: l
|
|
1749
|
-
}, o),
|
|
1748
|
+
}, o), Bo(t) ? t : {
|
|
1750
1749
|
default: () => [t]
|
|
1751
1750
|
});
|
|
1752
1751
|
};
|
|
1753
|
-
var qo =
|
|
1752
|
+
var qo = jo;
|
|
1754
1753
|
const Uo = (e) => {
|
|
1755
1754
|
const {
|
|
1756
1755
|
isScrolling: t
|
|
@@ -1969,20 +1968,20 @@ const Qo = (e, {
|
|
|
1969
1968
|
};
|
|
1970
1969
|
return C(Xo, Y(W, {
|
|
1971
1970
|
onRowExpand: S,
|
|
1972
|
-
onMouseenter: (
|
|
1971
|
+
onMouseenter: (j) => {
|
|
1973
1972
|
A == null || A({
|
|
1974
1973
|
hovered: !0,
|
|
1975
1974
|
rowKey: R,
|
|
1976
|
-
event:
|
|
1975
|
+
event: j,
|
|
1977
1976
|
rowData: f,
|
|
1978
1977
|
rowIndex: u
|
|
1979
1978
|
});
|
|
1980
1979
|
},
|
|
1981
|
-
onMouseleave: (
|
|
1980
|
+
onMouseleave: (j) => {
|
|
1982
1981
|
A == null || A({
|
|
1983
1982
|
hovered: !1,
|
|
1984
1983
|
rowKey: R,
|
|
1985
|
-
event:
|
|
1984
|
+
event: j,
|
|
1986
1985
|
rowData: f,
|
|
1987
1986
|
rowIndex: u
|
|
1988
1987
|
});
|
|
@@ -2083,15 +2082,15 @@ const pl = ({
|
|
|
2083
2082
|
rowIndex: c
|
|
2084
2083
|
}, z = yl(g), G = z ? z($) : Ye(d, "default", $, () => [C(tn, $, null)]), x = [u.e("row-cell"), t.class, t.align === qe.CENTER && u.is("align-center"), t.align === qe.RIGHT && u.is("align-right")], A = c >= 0 && b && t.key === b, W = c >= 0 && f.includes(s[h]);
|
|
2085
2084
|
let N;
|
|
2086
|
-
const
|
|
2085
|
+
const B = `margin-inline-start: ${o * y}px;`;
|
|
2087
2086
|
return A && (xt(a) ? N = C(on, Y(a, {
|
|
2088
2087
|
class: [u.e("expand-icon"), u.is("expanded", W)],
|
|
2089
2088
|
size: w,
|
|
2090
2089
|
expanded: W,
|
|
2091
|
-
style:
|
|
2090
|
+
style: B,
|
|
2092
2091
|
expandable: !0
|
|
2093
2092
|
}), null) : N = C("div", {
|
|
2094
|
-
style: [
|
|
2093
|
+
style: [B, `width: ${w}px; height: ${w}px;`].join(" ")
|
|
2095
2094
|
}, null)), C("div", Y({
|
|
2096
2095
|
class: x,
|
|
2097
2096
|
style: i
|
|
@@ -2195,7 +2194,7 @@ const hn = (e) => {
|
|
|
2195
2194
|
size: 14,
|
|
2196
2195
|
class: e.class
|
|
2197
2196
|
}, {
|
|
2198
|
-
default: () => [t ===
|
|
2197
|
+
default: () => [t === je.ASC ? C(oo, null, null) : C(no, null, null)]
|
|
2199
2198
|
});
|
|
2200
2199
|
};
|
|
2201
2200
|
var fn = hn;
|
|
@@ -2228,9 +2227,9 @@ const mn = (e, {
|
|
|
2228
2227
|
let d, i;
|
|
2229
2228
|
if (w) {
|
|
2230
2229
|
const H = w[l.key];
|
|
2231
|
-
d = !!St[H], i = d ? H :
|
|
2230
|
+
d = !!St[H], i = d ? H : je.ASC;
|
|
2232
2231
|
} else
|
|
2233
|
-
d = l.key === y.key, i = d ? y.order :
|
|
2232
|
+
d = l.key === y.key, i = d ? y.order : je.ASC;
|
|
2234
2233
|
const g = [o.e("header-cell"), Ae(m, e, ""), l.align === qe.CENTER && o.is("align-center"), l.align === qe.RIGHT && o.is("align-right"), f && o.is("sortable")], S = {
|
|
2235
2234
|
...Ae(h, e),
|
|
2236
2235
|
onClick: l.sortable ? r : void 0,
|
|
@@ -2316,8 +2315,8 @@ const wn = "ElTableV2", bn = xe({
|
|
|
2316
2315
|
scrollTo: A,
|
|
2317
2316
|
scrollToLeft: W,
|
|
2318
2317
|
scrollToTop: N,
|
|
2319
|
-
scrollToRow:
|
|
2320
|
-
getRowHeight:
|
|
2318
|
+
scrollToRow: B,
|
|
2319
|
+
getRowHeight: j,
|
|
2321
2320
|
onColumnSorted: V,
|
|
2322
2321
|
onRowHeightChange: U,
|
|
2323
2322
|
onRowHovered: le,
|
|
@@ -2330,7 +2329,7 @@ const wn = "ElTableV2", bn = xe({
|
|
|
2330
2329
|
scrollTo: A,
|
|
2331
2330
|
scrollToLeft: W,
|
|
2332
2331
|
scrollToTop: N,
|
|
2333
|
-
scrollToRow:
|
|
2332
|
+
scrollToRow: B
|
|
2334
2333
|
}), tl(_t, {
|
|
2335
2334
|
ns: o,
|
|
2336
2335
|
isResetting: H,
|
|
@@ -2378,7 +2377,7 @@ const wn = "ElTableV2", bn = xe({
|
|
|
2378
2377
|
scrollbarEndGap: P,
|
|
2379
2378
|
useIsScrolling: O,
|
|
2380
2379
|
width: k,
|
|
2381
|
-
getRowHeight:
|
|
2380
|
+
getRowHeight: j,
|
|
2382
2381
|
onRowsRendered: se,
|
|
2383
2382
|
onScroll: re
|
|
2384
2383
|
}, te = n(u), J = n(f), ee = {
|
|
@@ -2400,7 +2399,7 @@ const wn = "ElTableV2", bn = xe({
|
|
|
2400
2399
|
scrollbarEndGap: P,
|
|
2401
2400
|
useIsScrolling: O,
|
|
2402
2401
|
width: te,
|
|
2403
|
-
getRowHeight:
|
|
2402
|
+
getRowHeight: j,
|
|
2404
2403
|
onScroll: me
|
|
2405
2404
|
}, Ee = n(v), at = {
|
|
2406
2405
|
cache: ie,
|
|
@@ -2422,7 +2421,7 @@ const wn = "ElTableV2", bn = xe({
|
|
|
2422
2421
|
width: Ee,
|
|
2423
2422
|
style: `--${n(o.namespace)}-table-scrollbar-size: ${P}px`,
|
|
2424
2423
|
useIsScrolling: O,
|
|
2425
|
-
getRowHeight:
|
|
2424
|
+
getRowHeight: j,
|
|
2426
2425
|
onScroll: me
|
|
2427
2426
|
}, ze = n(a), Ol = {
|
|
2428
2427
|
ns: o,
|
|
@@ -2619,7 +2618,7 @@ const Hn = {
|
|
|
2619
2618
|
...o.config
|
|
2620
2619
|
})), r = F(null), s = F(0);
|
|
2621
2620
|
let c = 0, m = !1, f = null;
|
|
2622
|
-
const u =
|
|
2621
|
+
const u = Ul(e, "tableActiveData"), v = E(() => u.value.map((i) => i[a.value.tableActiveKey])), b = ({
|
|
2623
2622
|
rowData: i,
|
|
2624
2623
|
rowIndex: g
|
|
2625
2624
|
}) => {
|
|
@@ -2680,10 +2679,10 @@ const Hn = {
|
|
|
2680
2679
|
window.addEventListener("keydown", y);
|
|
2681
2680
|
}), Re(() => o.tableLoading, (i) => {
|
|
2682
2681
|
i || (s.value = 0);
|
|
2683
|
-
}),
|
|
2682
|
+
}), Yl(() => {
|
|
2684
2683
|
window.removeEventListener("keydown", y);
|
|
2685
2684
|
}), (i, g) => {
|
|
2686
|
-
const S = Qt, H =
|
|
2685
|
+
const S = Qt, H = kl, M = Gl, R = _n, $ = Cn;
|
|
2687
2686
|
return Xe(), it($, null, {
|
|
2688
2687
|
default: De(({
|
|
2689
2688
|
height: z,
|
|
@@ -2714,7 +2713,7 @@ const Hn = {
|
|
|
2714
2713
|
height: "100%"
|
|
2715
2714
|
}
|
|
2716
2715
|
})]),
|
|
2717
|
-
footer: De(() => [s.value ? (Xe(),
|
|
2716
|
+
footer: De(() => [s.value ? (Xe(), Zl("div", Hn, [e.tableLoading === "more" ? (Xe(), it(M, {
|
|
2718
2717
|
key: 0
|
|
2719
2718
|
}, {
|
|
2720
2719
|
default: De(() => [C(H, {
|
|
@@ -2739,11 +2738,11 @@ const Hn = {
|
|
|
2739
2738
|
};
|
|
2740
2739
|
}
|
|
2741
2740
|
};
|
|
2742
|
-
const Mn = /* @__PURE__ */ ao(pn, [["__scopeId", "data-v-7e702a8a"]]),
|
|
2741
|
+
const Mn = /* @__PURE__ */ ao(pn, [["__scopeId", "data-v-7e702a8a"]]), Yn = {
|
|
2743
2742
|
install(e) {
|
|
2744
2743
|
e.component("st-virtualTable", Mn);
|
|
2745
2744
|
}
|
|
2746
2745
|
};
|
|
2747
2746
|
export {
|
|
2748
|
-
|
|
2747
|
+
Yn as default
|
|
2749
2748
|
};
|
|
@@ -239,50 +239,50 @@ const Qt = (t, e) => {
|
|
|
239
239
|
n.directive(e, t);
|
|
240
240
|
}, t), Yt = (t) => (t.install = X, t);
|
|
241
241
|
export {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
242
|
+
Ct as A,
|
|
243
|
+
Zt as B,
|
|
244
|
+
At as C,
|
|
245
|
+
Nt as D,
|
|
246
|
+
xt as E,
|
|
247
|
+
V as F,
|
|
248
|
+
O as G,
|
|
249
249
|
ht as H,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
250
|
+
Ft as I,
|
|
251
|
+
Bt as J,
|
|
252
|
+
zt as K,
|
|
253
|
+
It as L,
|
|
254
|
+
Ot as M,
|
|
255
255
|
X as N,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
256
|
+
Tt as O,
|
|
257
|
+
jt as P,
|
|
258
|
+
Rt as Q,
|
|
259
|
+
Z as R,
|
|
260
|
+
Dt as S,
|
|
261
261
|
Ut as _,
|
|
262
|
-
|
|
262
|
+
w as a,
|
|
263
263
|
Mt as b,
|
|
264
264
|
A as c,
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
265
|
+
Lt as d,
|
|
266
|
+
at as e,
|
|
267
|
+
Vt as f,
|
|
268
|
+
_ as g,
|
|
269
|
+
Ht as h,
|
|
270
|
+
P as i,
|
|
271
|
+
Gt as j,
|
|
272
|
+
Jt as k,
|
|
273
|
+
Et as l,
|
|
274
|
+
bt as m,
|
|
275
|
+
Q as n,
|
|
276
|
+
g as o,
|
|
277
|
+
St as p,
|
|
278
|
+
ot as q,
|
|
279
279
|
Wt as r,
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
Xt as s,
|
|
281
|
+
rt as t,
|
|
282
282
|
$t as u,
|
|
283
|
-
|
|
283
|
+
qt as v,
|
|
284
284
|
Qt as w,
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
Kt as x,
|
|
286
|
+
Yt as y,
|
|
287
|
+
b as z
|
|
288
288
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as p, watch as s, renderSlot as l } from "vue";
|
|
2
|
-
import { p as
|
|
3
|
-
import {
|
|
4
|
-
import { b as d, e } from "./base-
|
|
5
|
-
import {
|
|
2
|
+
import { p as u } from "./use-global-config-76ff2e3e.js";
|
|
3
|
+
import { u as m } from "./index-c94b9543.js";
|
|
4
|
+
import { b as d, d as e } from "./base-8348063b.js";
|
|
5
|
+
import { u as c } from "./use-form-common-props-e6cba60f.js";
|
|
6
6
|
const f = d({
|
|
7
7
|
a11y: {
|
|
8
8
|
type: Boolean,
|
|
@@ -39,14 +39,14 @@ const f = d({
|
|
|
39
39
|
type: String,
|
|
40
40
|
default: "el"
|
|
41
41
|
},
|
|
42
|
-
...
|
|
42
|
+
...m
|
|
43
43
|
}), b = {
|
|
44
44
|
placement: "top"
|
|
45
45
|
}, P = p({
|
|
46
46
|
name: "ElConfigProvider",
|
|
47
47
|
props: f,
|
|
48
48
|
setup(o, { slots: i }) {
|
|
49
|
-
const t =
|
|
49
|
+
const t = u(o);
|
|
50
50
|
return s(() => o.message, (a) => {
|
|
51
51
|
var r, n;
|
|
52
52
|
Object.assign(b, (n = (r = t == null ? void 0 : t.value) == null ? void 0 : r.message) != null ? n : {}, a ?? {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),u=require("./use-global-config-
|
|
1
|
+
"use strict";const t=require("vue"),u=require("./use-global-config-72d50e62.cjs"),l=require("./index-5e0314ac.cjs"),e=require("./base-ef747d02.cjs"),d=require("./use-form-common-props-d8866dc6.cjs"),c=e.buildProps({a11y:{type:Boolean,default:!0},locale:{type:e.definePropType(Object)},size:d.useSizeProp,button:{type:e.definePropType(Object)},card:{type:e.definePropType(Object)},dialog:{type:e.definePropType(Object)},link:{type:e.definePropType(Object)},experimentalFeatures:{type:e.definePropType(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:e.definePropType(Object)},zIndex:Number,namespace:{type:String,default:"el"},...l.useEmptyValuesProps}),s={placement:"top"},f=t.defineComponent({name:"ElConfigProvider",props:c,setup(n,{slots:a}){const o=u.provideGlobalConfig(n);return t.watch(()=>n.message,r=>{var i,p;Object.assign(s,(p=(i=o==null?void 0:o.value)==null?void 0:i.message)!=null?p:{},r??{})},{immediate:!0,deep:!0}),()=>t.renderSlot(a,"default",{config:o==null?void 0:o.value})}});exports.ConfigProvider=f;exports.messageConfig=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),K=require("./use-form-common-props-d8866dc6.cjs"),M=require("./index-1fb95601.cjs"),S=require("./el-input-6c5ac889.cjs"),se=require("./index-680be212.cjs"),u=require("./el-popper-b962125f.cjs"),n=require("./base-ef747d02.cjs"),re=require("./index-9780a537.cjs"),ae=require("./el-scrollbar-139aa96d.cjs"),ue=n.buildProps({...S.inputProps,valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:n.definePropType(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:n.definePropType([Function,Array]),default:n.NOOP},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:Boolean,hideLoading:Boolean,teleported:u.useTooltipContentProps.teleported,appendTo:u.useTooltipContentProps.appendTo,highlightFirstItem:Boolean,fitInputWidth:Boolean}),ie={[u.UPDATE_MODEL_EVENT]:s=>n.isString(s)||n.isNumber(s),[u.INPUT_EVENT]:s=>n.isString(s)||n.isNumber(s),[u.CHANGE_EVENT]:s=>n.isString(s)||n.isNumber(s),focus:s=>s instanceof FocusEvent,blur:s=>s instanceof FocusEvent,clear:()=>!0,select:s=>n.isObject(s)},U="ElAutocomplete",ce=e.defineComponent({name:U,inheritAttrs:!1}),de=e.defineComponent({...ce,props:ue,emits:ie,setup(s,{expose:z,emit:d}){const a=s,L=e.computed(()=>u.pick(a,Object.keys(S.inputProps))),R=e.useAttrs(),T=K.useFormDisabled(),i=n.useNamespace("autocomplete"),f=e.ref(),$=e.ref(),b=e.ref(),A=e.ref();let P=!1,C=!1;const p=e.ref([]),r=e.ref(-1),V=e.ref(""),v=e.ref(!1),E=e.ref(!1),m=e.ref(!1),h=re.useId(),W=e.computed(()=>R.style),g=e.computed(()=>(p.value.length>0||m.value)&&v.value),I=e.computed(()=>!a.hideLoading&&m.value),H=e.computed(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),x=()=>{g.value&&(V.value=`${f.value.$el.offsetWidth}px`)},G=()=>{r.value=-1},_=async t=>{if(E.value)return;const o=l=>{m.value=!1,!E.value&&(n.isArray(l)?(p.value=l,r.value=a.highlightFirstItem?0:-1):u.throwError(U,"autocomplete suggestions must be an array"))};if(m.value=!0,n.isArray(a.fetchSuggestions))o(a.fetchSuggestions);else{const l=await a.fetchSuggestions(t,o);n.isArray(l)&&o(l)}},B=ae.debounce(_,a.debounce),j=t=>{const o=!!t;if(d(u.INPUT_EVENT,t),d(u.UPDATE_MODEL_EVENT,t),E.value=!1,v.value||(v.value=o),!a.triggerOnFocus&&!t){E.value=!0,p.value=[];return}B(t)},J=t=>{var o;T.value||(((o=t.target)==null?void 0:o.tagName)!=="INPUT"||H.value.includes(document.activeElement))&&(v.value=!0)},Q=t=>{d(u.CHANGE_EVENT,t)},X=t=>{var o;if(C)C=!1;else{v.value=!0,d("focus",t);const l=(o=a.modelValue)!=null?o:"";a.triggerOnFocus&&!P&&B(String(l))}},Y=t=>{setTimeout(()=>{var o;if((o=b.value)!=null&&o.isFocusInsideContent()){C=!0;return}v.value&&y(),d("blur",t)})},Z=()=>{v.value=!1,d(u.UPDATE_MODEL_EVENT,""),d("clear")},D=async()=>{var t;(t=f.value)!=null&&t.isComposing||(g.value&&r.value>=0&&r.value<p.value.length?w(p.value[r.value]):a.selectWhenUnmatched&&(d("select",{value:a.modelValue}),p.value=[],r.value=-1))},ee=t=>{g.value&&(t.preventDefault(),t.stopPropagation(),y())},y=()=>{v.value=!1},te=()=>{var t;(t=f.value)==null||t.focus()},oe=()=>{var t;(t=f.value)==null||t.blur()},w=async t=>{d(u.INPUT_EVENT,t[a.valueKey]),d(u.UPDATE_MODEL_EVENT,t[a.valueKey]),d("select",t),p.value=[],r.value=-1},k=t=>{var o,l;if(!g.value||m.value)return;if(t<0){r.value=-1;return}t>=p.value.length&&(t=p.value.length-1);const c=$.value.querySelector(`.${i.be("suggestion","wrap")}`),ne=c.querySelectorAll(`.${i.be("suggestion","list")} li`)[t],O=c.scrollTop,{offsetTop:q,scrollHeight:N}=ne;q+N>O+c.clientHeight&&(c.scrollTop+=N),q<O&&(c.scrollTop-=N),r.value=t,(l=(o=f.value)==null?void 0:o.ref)==null||l.setAttribute("aria-activedescendant",`${h.value}-item-${r.value}`)},F=K.onClickOutside(A,()=>{var t;(t=b.value)!=null&&t.isFocusInsideContent()||g.value&&y()});return e.onBeforeUnmount(()=>{F==null||F()}),e.onMounted(()=>{var t;const o=(t=f.value)==null?void 0:t.ref;o&&([{key:"role",value:"textbox"},{key:"aria-autocomplete",value:"list"},{key:"aria-controls",value:"id"},{key:"aria-activedescendant",value:`${h.value}-item-${r.value}`}].forEach(({key:l,value:c})=>o.setAttribute(l,c)),P=o.hasAttribute("readonly"))}),z({highlightedIndex:r,activated:v,loading:m,inputRef:f,popperRef:b,suggestions:p,handleSelect:w,handleKeyEnter:D,focus:te,blur:oe,close:y,highlight:k,getData:_}),(t,o)=>(e.openBlock(),e.createBlock(e.unref(u.ElTooltip),{ref_key:"popperRef",ref:b,visible:e.unref(g),placement:t.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[e.unref(i).e("popper"),t.popperClass],teleported:t.teleported,"append-to":t.appendTo,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${e.unref(i).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:x,onHide:G},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"regionRef",ref:$,class:e.normalizeClass([e.unref(i).b("suggestion"),e.unref(i).is("loading",e.unref(I))]),style:e.normalizeStyle({[t.fitInputWidth?"width":"minWidth"]:V.value,outline:"none"}),role:"region"},[t.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i).be("suggestion","header")),onClick:e.withModifiers(()=>{},["stop"])},[e.renderSlot(t.$slots,"header")],10,["onClick"])):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(se.ElScrollbar),{id:e.unref(h),tag:"ul","wrap-class":e.unref(i).be("suggestion","wrap"),"view-class":e.unref(i).be("suggestion","list"),role:"listbox"},{default:e.withCtx(()=>[e.unref(I)?(e.openBlock(),e.createElementBlock("li",{key:0},[e.renderSlot(t.$slots,"loading",{},()=>[e.createVNode(e.unref(M.ElIcon),{class:e.normalizeClass(e.unref(i).is("loading"))},{default:e.withCtx(()=>[e.createVNode(e.unref(M.loading_default))]),_:1},8,["class"])])])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(p.value,(l,c)=>(e.openBlock(),e.createElementBlock("li",{id:`${e.unref(h)}-item-${c}`,key:c,class:e.normalizeClass({highlighted:r.value===c}),role:"option","aria-selected":r.value===c,onClick:le=>w(l)},[e.renderSlot(t.$slots,"default",{item:l},()=>[e.createTextVNode(e.toDisplayString(l[t.valueKey]),1)])],10,["id","aria-selected","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class"]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(i).be("suggestion","footer")),onClick:e.withModifiers(()=>{},["stop"])},[e.renderSlot(t.$slots,"footer")],10,["onClick"])):e.createCommentVNode("v-if",!0)],6)]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"listboxRef",ref:A,class:e.normalizeClass([e.unref(i).b(),t.$attrs.class]),style:e.normalizeStyle(e.unref(W)),role:"combobox","aria-haspopup":"listbox","aria-expanded":e.unref(g),"aria-owns":e.unref(h)},[e.createVNode(e.unref(S.ElInput),e.mergeProps({ref_key:"inputRef",ref:f},e.mergeProps(e.unref(L),t.$attrs),{"model-value":t.modelValue,disabled:e.unref(T),onInput:j,onChange:Q,onFocus:X,onBlur:Y,onClear:Z,onKeydown:[e.withKeys(e.withModifiers(l=>k(r.value-1),["prevent"]),["up"]),e.withKeys(e.withModifiers(l=>k(r.value+1),["prevent"]),["down"]),e.withKeys(D,["enter"]),e.withKeys(y,["tab"]),e.withKeys(ee,["esc"])],onMousedown:J}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")])}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")])}:void 0,t.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prefix")])}:void 0,t.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"suffix")])}:void 0]),1040,["model-value","disabled","onKeydown"])],14,["aria-expanded","aria-owns"])]),_:3},8,["visible","placement","popper-class","teleported","append-to","transition"]))}});var pe=n._export_sfc(de,[["__file","autocomplete.vue"]]);const fe=n.withInstall(pe);exports.ElAutocomplete=fe;
|