ling-yun-custom-components 0.0.54 → 0.0.55
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/es/IconRenderer.mjs +1 -1
- package/es/IconSelect.mjs +1 -1
- package/es/PaginationTable.mjs +52 -52
- package/es/assets/PaginationTable.css +1 -1
- package/es/chunks/{global.BN3x8LRV.js → global.C1Iy_saH.js} +729 -1348
- package/lib/IconRenderer.js +1 -1
- package/lib/IconSelect.js +1 -1
- package/lib/PaginationTable.js +1 -1
- package/lib/assets/PaginationTable.css +1 -1
- package/lib/chunks/global.XouT1lGG.js +1 -0
- package/package.json +1 -1
- package/lib/chunks/global.DH9s3Z8E.js +0 -1
package/es/IconRenderer.mjs
CHANGED
|
@@ -9,7 +9,7 @@ const a = {
|
|
|
9
9
|
try {
|
|
10
10
|
switch (e) {
|
|
11
11
|
case a.lingyun:
|
|
12
|
-
const { icons: o } = await import("./chunks/global.
|
|
12
|
+
const { icons: o } = await import("./chunks/global.C1Iy_saH.js");
|
|
13
13
|
return o[n] || null;
|
|
14
14
|
case a.aibox:
|
|
15
15
|
const { icons: t } = await import("./chunks/global.C0RGZP_4.js");
|
package/es/IconSelect.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { w as N } from "./chunks/index.bCzIhWFw.js";
|
|
|
2
2
|
import { ref as p, computed as v, watch as E, createBlock as c, openBlock as o, unref as n, withCtx as i, createElementVNode as x, createVNode as r, createElementBlock as u, createCommentVNode as L, Fragment as b, renderList as j, normalizeClass as h, resolveDynamicComponent as V, createTextVNode as B } from "vue";
|
|
3
3
|
import { ElPopover as M, ElInput as O, ElIcon as y } from "element-plus";
|
|
4
4
|
import { IconSearch as T, IconAdd as U } from "color-message-lingyun-vue";
|
|
5
|
-
import { icons as g } from "./chunks/global.
|
|
5
|
+
import { icons as g } from "./chunks/global.C1Iy_saH.js";
|
|
6
6
|
import { I as A } from "./chunks/layout.DBgjqaxe.js";
|
|
7
7
|
import { emitsMap as k } from "ling-yun-methods";
|
|
8
8
|
import { _ as D } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
package/es/PaginationTable.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { w as Be } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
-
import { useSlots as Ee, computed as m, ref as h, watch as oe, onMounted as
|
|
3
|
-
import { ElButton as ce, ElAutoResizer as
|
|
2
|
+
import { useSlots as Ee, computed as m, ref as h, watch as oe, onMounted as Re, nextTick as ze, createElementBlock as E, openBlock as y, createElementVNode as S, createCommentVNode as R, unref as v, renderSlot as I, Fragment as Ne, createBlock as re, withCtx as j, createTextVNode as de, toDisplayString as Pe, createVNode as U, createSlots as Ae, renderList as We, normalizeProps as _e, guardReactiveProps as De, h as H } from "vue";
|
|
3
|
+
import { ElButton as ce, ElAutoResizer as Ie, ElTableV2 as je, ElCheckbox as Oe } from "element-plus";
|
|
4
4
|
import { emitsMap as fe, paginationConfig as qe } from "ling-yun-methods";
|
|
5
5
|
import { calculateScale as Ke } from "color-star-custom-methods";
|
|
6
6
|
import { _ as Fe } from "./chunks/layout.BzQrppiO.js";
|
|
@@ -14,10 +14,10 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
14
14
|
}, Ue = {
|
|
15
15
|
class: "flex",
|
|
16
16
|
style: { width: "auto", gap: "10px" }
|
|
17
|
-
},
|
|
17
|
+
}, He = {
|
|
18
18
|
key: 1,
|
|
19
19
|
class: "flex items-center mg-b-18"
|
|
20
|
-
},
|
|
20
|
+
}, Ge = { class: "fz-12 text-74798c" }, Je = { class: "btn-group mg-l-12" }, Qe = { class: "w-full flex-1 overflow-hidden flex flex-col" }, Xe = { class: "flex-1 overflow-hidden TABLE-AREA" }, Ye = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "flex justify-end mg-t-20",
|
|
23
23
|
style: { height: "auto" }
|
|
@@ -103,24 +103,24 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
103
103
|
"updateSortState"
|
|
104
104
|
],
|
|
105
105
|
setup(p, { expose: he, emit: ve }) {
|
|
106
|
-
const x = ve, u = p,
|
|
107
|
-
get: () =>
|
|
106
|
+
const x = ve, u = p, O = Ee(), z = m(() => typeof u.requestFn == "function"), d = m({
|
|
107
|
+
get: () => z.value ? b.value : u.tableData,
|
|
108
108
|
set: (e) => {
|
|
109
|
-
|
|
109
|
+
z.value ? b.value = e : x("updateTableData", e);
|
|
110
110
|
}
|
|
111
|
-
}), q = h(0),
|
|
111
|
+
}), q = h(0), G = m(() => z.value ? q.value : u.total), w = m({
|
|
112
112
|
get: () => u.sortState,
|
|
113
113
|
set: (e) => {
|
|
114
114
|
x("updateSortState", e);
|
|
115
115
|
}
|
|
116
116
|
}), pe = ({ key: e, order: t }) => {
|
|
117
117
|
w.value[e] = t, d.value = d.value.reverse();
|
|
118
|
-
}, b = h([]), f = m(() => u.pageMapping.pageNum),
|
|
118
|
+
}, b = h([]), f = m(() => u.pageMapping.pageNum), N = m(() => u.pageMapping.pageSize), K = {
|
|
119
119
|
[f.value]: 1,
|
|
120
|
-
[
|
|
120
|
+
[N.value]: 20
|
|
121
121
|
}, r = h({
|
|
122
122
|
...K
|
|
123
|
-
}), g = h([]), i = h([]),
|
|
123
|
+
}), g = h([]), i = h([]), J = h([]), C = h({}), Q = m(() => ge(C.value));
|
|
124
124
|
function ge(e) {
|
|
125
125
|
const t = /* @__PURE__ */ new Set();
|
|
126
126
|
for (const l in e)
|
|
@@ -129,7 +129,7 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
129
129
|
});
|
|
130
130
|
return t;
|
|
131
131
|
}
|
|
132
|
-
const X = ({ value: e, intermediate: t = !1, onChange: l }) =>
|
|
132
|
+
const X = ({ value: e, intermediate: t = !1, onChange: l }) => H(Oe, {
|
|
133
133
|
onChange: l,
|
|
134
134
|
modelValue: e,
|
|
135
135
|
indeterminate: t
|
|
@@ -181,7 +181,7 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
181
181
|
width: 50,
|
|
182
182
|
cellRenderer: (e) => {
|
|
183
183
|
const { rowData: t } = e, a = t.children && t.children.length > 0 ? be(t) : !1;
|
|
184
|
-
return
|
|
184
|
+
return H(X, {
|
|
185
185
|
value: t.selected,
|
|
186
186
|
intermediate: a,
|
|
187
187
|
onChange: (s) => me(t, s)
|
|
@@ -192,7 +192,7 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
192
192
|
const s = a.selected, o = le(a);
|
|
193
193
|
return s && o;
|
|
194
194
|
}), l = e.some((a) => a.selected || ae(a));
|
|
195
|
-
return
|
|
195
|
+
return H(X, {
|
|
196
196
|
value: t,
|
|
197
197
|
intermediate: l && !t,
|
|
198
198
|
// 目前是当前页全选就是全选状态,也就是每页的全选状态单独的
|
|
@@ -244,7 +244,7 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
const B = () => {
|
|
247
|
-
|
|
247
|
+
z.value ? u.requestFn({
|
|
248
248
|
...u.params,
|
|
249
249
|
...r.value
|
|
250
250
|
}).then((e) => {
|
|
@@ -281,7 +281,7 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
281
281
|
}, se = (e) => {
|
|
282
282
|
e === "size" && (r.value[f.value] = 1), B(), x(fe.paginationChange, r.value);
|
|
283
283
|
}, P = h(0), A = () => {
|
|
284
|
-
let e = P.value, t =
|
|
284
|
+
let e = P.value, t = [...u.columns];
|
|
285
285
|
const l = 1 / Ke(), a = t.filter((n) => n.fixedWidth), s = t.filter((n) => !n.fixedWidth);
|
|
286
286
|
let o = 0;
|
|
287
287
|
a.forEach((n) => {
|
|
@@ -293,17 +293,17 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
293
293
|
});
|
|
294
294
|
const ue = [];
|
|
295
295
|
if (t.forEach((n, W) => {
|
|
296
|
-
let
|
|
296
|
+
let _;
|
|
297
297
|
if (n.fixedWidth)
|
|
298
|
-
|
|
298
|
+
_ = n.width || 100;
|
|
299
299
|
else if (n.width && L > 0) {
|
|
300
|
-
const
|
|
301
|
-
|
|
300
|
+
const D = n.width / L, M = c * D;
|
|
301
|
+
_ = Math.max(M, n.width);
|
|
302
302
|
} else {
|
|
303
|
-
const
|
|
304
|
-
|
|
303
|
+
const D = s.filter((M) => !M.width);
|
|
304
|
+
_ = D.length > 0 ? c / D.length : c / s.length;
|
|
305
305
|
}
|
|
306
|
-
ue.push(
|
|
306
|
+
ue.push(_);
|
|
307
307
|
}), t = t.map((n, W) => (n.width = ue[W] * l, w.value && Object.keys(w.value).length && w.value[n.key] && (n.sortable = !0), n)), T.value) {
|
|
308
308
|
const n = g.value.find((W) => W.key === "selection");
|
|
309
309
|
n && (g.value = [n, ...t]);
|
|
@@ -324,8 +324,8 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
324
324
|
const ie = () => {
|
|
325
325
|
P.value = document.querySelector(".TABLE-AREA").getBoundingClientRect().width, A();
|
|
326
326
|
};
|
|
327
|
-
return
|
|
328
|
-
B(), g.value = u.columns, P.value = document.querySelector(".TABLE-AREA").getBoundingClientRect().width,
|
|
327
|
+
return Re(() => {
|
|
328
|
+
B(), g.value = u.columns, P.value = document.querySelector(".TABLE-AREA").getBoundingClientRect().width, ze(() => {
|
|
329
329
|
A();
|
|
330
330
|
}), window.addEventListener("resize", ie);
|
|
331
331
|
}), he({
|
|
@@ -337,25 +337,25 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
337
337
|
handleResize: ie
|
|
338
338
|
}), (e, t) => (y(), E("div", $e, [
|
|
339
339
|
S("div", Le, [
|
|
340
|
-
v(
|
|
341
|
-
|
|
342
|
-
])) :
|
|
340
|
+
v(O)["filter-left"] ? (y(), E("div", Me, [
|
|
341
|
+
I(e.$slots, "filter-left", {}, void 0, !0)
|
|
342
|
+
])) : R("", !0),
|
|
343
343
|
S("div", Ue, [
|
|
344
|
-
p.hasBatchSelect && d.value.length ? (y(), E(
|
|
345
|
-
T.value ? (y(), E("div",
|
|
346
|
-
S("div",
|
|
344
|
+
p.hasBatchSelect && d.value.length ? (y(), E(Ne, { key: 0 }, [
|
|
345
|
+
T.value ? (y(), E("div", He, [
|
|
346
|
+
S("div", Ge, "已选" + Pe(i.value.length) + "条数据", 1),
|
|
347
347
|
S("div", {
|
|
348
348
|
class: "fz-12 text-3b64ff mg-l-4 pointer",
|
|
349
349
|
onClick: V
|
|
350
350
|
}, "取消选择"),
|
|
351
|
-
|
|
352
|
-
S("div",
|
|
351
|
+
I(e.$slots, "btn-group", {}, () => [
|
|
352
|
+
S("div", Je, [
|
|
353
353
|
U(v(ce), {
|
|
354
354
|
type: "danger",
|
|
355
355
|
onClick: xe,
|
|
356
356
|
disabled: !i.value.length
|
|
357
357
|
}, {
|
|
358
|
-
default:
|
|
358
|
+
default: j(() => [...t[6] || (t[6] = [
|
|
359
359
|
de(" 删除 ", -1)
|
|
360
360
|
])]),
|
|
361
361
|
_: 1
|
|
@@ -367,22 +367,22 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
367
367
|
type: "default",
|
|
368
368
|
onClick: Ce
|
|
369
369
|
}, {
|
|
370
|
-
default:
|
|
370
|
+
default: j(() => [...t[5] || (t[5] = [
|
|
371
371
|
de(" 批量选择 ", -1)
|
|
372
372
|
])]),
|
|
373
373
|
_: 1
|
|
374
374
|
}))
|
|
375
|
-
], 64)) :
|
|
376
|
-
v(
|
|
375
|
+
], 64)) : R("", !0),
|
|
376
|
+
v(O)["filter-right"] ? I(e.$slots, "filter-right", { key: 1 }, void 0, !0) : R("", !0)
|
|
377
377
|
])
|
|
378
378
|
]),
|
|
379
379
|
S("div", Qe, [
|
|
380
380
|
S("div", Xe, [
|
|
381
|
-
U(v(
|
|
382
|
-
default:
|
|
383
|
-
U(v(
|
|
384
|
-
"expanded-row-keys":
|
|
385
|
-
"onUpdate:expandedRowKeys": t[0] || (t[0] = (s) =>
|
|
381
|
+
U(v(Ie), null, {
|
|
382
|
+
default: j(({ width: l, height: a }) => [
|
|
383
|
+
U(v(je), {
|
|
384
|
+
"expanded-row-keys": J.value,
|
|
385
|
+
"onUpdate:expandedRowKeys": t[0] || (t[0] = (s) => J.value = s),
|
|
386
386
|
"expand-column-key": p.expandColumnKey,
|
|
387
387
|
columns: g.value,
|
|
388
388
|
data: d.value,
|
|
@@ -392,10 +392,10 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
392
392
|
"sort-state": w.value,
|
|
393
393
|
onColumnSort: pe
|
|
394
394
|
}, Ae({ _: 2 }, [
|
|
395
|
-
We(v(
|
|
395
|
+
We(v(O), (s, o) => ({
|
|
396
396
|
name: o,
|
|
397
|
-
fn:
|
|
398
|
-
|
|
397
|
+
fn: j((c) => [
|
|
398
|
+
I(e.$slots, o, _e(De(c)), void 0, !0)
|
|
399
399
|
])
|
|
400
400
|
}))
|
|
401
401
|
]), 1032, ["expanded-row-keys", "expand-column-key", "columns", "data", "width", "height", "sort-state"])
|
|
@@ -403,24 +403,24 @@ import './assets/PaginationTable.css';const $e = { class: "flex h-full flex-col"
|
|
|
403
403
|
_: 3
|
|
404
404
|
})
|
|
405
405
|
]),
|
|
406
|
-
p.isPagination &&
|
|
406
|
+
p.isPagination && G.value > r.value[N.value] ? (y(), E("div", Ye, [
|
|
407
407
|
p.isPagination ? (y(), re(Fe, {
|
|
408
408
|
key: 0,
|
|
409
409
|
"current-page": r.value[f.value],
|
|
410
410
|
"onUpdate:currentPage": t[1] || (t[1] = (l) => r.value[f.value] = l),
|
|
411
|
-
"page-size": r.value[
|
|
412
|
-
"onUpdate:pageSize": t[2] || (t[2] = (l) => r.value[
|
|
411
|
+
"page-size": r.value[N.value],
|
|
412
|
+
"onUpdate:pageSize": t[2] || (t[2] = (l) => r.value[N.value] = l),
|
|
413
413
|
"page-sizes": p.pagination.pageSizes,
|
|
414
414
|
layout: p.pagination.layout,
|
|
415
|
-
total:
|
|
415
|
+
total: G.value,
|
|
416
416
|
onSizeChange: t[3] || (t[3] = (l) => se("size")),
|
|
417
417
|
onCurrentChange: t[4] || (t[4] = (l) => se("page"))
|
|
418
|
-
}, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total"])) :
|
|
419
|
-
])) :
|
|
418
|
+
}, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total"])) : R("", !0)
|
|
419
|
+
])) : R("", !0)
|
|
420
420
|
])
|
|
421
421
|
]));
|
|
422
422
|
}
|
|
423
|
-
}), et = /* @__PURE__ */ Ve(Ze, [["__scopeId", "data-v-
|
|
423
|
+
}), et = /* @__PURE__ */ Ve(Ze, [["__scopeId", "data-v-adcd3040"]]), ot = Be(et);
|
|
424
424
|
export {
|
|
425
425
|
ot as PaginationTable,
|
|
426
426
|
ot as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-
|
|
1
|
+
[data-v-adcd3040] .el-table-v2__header-cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|