@dazhicheng/ui 1.5.254 → 1.5.255
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.
|
@@ -114,7 +114,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
114
114
|
}
|
|
115
115
|
Array.isArray(l) && (a.value = l.at(-1));
|
|
116
116
|
});
|
|
117
|
-
const C = h(), A = h(""),
|
|
117
|
+
const C = h(), A = h(""), b = h(""), x = h(), G = S("middleRef"), v = S("selectWrapRef"), M = S("selectRef"), O = h(0);
|
|
118
118
|
function L() {
|
|
119
119
|
const e = v.value;
|
|
120
120
|
e && (O.value = e.offsetWidth);
|
|
@@ -150,7 +150,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
150
150
|
});
|
|
151
151
|
};
|
|
152
152
|
return l(_.value), e;
|
|
153
|
-
}), y = u(() => oe(f.value,
|
|
153
|
+
}), y = u(() => oe(f.value, b.value)), ue = u(() => {
|
|
154
154
|
const e = "minmax(var(--tt-panel-select-middle-width, 450px), 1fr)";
|
|
155
155
|
return t.showNav && !t.multiple ? `200px ${e}` : !t.showNav && t.multiple ? `${e} 180px` : !t.showNav && !t.multiple ? e : `200px ${e} 180px`;
|
|
156
156
|
}), se = u(() => {
|
|
@@ -196,8 +196,8 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
196
196
|
)), Ae = u(() => y.value.reduce(
|
|
197
197
|
(e, l) => (e[String(l.value)] = he(l), e),
|
|
198
198
|
{}
|
|
199
|
-
)),
|
|
200
|
-
function
|
|
199
|
+
)), be = u(() => k.value.includes(t.showAllField)), W = u(() => [...t.showAll ? [{ label: "全部", value: t.showAllField }] : [], ...f.value.map((l) => ({ ...l }))]);
|
|
200
|
+
function xe(e) {
|
|
201
201
|
const l = n(W);
|
|
202
202
|
if (Array.isArray(e))
|
|
203
203
|
return l.filter((o) => e.some((i) => i === o.value));
|
|
@@ -216,16 +216,16 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
216
216
|
function Ve(e) {
|
|
217
217
|
C.value = e.value;
|
|
218
218
|
const l = Oe(e);
|
|
219
|
-
|
|
219
|
+
x.value = void 0, $(() => {
|
|
220
220
|
var o;
|
|
221
|
-
|
|
221
|
+
x.value = l, l !== void 0 && ((o = G.value) == null || o.scrollToGroup(l));
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
224
|
function Se(e) {
|
|
225
225
|
A.value = e;
|
|
226
226
|
}
|
|
227
227
|
function $e(e) {
|
|
228
|
-
|
|
228
|
+
b.value = e;
|
|
229
229
|
}
|
|
230
230
|
function Fe(e, l) {
|
|
231
231
|
const o = y.value.find((i) => i.value === e);
|
|
@@ -235,7 +235,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
235
235
|
R("visible-change", e), e && (await $(), L(), t.alwaysLoad ? await m() : !t.immediate && !n(ae) && await m());
|
|
236
236
|
}
|
|
237
237
|
function D(e) {
|
|
238
|
-
R("change", e, J(n(W)),
|
|
238
|
+
R("change", e, J(n(W)), xe(e));
|
|
239
239
|
}
|
|
240
240
|
function Ne(e) {
|
|
241
241
|
$(() => {
|
|
@@ -318,6 +318,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
318
318
|
multiple: e.multiple,
|
|
319
319
|
filterable: !1,
|
|
320
320
|
placeholder: e.placeholder,
|
|
321
|
+
"fallback-placements": ["bottom-start", "bottom-end", "bottom", "top-start", "top-end", "top", "right", "left"],
|
|
321
322
|
disabled: e.disabled,
|
|
322
323
|
"popper-class": `${n(c)}__popper vxe-table--ignore-clear`,
|
|
323
324
|
onVisibleChange: Re,
|
|
@@ -348,7 +349,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
348
349
|
ref: G,
|
|
349
350
|
"prefix-cls": n(c),
|
|
350
351
|
multiple: e.multiple,
|
|
351
|
-
keyword:
|
|
352
|
+
keyword: b.value,
|
|
352
353
|
rows: de.value,
|
|
353
354
|
disabled: B.value,
|
|
354
355
|
"show-all": t.showAll,
|
|
@@ -357,8 +358,8 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
357
358
|
"selected-values": k.value,
|
|
358
359
|
"is-all-checked": n(pe),
|
|
359
360
|
"is-indeterminate": n(me),
|
|
360
|
-
"all-checked":
|
|
361
|
-
"scroll-to-group-value":
|
|
361
|
+
"all-checked": be.value,
|
|
362
|
+
"scroll-to-group-value": x.value,
|
|
362
363
|
"group-checked-map": Ce.value,
|
|
363
364
|
"group-indeterminate-map": Ae.value,
|
|
364
365
|
"paste-search": e.pasteSearch,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as Pt, useAttrs as Rt, useSlots as $t, ref as _, getCurrentInstance as Et, computed as T, provide as $e, reactive as Ot, toValue as K, toRaw as I, unref as t, watch as J, nextTick as B, onMounted as _t, onUnmounted as It, createElementBlock as y, openBlock as p, normalizeClass as A, createVNode as F, mergeProps as re, toHandlers as Dt, createSlots as Nt, withCtx as g, renderSlot as S, createBlock as ne, createCommentVNode as
|
|
1
|
+
import { defineComponent as Pt, useAttrs as Rt, useSlots as $t, ref as _, getCurrentInstance as Et, computed as T, provide as $e, reactive as Ot, toValue as K, toRaw as I, unref as t, watch as J, nextTick as B, onMounted as _t, onUnmounted as It, createElementBlock as y, openBlock as p, normalizeClass as A, createVNode as F, mergeProps as re, toHandlers as Dt, createSlots as Nt, withCtx as g, renderSlot as S, createBlock as ne, createCommentVNode as H, normalizeStyle as $, createElementVNode as P, normalizeProps as j, guardReactiveProps as X, Fragment as Ee, toDisplayString as M, renderList as se, withModifiers as zt, createTextVNode as le } from "vue";
|
|
2
2
|
import { useLoading as Bt } from "../../../hooks/useLoading.js";
|
|
3
3
|
import "../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
4
4
|
import { useDesign as Ft } from "../../../packages/hooks/src/useDesign.js";
|
|
5
|
-
import { kebabToCamelCase as
|
|
5
|
+
import { kebabToCamelCase as Ht } from "../../../packages/utils/src/string.js";
|
|
6
6
|
import "axios";
|
|
7
7
|
import { ElScrollbar as Oe } from "element-plus";
|
|
8
|
-
import { isBoolean as
|
|
8
|
+
import { isBoolean as Vt, isString as Lt } from "../../../packages/utils/src/is.js";
|
|
9
9
|
import { extractResourceFromApi as Kt, generateTestId as _e } from "../../../packages/utils/src/testid-helper.js";
|
|
10
10
|
import { getDifference as At } from "../../../packages/utils/src/tool.js";
|
|
11
11
|
import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
@@ -64,7 +64,7 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
64
64
|
var Re;
|
|
65
65
|
const v = ze, f = Fe, ae = Rt(), D = $t(), {
|
|
66
66
|
prefixCls: E
|
|
67
|
-
} = Ft("table"), ie = _(),
|
|
67
|
+
} = Ft("table"), ie = _(), He = _({}), k = _(null), b = _(), ce = _([]), ue = {};
|
|
68
68
|
function Q(e = k.value) {
|
|
69
69
|
const o = e == null ? void 0 : e.querySelector(".vxe-table");
|
|
70
70
|
return o ? Array.from(o.querySelectorAll(U)).filter((n) => {
|
|
@@ -85,7 +85,7 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
85
85
|
return Math.abs(c.top - u.top) > 2 ? c.top - u.top : Math.abs(c.left - u.left) > 2 ? c.left - u.left : n.getBoundingClientRect().top - s.getBoundingClientRect().top;
|
|
86
86
|
}) : [];
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Ve(e) {
|
|
89
89
|
const o = k.value;
|
|
90
90
|
if (o)
|
|
91
91
|
return Array.from(document.querySelectorAll(U)).find((r) => {
|
|
@@ -116,7 +116,7 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
116
116
|
if (!(o instanceof HTMLElement)) return;
|
|
117
117
|
const r = Q(), n = o.closest(U), s = n ? r.indexOf(n) : -1;
|
|
118
118
|
if (s < 0) return;
|
|
119
|
-
const l = !e.shiftKey, a =
|
|
119
|
+
const l = !e.shiftKey, a = Ve(l), c = Le(l), u = a && c ? a.compareDocumentPosition(c) & Node.DOCUMENT_POSITION_FOLLOWING ? a : c : a || c, m = r[s + (e.shiftKey ? -1 : 1)] || u;
|
|
120
120
|
m && (e.preventDefault(), e.stopPropagation(), B(() => {
|
|
121
121
|
m.focus();
|
|
122
122
|
}));
|
|
@@ -148,18 +148,18 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
148
148
|
const e = i;
|
|
149
149
|
e.useStore = (o) => Ut(i.store, o), i = e;
|
|
150
150
|
}
|
|
151
|
-
const
|
|
151
|
+
const V = (Re = i == null ? void 0 : i.useStore) == null ? void 0 : Re.call(i), Z = T(() => v.testId ? v.testId : v.api ? Kt(v.api) : "table"), Ae = T(() => _e(Z.value, "table"));
|
|
152
152
|
$e("tableIdContext", Z);
|
|
153
153
|
const R = Ot({
|
|
154
|
-
emptyText: K(
|
|
155
|
-
noSearchText: K(
|
|
154
|
+
emptyText: K(V).emptyText,
|
|
155
|
+
noSearchText: K(V).noSearchText,
|
|
156
156
|
isFirstLoad: !0,
|
|
157
|
-
emptyImageStatus: K(
|
|
157
|
+
emptyImageStatus: K(V).emptyImageStatus
|
|
158
158
|
}), ge = _({}), d = T(() => {
|
|
159
159
|
const {
|
|
160
160
|
toolTipErrorPlacement: e,
|
|
161
161
|
...o
|
|
162
|
-
} = I(K(
|
|
162
|
+
} = I(K(V)) || {};
|
|
163
163
|
return {
|
|
164
164
|
...o,
|
|
165
165
|
toolTipErrorPlacement: e
|
|
@@ -263,10 +263,11 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
263
263
|
resizable: !1,
|
|
264
264
|
...n
|
|
265
265
|
},
|
|
266
|
+
showHeaderOverflow: !1,
|
|
266
267
|
rowConfig: {
|
|
267
268
|
useKey: !0,
|
|
268
269
|
keyField: e,
|
|
269
|
-
isHover: !
|
|
270
|
+
isHover: !0,
|
|
270
271
|
isCurrent: !1,
|
|
271
272
|
...r
|
|
272
273
|
},
|
|
@@ -290,7 +291,7 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
290
291
|
round: !0,
|
|
291
292
|
loading: !1
|
|
292
293
|
};
|
|
293
|
-
}), ft = T(() =>
|
|
294
|
+
}), ft = T(() => Vt(t(C).showHeaderOverflow) ? t(C).showHeaderOverflow : Lt(t(C).showHeaderOverflow) ? t(C).showHeaderOverflow === "tooltip" : !1), {
|
|
294
295
|
onCellAreaSelectionEnd: pt
|
|
295
296
|
} = ro(C, f, b, {
|
|
296
297
|
onCellAreaSelectionEndSetCheckbox: Xe,
|
|
@@ -316,7 +317,7 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
316
317
|
const ke = T(() => {
|
|
317
318
|
const {
|
|
318
319
|
emptyImageStyle: e
|
|
319
|
-
} = K(
|
|
320
|
+
} = K(V);
|
|
320
321
|
return {
|
|
321
322
|
...e
|
|
322
323
|
};
|
|
@@ -423,7 +424,7 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
423
424
|
o && ((s = t(ie)) == null || s.hidePopper(), B(() => {
|
|
424
425
|
var c, u, m, w;
|
|
425
426
|
const l = (c = e == null ? void 0 : e.$event) == null ? void 0 : c.target, a = (m = (u = l == null ? void 0 : l.parentNode) == null ? void 0 : u.parentNode) == null ? void 0 : m.parentNode;
|
|
426
|
-
(w = t(ie)) == null || w.showPopper(a), Object.assign(
|
|
427
|
+
(w = t(ie)) == null || w.showPopper(a), Object.assign(He.value, {
|
|
427
428
|
column: e.column,
|
|
428
429
|
$event: e.$event,
|
|
429
430
|
$table: e.$table,
|
|
@@ -486,7 +487,7 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
486
487
|
var l;
|
|
487
488
|
const e = {}, o = ((l = x == null ? void 0 : x.vnode) == null ? void 0 : l.props) || {}, r = new Set(Object.keys(v));
|
|
488
489
|
for (const [a, c] of Object.entries(o)) {
|
|
489
|
-
const u =
|
|
490
|
+
const u = Ht(a);
|
|
490
491
|
r.has(u) && (e[u] = c);
|
|
491
492
|
}
|
|
492
493
|
const n = Ct(e), s = wt(n, v);
|
|
@@ -541,12 +542,12 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
541
542
|
}, [F(t(Ie), {
|
|
542
543
|
style: $(ke.value),
|
|
543
544
|
status: R.emptyImageStatus
|
|
544
|
-
}, null, 8, ["style", "status"]), R.emptyText ? (p(), y("span", vo, M(R.emptyText), 1)) :
|
|
545
|
+
}, null, 8, ["style", "status"]), R.emptyText ? (p(), y("span", vo, M(R.emptyText), 1)) : H("", !0)], 64)) : (p(), y(Ee, {
|
|
545
546
|
key: 1
|
|
546
547
|
}, [F(t(Ie), {
|
|
547
548
|
style: $(ke.value),
|
|
548
549
|
status: R.emptyImageStatus
|
|
549
|
-
}, null, 8, ["style", "status"]), R.noSearchText ? (p(), y("span", Co, M(R.noSearchText), 1)) :
|
|
550
|
+
}, null, 8, ["style", "status"]), R.noSearchText ? (p(), y("span", Co, M(R.noSearchText), 1)) : H("", !0)], 64))], 2))]),
|
|
550
551
|
left: g(() => [S(e.$slots, "left", {}, () => [t(z) ? (p(), ne(t(Oe), {
|
|
551
552
|
key: 0,
|
|
552
553
|
ref_key: "leftSlotScrollbarRef",
|
|
@@ -577,7 +578,7 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
577
578
|
height: t(q)
|
|
578
579
|
})))], 4)]),
|
|
579
580
|
_: 3
|
|
580
|
-
}, 8, ["height", "style"])) :
|
|
581
|
+
}, 8, ["height", "style"])) : H("", !0)])]),
|
|
581
582
|
right: g(() => [S(e.$slots, "right", {}, () => [t(z) ? (p(), ne(t(Oe), {
|
|
582
583
|
key: 0,
|
|
583
584
|
ref_key: "rightSlotScrollbarRef",
|
|
@@ -609,7 +610,7 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
609
610
|
height: t(q)
|
|
610
611
|
})))], 4)]),
|
|
611
612
|
_: 3
|
|
612
|
-
}, 8, ["height", "style"])) :
|
|
613
|
+
}, 8, ["height", "style"])) : H("", !0)])]),
|
|
613
614
|
_: 2
|
|
614
615
|
}, [se(t(at), (r) => ({
|
|
615
616
|
name: r,
|
|
@@ -636,7 +637,7 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
636
637
|
}, null, 8, yo)) : (p(), y("img", {
|
|
637
638
|
key: 2,
|
|
638
639
|
src: t(Zt)
|
|
639
|
-
}, null, 8, So))], 2)) :
|
|
640
|
+
}, null, 8, So))], 2)) : H("", !0)], 8, mo)])
|
|
640
641
|
})), se(Object.keys(e.$slots), (r) => ({
|
|
641
642
|
name: r,
|
|
642
643
|
fn: g((n) => [r.includes("action") ? (p(), ne(t(oo), {
|
|
@@ -680,7 +681,7 @@ const go = ["data-testid", "data-table-columns"], mo = ["onClick"], bo = {
|
|
|
680
681
|
placement: d.value.toolTipErrorPlacement,
|
|
681
682
|
"err-msg": n,
|
|
682
683
|
"ref-dom": ge.value[`valid_${s}_${l}`]
|
|
683
|
-
}, null, 8, ["placement", "err-msg", "ref-dom"])], 512)) :
|
|
684
|
+
}, null, 8, ["placement", "err-msg", "ref-dom"])], 512)) : H("", !0)])
|
|
684
685
|
})), C.value.showPager ? {
|
|
685
686
|
name: "pager",
|
|
686
687
|
fn: g(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dazhicheng/ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.255",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"vue-router": "^5.0.2",
|
|
68
68
|
"vxe-pc-ui": "^4.12.36",
|
|
69
69
|
"vxe-table": "^4.17.48",
|
|
70
|
-
"@dazhicheng/
|
|
71
|
-
"@dazhicheng/
|
|
70
|
+
"@dazhicheng/utils": "1.3.45",
|
|
71
|
+
"@dazhicheng/hooks": "1.4.48"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
74
74
|
"dist"
|