ling-yun-custom-components 0.0.76 → 0.0.78
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/AppIntro.mjs +2 -2
- package/es/BuildComponents.mjs +4 -4
- package/es/CustomDialog.mjs +1 -1
- package/es/CustomDropdown.mjs +3 -3
- package/es/CustomPagination.mjs +1 -1
- package/es/CustomTab.mjs +7 -7
- package/es/GradientButton.mjs +1 -1
- package/es/PageNotFound.mjs +2 -2
- package/es/PaginationTable.mjs +127 -126
- package/es/PluginDetail.mjs +85 -92
- package/es/UpdatePasswordDialog.mjs +3 -3
- package/es/assets/PaginationTable.css +1 -1
- package/es/assets/PluginDetail.css +1 -1
- package/es/chunks/{layout.BOupEsmd.js → layout.CCuN91wk.js} +2 -2
- package/es/chunks/{layout.BlsXj4-t.js → layout.Cr_l_XR4.js} +9 -9
- package/lib/PaginationTable.js +1 -1
- package/lib/PluginDetail.js +1 -1
- package/lib/assets/PaginationTable.css +1 -1
- package/lib/assets/PluginDetail.css +1 -1
- package/package.json +4 -4
- package/es/TreeSelect.mjs +0 -406
- package/es/TreeShowSelect.mjs +0 -82
- package/es/assets/TreeSelect.css +0 -1
- package/es/assets/TreeShowSelect.css +0 -1
- package/es/chunks/layout.Bhd1JJol.js +0 -99
- package/lib/TreeSelect.js +0 -1
- package/lib/TreeShowSelect.js +0 -1
- package/lib/assets/TreeSelect.css +0 -1
- package/lib/assets/TreeShowSelect.css +0 -1
- package/lib/chunks/layout.pjXXSBch.js +0 -1
package/es/CustomDialog.mjs
CHANGED
package/es/CustomDropdown.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as C } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
-
import {
|
|
2
|
+
import { openBlock as r, createBlock as m, unref as a, mergeProps as v, withCtx as n, renderSlot as h, createElementVNode as s, toDisplayString as p, createVNode as c, createElementBlock as V, Fragment as D, renderList as E, createCommentVNode as I } from "vue";
|
|
3
3
|
import { ElDropdown as N, ElIcon as S, ElDropdownMenu as B, ElDropdownItem as x } from "element-plus";
|
|
4
4
|
import { emitsMap as l } from "color-star-custom-methods";
|
|
5
5
|
import { IconDown as M } from "color-message-lingyun-vue";
|
|
@@ -105,7 +105,7 @@ import './assets/CustomDropdown.css';const T = { class: "custom-dropdown-trigger
|
|
|
105
105
|
c(a(B), null, {
|
|
106
106
|
default: n(() => [
|
|
107
107
|
h(o.$slots, "dropdown", {}, () => [
|
|
108
|
-
e.items && e.items.length > 0 ? (r(!0), V(
|
|
108
|
+
e.items && e.items.length > 0 ? (r(!0), V(D, { key: 0 }, E(e.items, (t, y) => (r(), m(a(x), {
|
|
109
109
|
key: t.key || y,
|
|
110
110
|
command: t.command || t.value || t,
|
|
111
111
|
disabled: t.disabled,
|
|
@@ -116,7 +116,7 @@ import './assets/CustomDropdown.css';const T = { class: "custom-dropdown-trigger
|
|
|
116
116
|
s("span", null, p(t.label || t.text || t), 1)
|
|
117
117
|
]),
|
|
118
118
|
_: 2
|
|
119
|
-
}, 1032, ["command", "disabled", "divided", "icon"]))), 128)) :
|
|
119
|
+
}, 1032, ["command", "disabled", "divided", "icon"]))), 128)) : I("", !0)
|
|
120
120
|
], !0)
|
|
121
121
|
]),
|
|
122
122
|
_: 3
|
package/es/CustomPagination.mjs
CHANGED
package/es/CustomTab.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { w as g } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useModel as v, computed as _, useAttrs as k, useSlots as C, openBlock as o, createBlock as u, unref as t, mergeProps as V, createSlots as P, withCtx as m, createElementBlock as S, Fragment as T, renderList as d, renderSlot as w, normalizeProps as x, guardReactiveProps as B, mergeModels as E } from "vue";
|
|
3
3
|
import { ElTabs as M, ElTabPane as j } from "element-plus";
|
|
4
4
|
import { _ as A } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
5
|
import './assets/CustomTab.css';const I = /* @__PURE__ */ Object.assign({
|
|
6
6
|
name: "CustomTab"
|
|
7
7
|
}, {
|
|
8
8
|
__name: "layout",
|
|
9
|
-
props: /* @__PURE__ */
|
|
9
|
+
props: /* @__PURE__ */ E({
|
|
10
10
|
// 标签页列表
|
|
11
11
|
list: {
|
|
12
12
|
type: Array,
|
|
@@ -32,13 +32,13 @@ import './assets/CustomTab.css';const I = /* @__PURE__ */ Object.assign({
|
|
|
32
32
|
const c = l, i = {
|
|
33
33
|
label: "label",
|
|
34
34
|
name: "name"
|
|
35
|
-
}, n =
|
|
36
|
-
return (b, r) => (o(), u(t(M),
|
|
35
|
+
}, n = v(l, "modelValue"), a = _(() => ({ ...i, ...c.keyConfig })), f = k(), p = C();
|
|
36
|
+
return (b, r) => (o(), u(t(M), V({
|
|
37
37
|
modelValue: n.value,
|
|
38
38
|
"onUpdate:modelValue": r[0] || (r[0] = (e) => n.value = e)
|
|
39
|
-
}, t(f), { type: "card" }),
|
|
39
|
+
}, t(f), { type: "card" }), P({
|
|
40
40
|
default: m(() => [
|
|
41
|
-
(o(!0), T
|
|
41
|
+
(o(!0), S(T, null, d(l.list, (e) => (o(), u(t(j), {
|
|
42
42
|
key: e[a.value.name],
|
|
43
43
|
label: e[a.value.label],
|
|
44
44
|
name: e[a.value.name]
|
|
@@ -49,7 +49,7 @@ import './assets/CustomTab.css';const I = /* @__PURE__ */ Object.assign({
|
|
|
49
49
|
d(t(p), (e, s) => ({
|
|
50
50
|
name: s,
|
|
51
51
|
fn: m((y) => [
|
|
52
|
-
|
|
52
|
+
w(b.$slots, s, x(B(y)), void 0, !0)
|
|
53
53
|
])
|
|
54
54
|
}))
|
|
55
55
|
]), 1040, ["modelValue"]));
|
package/es/GradientButton.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as z } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
-
import { computed as l,
|
|
2
|
+
import { computed as l, openBlock as i, createElementBlock as c, normalizeStyle as s, createElementVNode as f, normalizeClass as u, createBlock as g, unref as d, withCtx as S, resolveDynamicComponent as w, createCommentVNode as x, Fragment as $, renderList as B, toDisplayString as j } from "vue";
|
|
3
3
|
import { textDirection as a } from "color-star-custom-methods";
|
|
4
4
|
import { IconAdd as I } from "color-message-lingyun-vue";
|
|
5
5
|
import { ElIcon as O } from "element-plus";
|
package/es/PageNotFound.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as i } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
-
import {
|
|
2
|
+
import { openBlock as l, createElementBlock as a, createVNode as n, unref as t, withCtx as r, createElementVNode as u, createTextVNode as c } from "vue";
|
|
3
3
|
import { Page404 as f, IconBack as p } from "color-message-lingyun-vue";
|
|
4
4
|
import { ElIcon as d, ElButton as m } from "element-plus";
|
|
5
5
|
const w = { class: "page-not-found flex flex-col items-center justify-center h-full w-full overflow-hidden" }, _ = /* @__PURE__ */ Object.assign({
|
|
@@ -11,7 +11,7 @@ const w = { class: "page-not-found flex flex-col items-center justify-center h-f
|
|
|
11
11
|
const o = window?.$wujie?.props?.useRouter();
|
|
12
12
|
o && o?.push?.(window?.$wujie?.props?.firstSubMenu?.path);
|
|
13
13
|
};
|
|
14
|
-
return (o, e) => (
|
|
14
|
+
return (o, e) => (l(), a("div", w, [
|
|
15
15
|
n(t(d), { size: 140 }, {
|
|
16
16
|
default: r(() => [
|
|
17
17
|
n(t(f))
|
package/es/PaginationTable.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { w as Ee } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
-
import { useSlots as ke, computed as m, ref as v, watch as
|
|
3
|
-
import { ElButton as
|
|
4
|
-
import { emitsMap as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { cloneDeep as
|
|
7
|
-
import { _ as
|
|
8
|
-
import './assets/PaginationTable.css';const
|
|
2
|
+
import { useSlots as ke, computed as m, ref as v, watch as ue, onMounted as ze, nextTick as Pe, openBlock as S, createElementBlock as E, createElementVNode as y, unref as p, renderSlot as I, createCommentVNode as k, Fragment as Ne, createBlock as oe, withCtx as j, createTextVNode as de, toDisplayString as Ae, createVNode as U, createSlots as We, renderList as De, normalizeProps as Ie, guardReactiveProps as je, mergeProps as Oe, h as H } from "vue";
|
|
3
|
+
import { ElButton as re, ElAutoResizer as qe, ElTableV2 as Ke, ElCheckbox as $e } from "element-plus";
|
|
4
|
+
import { emitsMap as ce, paginationConfig as Fe, calculateScale as Ve } from "color-star-custom-methods";
|
|
5
|
+
import { _ as Le } from "./chunks/layout.CCuN91wk.js";
|
|
6
|
+
import { cloneDeep as Me } from "lodash";
|
|
7
|
+
import { _ as _e } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
8
|
+
import './assets/PaginationTable.css';const Ue = { class: "flex h-full flex-col" }, He = {
|
|
9
9
|
class: "w-full flex justify-between overflow-hidden",
|
|
10
10
|
style: { height: "auto" }
|
|
11
|
-
},
|
|
11
|
+
}, Ge = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "flex-1 overflow-hidden"
|
|
14
|
-
},
|
|
14
|
+
}, Je = {
|
|
15
15
|
class: "flex",
|
|
16
16
|
style: { width: "auto", gap: "10px" }
|
|
17
|
-
},
|
|
17
|
+
}, Qe = {
|
|
18
18
|
key: 1,
|
|
19
19
|
class: "flex items-center mg-b-18"
|
|
20
|
-
},
|
|
20
|
+
}, Xe = { class: "fz-12 text-74798c" }, Ye = { class: "btn-group mg-l-12" }, Ze = { class: "w-full flex-1 overflow-hidden flex flex-col" }, et = { class: "flex-1 overflow-hidden TABLE-AREA" }, tt = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "flex justify-end mg-t-20",
|
|
23
23
|
style: { height: "auto" }
|
|
24
|
-
},
|
|
24
|
+
}, lt = /* @__PURE__ */ Object.assign({
|
|
25
25
|
name: "PaginationTable"
|
|
26
26
|
}, {
|
|
27
27
|
__name: "layout",
|
|
@@ -104,20 +104,20 @@ import './assets/PaginationTable.css';const Me = { class: "flex h-full flex-col"
|
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
emits: [
|
|
107
|
-
|
|
107
|
+
ce.paginationChange,
|
|
108
108
|
"updateTableData",
|
|
109
109
|
"handleTableSelect",
|
|
110
110
|
"handleBatchDelete",
|
|
111
111
|
"updateSortState",
|
|
112
112
|
"endReached"
|
|
113
113
|
],
|
|
114
|
-
setup(c, { expose:
|
|
115
|
-
const b =
|
|
114
|
+
setup(c, { expose: fe, emit: he }) {
|
|
115
|
+
const b = he, u = c, O = ke(), z = m(() => typeof u.requestFn == "function"), r = m({
|
|
116
116
|
get: () => z.value ? x.value : u.tableData,
|
|
117
117
|
set: (e) => {
|
|
118
118
|
z.value ? x.value = e : b("updateTableData", e);
|
|
119
119
|
}
|
|
120
|
-
}),
|
|
120
|
+
}), q = v(0), ve = m(() => z.value ? q.value : u.total), w = m({
|
|
121
121
|
get: () => u.sortState,
|
|
122
122
|
set: (e) => {
|
|
123
123
|
b("updateSortState", e);
|
|
@@ -126,12 +126,12 @@ import './assets/PaginationTable.css';const Me = { class: "flex h-full flex-col"
|
|
|
126
126
|
w.value[e] = t, r.value = r.value.reverse();
|
|
127
127
|
}, ge = (e) => {
|
|
128
128
|
b("endReached", e);
|
|
129
|
-
}, x = v([]), h = m(() => u.pageMapping.pageNum),
|
|
129
|
+
}, x = v([]), h = m(() => u.pageMapping.pageNum), K = m(() => u.pageMapping.pageSize), $ = {
|
|
130
130
|
[h.value]: 1,
|
|
131
|
-
[
|
|
131
|
+
[K.value]: 20
|
|
132
132
|
}, d = v({
|
|
133
|
-
|
|
134
|
-
}), g = v([]), i = v([]),
|
|
133
|
+
...$
|
|
134
|
+
}), g = v([]), i = v([]), G = v([]), C = v({}), J = m(() => me(C.value));
|
|
135
135
|
function me(e) {
|
|
136
136
|
const t = /* @__PURE__ */ new Set();
|
|
137
137
|
for (const l in e)
|
|
@@ -140,7 +140,7 @@ import './assets/PaginationTable.css';const Me = { class: "flex h-full flex-col"
|
|
|
140
140
|
});
|
|
141
141
|
return t;
|
|
142
142
|
}
|
|
143
|
-
const
|
|
143
|
+
const Q = ({ value: e, intermediate: t = !1, onChange: l }) => H($e, {
|
|
144
144
|
onChange: l,
|
|
145
145
|
modelValue: e,
|
|
146
146
|
indeterminate: t
|
|
@@ -153,46 +153,46 @@ import './assets/PaginationTable.css';const Me = { class: "flex h-full flex-col"
|
|
|
153
153
|
};
|
|
154
154
|
l(e.children);
|
|
155
155
|
}
|
|
156
|
-
e.parentId &&
|
|
157
|
-
},
|
|
158
|
-
const t =
|
|
156
|
+
e.parentId && X(e.parentId), Z(), R();
|
|
157
|
+
}, X = (e) => {
|
|
158
|
+
const t = Y(r.value, e);
|
|
159
159
|
if (!t) return;
|
|
160
160
|
const l = t.children.every((a) => a.selected);
|
|
161
|
-
l && !t.selected ? (t.selected = !0, i.value.some((a) => a.id === t.id) || i.value.push(t)) : !l && t.selected && (t.selected = !1, i.value = i.value.filter(({ id: a }) => a !== t.id)), t.parentId &&
|
|
162
|
-
},
|
|
161
|
+
l && !t.selected ? (t.selected = !0, i.value.some((a) => a.id === t.id) || i.value.push(t)) : !l && t.selected && (t.selected = !1, i.value = i.value.filter(({ id: a }) => a !== t.id)), t.parentId && X(t.parentId);
|
|
162
|
+
}, Y = (e, t) => {
|
|
163
163
|
for (const l of e) {
|
|
164
164
|
if (l.id === t) return l;
|
|
165
165
|
if (l.children) {
|
|
166
|
-
const a =
|
|
166
|
+
const a = Y(l.children, t);
|
|
167
167
|
if (a) return a;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return null;
|
|
171
171
|
};
|
|
172
|
-
function
|
|
173
|
-
C.value[d.value[h.value]] =
|
|
172
|
+
function Z() {
|
|
173
|
+
C.value[d.value[h.value]] = ee(
|
|
174
174
|
r.value
|
|
175
175
|
);
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function ee(e) {
|
|
178
178
|
let t = [];
|
|
179
179
|
return e.forEach((l) => {
|
|
180
|
-
l.selected && t.push(l), l.children && l.children.length > 0 && (t = t.concat(
|
|
180
|
+
l.selected && t.push(l), l.children && l.children.length > 0 && (t = t.concat(ee(l.children)));
|
|
181
181
|
}), t;
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
e.selected = t, e.children && e.children.length > 0 && e.children.forEach((l) =>
|
|
183
|
+
function F(e, t) {
|
|
184
|
+
e.selected = t, e.children && e.children.length > 0 && e.children.forEach((l) => F(l, t));
|
|
185
185
|
}
|
|
186
186
|
const ye = (e) => {
|
|
187
|
-
const t = r.value.map((l) => (
|
|
188
|
-
return r.value = [...t],
|
|
187
|
+
const t = r.value.map((l) => (F(l, e), l));
|
|
188
|
+
return r.value = [...t], Z(), i.value = e ? [...Object.values(C.value).flat()] : [], R(), [...i.value];
|
|
189
189
|
}, be = () => {
|
|
190
190
|
g.value.unshift({
|
|
191
191
|
key: "selection",
|
|
192
192
|
width: 50,
|
|
193
193
|
cellRenderer: (e) => {
|
|
194
194
|
const { rowData: t } = e, a = t.children && t.children.length > 0 ? xe(t) : !1;
|
|
195
|
-
return H(
|
|
195
|
+
return H(Q, {
|
|
196
196
|
value: t.selected,
|
|
197
197
|
intermediate: a,
|
|
198
198
|
onChange: (s) => Se(t, s)
|
|
@@ -200,10 +200,10 @@ import './assets/PaginationTable.css';const Me = { class: "flex h-full flex-col"
|
|
|
200
200
|
},
|
|
201
201
|
headerCellRenderer: () => {
|
|
202
202
|
const e = p(r), t = e.every((a) => {
|
|
203
|
-
const s = a.selected, o =
|
|
203
|
+
const s = a.selected, o = te(a);
|
|
204
204
|
return s && o;
|
|
205
|
-
}), l = e.some((a) => a.selected ||
|
|
206
|
-
return H(
|
|
205
|
+
}), l = e.some((a) => a.selected || le(a));
|
|
206
|
+
return H(Q, {
|
|
207
207
|
value: t,
|
|
208
208
|
intermediate: l && !t,
|
|
209
209
|
// 目前是当前页全选就是全选状态,也就是每页的全选状态单独的
|
|
@@ -217,28 +217,28 @@ import './assets/PaginationTable.css';const Me = { class: "flex h-full flex-col"
|
|
|
217
217
|
const t = e.children.filter((l) => l.selected).length;
|
|
218
218
|
return t > 0 && t < e.children.length;
|
|
219
219
|
};
|
|
220
|
+
function te(e) {
|
|
221
|
+
return e.children?.length ? !!e.selected && e.children.every(te) : !!e.selected;
|
|
222
|
+
}
|
|
220
223
|
function le(e) {
|
|
221
|
-
return e.
|
|
224
|
+
return e.selected ? !0 : e.children?.some(le) || !1;
|
|
222
225
|
}
|
|
223
226
|
function ae(e) {
|
|
224
|
-
return e.selected ? !0 : e.children?.some(ae) || !1;
|
|
225
|
-
}
|
|
226
|
-
function ne(e) {
|
|
227
227
|
return e.map((t) => {
|
|
228
228
|
const l = { ...t, selected: !1 };
|
|
229
|
-
return l.children && (l.children =
|
|
229
|
+
return l.children && (l.children = ae(l.children)), l;
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
232
|
const B = v(!1), Ce = () => {
|
|
233
233
|
B.value = !0, be();
|
|
234
|
-
},
|
|
235
|
-
B.value = !1, i.value = [], r.value = r.value.map((e) => (
|
|
234
|
+
}, V = () => {
|
|
235
|
+
B.value = !1, i.value = [], r.value = r.value.map((e) => (F(e, !1), e)), C.value = {}, x.value = ae(x.value), g.value.shift(), R();
|
|
236
236
|
}, we = () => {
|
|
237
237
|
b("handleBatchDelete", {
|
|
238
238
|
selectedRows: Object.values(C.value).flat(),
|
|
239
239
|
// getAllSelectedNodes(finalTableData.value)
|
|
240
240
|
cb: () => {
|
|
241
|
-
|
|
241
|
+
V(), R();
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
244
|
}, Be = () => {
|
|
@@ -259,24 +259,24 @@ import './assets/PaginationTable.css';const Me = { class: "flex h-full flex-col"
|
|
|
259
259
|
...u.params,
|
|
260
260
|
...d.value
|
|
261
261
|
}).then((e) => {
|
|
262
|
-
x.value =
|
|
262
|
+
x.value = L(
|
|
263
263
|
e?.data[u.tableDataKey],
|
|
264
264
|
d.value[h.value],
|
|
265
|
-
|
|
266
|
-
) || [],
|
|
267
|
-
}) : (x.value =
|
|
265
|
+
J.value
|
|
266
|
+
) || [], q.value = e?.data?.total;
|
|
267
|
+
}) : (x.value = L(
|
|
268
268
|
u.tableData,
|
|
269
269
|
d.value[h.value],
|
|
270
|
-
|
|
271
|
-
),
|
|
270
|
+
J.value
|
|
271
|
+
), q.value = u.total);
|
|
272
272
|
};
|
|
273
|
-
function
|
|
273
|
+
function L(e, t, l, a = !1) {
|
|
274
274
|
return e.map((s) => {
|
|
275
275
|
const o = l.has(s.id) || a, f = {
|
|
276
276
|
...s,
|
|
277
277
|
selected: o
|
|
278
278
|
};
|
|
279
|
-
return f.children && (f.children =
|
|
279
|
+
return f.children && (f.children = L(
|
|
280
280
|
f.children,
|
|
281
281
|
t,
|
|
282
282
|
l,
|
|
@@ -286,116 +286,116 @@ import './assets/PaginationTable.css';const Me = { class: "flex h-full flex-col"
|
|
|
286
286
|
});
|
|
287
287
|
}
|
|
288
288
|
const Re = () => {
|
|
289
|
-
d.value[h.value] =
|
|
289
|
+
d.value[h.value] = $[h.value], T();
|
|
290
290
|
}, Te = () => {
|
|
291
|
-
d.value = {
|
|
292
|
-
},
|
|
293
|
-
e === "size" && (d.value[h.value] = 1), T(), b(
|
|
294
|
-
}, P = v(0),
|
|
295
|
-
let e = P.value, t =
|
|
291
|
+
d.value = { ...$ }, T();
|
|
292
|
+
}, ne = (e) => {
|
|
293
|
+
e === "size" && (d.value[h.value] = 1), T(), b(ce.paginationChange, d.value);
|
|
294
|
+
}, P = v(0), N = () => {
|
|
295
|
+
let e = P.value, t = Me(u.columns);
|
|
296
296
|
const l = 1 / Ve(), a = t.filter((n) => n.fixedWidth), s = t.filter((n) => !n.fixedWidth);
|
|
297
297
|
let o = 0;
|
|
298
298
|
a.forEach((n) => {
|
|
299
299
|
n.width && (o += n.width);
|
|
300
300
|
});
|
|
301
|
-
let f = e - o,
|
|
301
|
+
let f = e - o, M = 0;
|
|
302
302
|
s.forEach((n) => {
|
|
303
|
-
n.width && (
|
|
303
|
+
n.width && (M += n.width);
|
|
304
304
|
});
|
|
305
|
-
const
|
|
306
|
-
if (t.forEach((n,
|
|
307
|
-
let
|
|
305
|
+
const ie = [];
|
|
306
|
+
if (t.forEach((n, A) => {
|
|
307
|
+
let W;
|
|
308
308
|
if (n.fixedWidth)
|
|
309
|
-
|
|
310
|
-
else if (n.width &&
|
|
311
|
-
const
|
|
312
|
-
|
|
309
|
+
W = n.width || 100;
|
|
310
|
+
else if (n.width && M > 0) {
|
|
311
|
+
const D = n.width / M, _ = f * D;
|
|
312
|
+
W = Math.max(_, n.width);
|
|
313
313
|
} else {
|
|
314
|
-
const
|
|
315
|
-
|
|
314
|
+
const D = s.filter((_) => !_.width);
|
|
315
|
+
W = D.length > 0 ? f / D.length : f / s.length;
|
|
316
316
|
}
|
|
317
|
-
|
|
318
|
-
}), t = t.map((n,
|
|
319
|
-
const n = g.value.find((
|
|
317
|
+
ie.push(W);
|
|
318
|
+
}), t = t.map((n, A) => (n.width = ie[A] * l, w.value && Object.keys(w.value).length && w.value[n.key] && (n.sortable = !0), n)), B.value) {
|
|
319
|
+
const n = g.value.find((A) => A.key === "selection");
|
|
320
320
|
n && (g.value = [n, ...t]);
|
|
321
321
|
} else
|
|
322
322
|
g.value = [...t];
|
|
323
323
|
};
|
|
324
|
-
|
|
324
|
+
ue(
|
|
325
325
|
() => B.value,
|
|
326
326
|
() => {
|
|
327
|
-
|
|
327
|
+
N();
|
|
328
328
|
}
|
|
329
|
-
),
|
|
329
|
+
), ue(
|
|
330
330
|
() => u.tableDomWidth,
|
|
331
331
|
(e) => {
|
|
332
|
-
e && (P.value = e,
|
|
332
|
+
e && (P.value = e, N());
|
|
333
333
|
}
|
|
334
334
|
);
|
|
335
|
-
const
|
|
336
|
-
P.value = document.querySelector(".TABLE-AREA").getBoundingClientRect().width,
|
|
335
|
+
const se = () => {
|
|
336
|
+
P.value = document.querySelector(".TABLE-AREA").getBoundingClientRect().width, N();
|
|
337
337
|
};
|
|
338
338
|
return ze(() => {
|
|
339
|
-
T(), g.value = u.columns, P.value = document.querySelector(".TABLE-AREA").getBoundingClientRect().width,
|
|
340
|
-
|
|
341
|
-
}), window.addEventListener("resize",
|
|
342
|
-
}),
|
|
339
|
+
T(), g.value = u.columns, P.value = document.querySelector(".TABLE-AREA").getBoundingClientRect().width, Pe(() => {
|
|
340
|
+
N();
|
|
341
|
+
}), window.addEventListener("resize", se);
|
|
342
|
+
}), fe({
|
|
343
343
|
getTableList: T,
|
|
344
344
|
search: Re,
|
|
345
345
|
reset: Te,
|
|
346
346
|
initBatchSelect: Be,
|
|
347
|
-
handleCancelSelect:
|
|
348
|
-
handleResize:
|
|
349
|
-
}), (e, t) => (S(), E("div",
|
|
350
|
-
y("div",
|
|
351
|
-
p(
|
|
352
|
-
|
|
347
|
+
handleCancelSelect: V,
|
|
348
|
+
handleResize: se
|
|
349
|
+
}), (e, t) => (S(), E("div", Ue, [
|
|
350
|
+
y("div", He, [
|
|
351
|
+
p(O)["filter-left"] ? (S(), E("div", Ge, [
|
|
352
|
+
I(e.$slots, "filter-left", {}, void 0, !0)
|
|
353
353
|
])) : k("", !0),
|
|
354
|
-
y("div",
|
|
355
|
-
c.hasBatchSelect && r.value.length ? (S(), E(
|
|
356
|
-
B.value ? (S(), E("div",
|
|
357
|
-
y("div",
|
|
354
|
+
y("div", Je, [
|
|
355
|
+
c.hasBatchSelect && r.value.length ? (S(), E(Ne, { key: 0 }, [
|
|
356
|
+
B.value ? (S(), E("div", Qe, [
|
|
357
|
+
y("div", Xe, "已选" + Ae(i.value.length) + "条数据", 1),
|
|
358
358
|
y("div", {
|
|
359
359
|
class: "fz-12 text-3b64ff mg-l-4 pointer",
|
|
360
|
-
onClick:
|
|
360
|
+
onClick: V
|
|
361
361
|
}, "取消选择"),
|
|
362
|
-
|
|
363
|
-
y("div",
|
|
364
|
-
U(p(
|
|
362
|
+
I(e.$slots, "btn-group", {}, () => [
|
|
363
|
+
y("div", Ye, [
|
|
364
|
+
U(p(re), {
|
|
365
365
|
type: "danger",
|
|
366
366
|
onClick: we,
|
|
367
367
|
disabled: !i.value.length
|
|
368
368
|
}, {
|
|
369
|
-
default:
|
|
370
|
-
|
|
369
|
+
default: j(() => [...t[6] || (t[6] = [
|
|
370
|
+
de(" 删除 ", -1)
|
|
371
371
|
])]),
|
|
372
372
|
_: 1
|
|
373
373
|
}, 8, ["disabled"])
|
|
374
374
|
])
|
|
375
375
|
], !0)
|
|
376
|
-
])) : (S(),
|
|
376
|
+
])) : (S(), oe(p(re), {
|
|
377
377
|
key: 0,
|
|
378
378
|
disabled: c.disableBatchSelect,
|
|
379
379
|
title: c.disableBatchSelect ? c.disableBatchSelectText : "",
|
|
380
380
|
type: "default",
|
|
381
381
|
onClick: Ce
|
|
382
382
|
}, {
|
|
383
|
-
default:
|
|
384
|
-
|
|
383
|
+
default: j(() => [...t[5] || (t[5] = [
|
|
384
|
+
de(" 批量选择 ", -1)
|
|
385
385
|
])]),
|
|
386
386
|
_: 1
|
|
387
387
|
}, 8, ["disabled", "title"]))
|
|
388
388
|
], 64)) : k("", !0),
|
|
389
|
-
p(
|
|
389
|
+
p(O)["filter-right"] ? I(e.$slots, "filter-right", { key: 1 }, void 0, !0) : k("", !0)
|
|
390
390
|
])
|
|
391
391
|
]),
|
|
392
|
-
y("div",
|
|
393
|
-
y("div",
|
|
394
|
-
U(p(
|
|
395
|
-
default:
|
|
396
|
-
U(p(
|
|
397
|
-
"expanded-row-keys":
|
|
398
|
-
"onUpdate:expandedRowKeys": t[0] || (t[0] = (s) =>
|
|
392
|
+
y("div", Ze, [
|
|
393
|
+
y("div", et, [
|
|
394
|
+
U(p(qe), null, {
|
|
395
|
+
default: j(({ width: l, height: a }) => [
|
|
396
|
+
U(p(Ke), {
|
|
397
|
+
"expanded-row-keys": G.value,
|
|
398
|
+
"onUpdate:expandedRowKeys": t[0] || (t[0] = (s) => G.value = s),
|
|
399
399
|
"expand-column-key": c.expandColumnKey,
|
|
400
400
|
columns: g.value,
|
|
401
401
|
data: r.value,
|
|
@@ -406,10 +406,10 @@ import './assets/PaginationTable.css';const Me = { class: "flex h-full flex-col"
|
|
|
406
406
|
onEndReached: ge,
|
|
407
407
|
onColumnSort: pe
|
|
408
408
|
}, We({ _: 2 }, [
|
|
409
|
-
De(p(
|
|
409
|
+
De(p(O), (s, o) => ({
|
|
410
410
|
name: o,
|
|
411
|
-
fn:
|
|
412
|
-
|
|
411
|
+
fn: j((f) => [
|
|
412
|
+
I(e.$slots, o, Ie(je(f)), void 0, !0)
|
|
413
413
|
])
|
|
414
414
|
}))
|
|
415
415
|
]), 1032, ["expanded-row-keys", "expand-column-key", "columns", "data", "width", "height", "sort-state"])
|
|
@@ -417,25 +417,26 @@ import './assets/PaginationTable.css';const Me = { class: "flex h-full flex-col"
|
|
|
417
417
|
_: 3
|
|
418
418
|
})
|
|
419
419
|
]),
|
|
420
|
-
c.isPagination
|
|
421
|
-
c.isPagination ? (S(),
|
|
420
|
+
c.isPagination ? (S(), E("div", tt, [
|
|
421
|
+
c.isPagination ? (S(), oe(Le, Oe({
|
|
422
422
|
key: 0,
|
|
423
423
|
"current-page": d.value[h.value],
|
|
424
424
|
"onUpdate:currentPage": t[1] || (t[1] = (l) => d.value[h.value] = l),
|
|
425
|
-
"page-size": d.value[
|
|
426
|
-
"onUpdate:pageSize": t[2] || (t[2] = (l) => d.value[
|
|
425
|
+
"page-size": d.value[K.value],
|
|
426
|
+
"onUpdate:pageSize": t[2] || (t[2] = (l) => d.value[K.value] = l),
|
|
427
427
|
"page-sizes": c.pagination.pageSizes,
|
|
428
428
|
layout: c.pagination.layout,
|
|
429
|
-
total:
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
429
|
+
total: ve.value
|
|
430
|
+
}, e.$attrs, {
|
|
431
|
+
onSizeChange: t[3] || (t[3] = (l) => ne("size")),
|
|
432
|
+
onCurrentChange: t[4] || (t[4] = (l) => ne("page"))
|
|
433
|
+
}), null, 16, ["current-page", "page-size", "page-sizes", "layout", "total"])) : k("", !0)
|
|
433
434
|
])) : k("", !0)
|
|
434
435
|
])
|
|
435
436
|
]));
|
|
436
437
|
}
|
|
437
|
-
}),
|
|
438
|
+
}), at = /* @__PURE__ */ _e(lt, [["__scopeId", "data-v-7c948317"]]), ct = Ee(at);
|
|
438
439
|
export {
|
|
439
|
-
|
|
440
|
-
|
|
440
|
+
ct as PaginationTable,
|
|
441
|
+
ct as default
|
|
441
442
|
};
|