@pungfe/element 0.6.8 → 0.7.0
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/dist/{advance-BkjMiFIF.cjs → advance-C3SseCj_.cjs} +1 -1
- package/dist/{advance-CeuQa3QF.js → advance-KmjnJagK.js} +236 -232
- package/dist/advance.cjs +1 -1
- package/dist/advance.js +1 -1
- package/dist/{basic-CHngH3v0.js → basic-CXOdRsEt.js} +5 -7
- package/dist/{basic-QaGJh7c5.cjs → basic-DBeNaB1t.cjs} +1 -1
- package/dist/basic.cjs +1 -1
- package/dist/basic.js +1 -1
- package/dist/components/advance/XTableFlex.vue.d.ts +2 -2
- package/dist/components/advance/XTableRequestConfig.vue.d.ts +27 -4
- package/dist/components/basic/Table.vue.d.ts +2 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/package.json.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, d as u, g as d, k as f, l as p, n as m, o as h, s as g, u as _, w as v, x as y, y as b } from "./basic-
|
|
2
|
-
import { ElFormItem as x, ElMessage as ee, ElPopconfirm as te, ElPopover as ne, ElScrollbar as S, ElSpace as re, ElSwitch as ie, ElText as C, genFileId as
|
|
3
|
-
import { Fragment as
|
|
1
|
+
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, d as u, g as d, k as f, l as p, n as m, o as h, s as g, u as _, w as v, x as y, y as b } from "./basic-CXOdRsEt.js";
|
|
2
|
+
import { ElFormItem as x, ElMessage as ee, ElPopconfirm as te, ElPopover as ne, ElScrollbar as S, ElSpace as re, ElSwitch as ie, ElText as C, genFileId as ae, useLocale as oe } from "element-plus";
|
|
3
|
+
import { Fragment as se, computed as w, createBlock as ce, createCommentVNode as le, createElementBlock as ue, createElementVNode as de, createSlots as fe, createTextVNode as T, createVNode as E, defineComponent as D, guardReactiveProps as pe, inject as me, isRef as he, isVNode as ge, mergeModels as _e, mergeProps as ve, nextTick as ye, normalizeProps as be, openBlock as O, ref as xe, renderSlot as Se, resolveComponent as Ce, resolveDirective as we, toDisplayString as Te, toValue as Ee, unref as k, useModel as De, useTemplateRef as Oe, watch as ke, withCtx as A, withDirectives as Ae } from "vue";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/components/advance/XButtonAsync.vue
|
|
6
|
-
var
|
|
6
|
+
var je = /* @__PURE__ */ D({
|
|
7
7
|
__name: "XButtonAsync",
|
|
8
8
|
props: {
|
|
9
9
|
action: { type: Function },
|
|
@@ -27,20 +27,20 @@ var Ae = /* @__PURE__ */ k({
|
|
|
27
27
|
} catch (e) {
|
|
28
28
|
console.log(e);
|
|
29
29
|
}
|
|
30
|
-
}), n =
|
|
31
|
-
return (n, i) => (
|
|
30
|
+
}), n = me(b, void 0), r = w(() => e.link ?? n);
|
|
31
|
+
return (n, i) => (O(), ce(k(y), ve({
|
|
32
32
|
disabled: e.disabled,
|
|
33
33
|
icon: e.icon,
|
|
34
34
|
type: e.type,
|
|
35
35
|
link: r.value,
|
|
36
36
|
size: e.size,
|
|
37
37
|
text: e.text
|
|
38
|
-
}, { onClick:
|
|
39
|
-
default:
|
|
38
|
+
}, { onClick: k(t) }), {
|
|
39
|
+
default: A(() => [Se(n.$slots, "default")]),
|
|
40
40
|
_: 3
|
|
41
41
|
}, 16, ["onClick"]));
|
|
42
42
|
}
|
|
43
|
-
}),
|
|
43
|
+
}), Me = /* @__PURE__ */ D({
|
|
44
44
|
__name: "XButtonConfirm",
|
|
45
45
|
props: {
|
|
46
46
|
title: {},
|
|
@@ -56,14 +56,14 @@ var Ae = /* @__PURE__ */ k({
|
|
|
56
56
|
},
|
|
57
57
|
emits: ["cancel", "confirm"],
|
|
58
58
|
setup(e, { emit: t }) {
|
|
59
|
-
let n = t, { t: r } =
|
|
60
|
-
return (t, i) => (
|
|
61
|
-
title: e.title ??
|
|
59
|
+
let n = t, { t: r } = oe(me(l, void 0)), i = me(b, void 0), a = w(() => e.link ?? i);
|
|
60
|
+
return (t, i) => (O(), ce(k(te), {
|
|
61
|
+
title: e.title ?? k(r)("el.common.confirmExecute"),
|
|
62
62
|
width: "auto",
|
|
63
63
|
onCancel: i[0] ||= () => n("cancel"),
|
|
64
64
|
onConfirm: i[1] ||= () => n("confirm")
|
|
65
65
|
}, {
|
|
66
|
-
reference:
|
|
66
|
+
reference: A(() => [E(k(y), be(pe({
|
|
67
67
|
disabled: e.disabled,
|
|
68
68
|
icon: e.icon,
|
|
69
69
|
type: e.type,
|
|
@@ -71,31 +71,31 @@ var Ae = /* @__PURE__ */ k({
|
|
|
71
71
|
size: e.size,
|
|
72
72
|
text: e.text
|
|
73
73
|
})), {
|
|
74
|
-
default:
|
|
74
|
+
default: A(() => [Se(t.$slots, "default")]),
|
|
75
75
|
_: 3
|
|
76
76
|
}, 16)]),
|
|
77
|
-
actions:
|
|
77
|
+
actions: A(({ confirm: e, cancel: t }) => [E(k(y), {
|
|
78
78
|
size: "small",
|
|
79
79
|
disabled: !1,
|
|
80
80
|
onClick: t
|
|
81
81
|
}, {
|
|
82
|
-
default:
|
|
82
|
+
default: A(() => [T(Te(k(r)("el.common.cancel")), 1)]),
|
|
83
83
|
_: 1
|
|
84
|
-
}, 8, ["onClick"]),
|
|
84
|
+
}, 8, ["onClick"]), E(k(y), {
|
|
85
85
|
type: "danger",
|
|
86
86
|
disabled: !1,
|
|
87
87
|
size: "small",
|
|
88
88
|
onClick: e
|
|
89
89
|
}, {
|
|
90
|
-
default:
|
|
90
|
+
default: A(() => [T(Te(k(r)("el.common.confirm")), 1)]),
|
|
91
91
|
_: 1
|
|
92
92
|
}, 8, ["onClick"])]),
|
|
93
93
|
_: 3
|
|
94
94
|
}, 8, ["title"]));
|
|
95
95
|
}
|
|
96
|
-
}),
|
|
96
|
+
}), Ne = /* @__PURE__ */ D({
|
|
97
97
|
__name: "XCascaderRequest",
|
|
98
|
-
props: /*@__PURE__*/
|
|
98
|
+
props: /*@__PURE__*/ _e({
|
|
99
99
|
clearable: { type: Boolean },
|
|
100
100
|
disabled: {
|
|
101
101
|
type: Boolean,
|
|
@@ -110,9 +110,9 @@ var Ae = /* @__PURE__ */ k({
|
|
|
110
110
|
modelValue: {},
|
|
111
111
|
modelModifiers: {}
|
|
112
112
|
}),
|
|
113
|
-
emits: /*@__PURE__*/
|
|
113
|
+
emits: /*@__PURE__*/ _e(["change", "prepare"], ["update:modelValue"]),
|
|
114
114
|
setup(e, { expose: t, emit: n }) {
|
|
115
|
-
let r = n, i =
|
|
115
|
+
let r = n, i = De(e, "modelValue"), { data: a, execute: o, path: s, query: c, url: l } = e.request();
|
|
116
116
|
return t({
|
|
117
117
|
data: a,
|
|
118
118
|
execute: o,
|
|
@@ -125,18 +125,18 @@ var Ae = /* @__PURE__ */ k({
|
|
|
125
125
|
}), o();
|
|
126
126
|
}),
|
|
127
127
|
url: l
|
|
128
|
-
}), (t, n) => (
|
|
128
|
+
}), (t, n) => (O(), ce(k(d), ve({
|
|
129
129
|
modelValue: i.value,
|
|
130
130
|
"onUpdate:modelValue": n[0] ||= (e) => i.value = e
|
|
131
131
|
}, {
|
|
132
132
|
clearable: e.clearable,
|
|
133
133
|
disabled: e.disabled,
|
|
134
134
|
filterable: e.filterable,
|
|
135
|
-
data:
|
|
135
|
+
data: k(a),
|
|
136
136
|
props: e.props
|
|
137
137
|
}), null, 16, ["modelValue"]));
|
|
138
138
|
}
|
|
139
|
-
}),
|
|
139
|
+
}), Pe = { class: "flex-1 overflow-hidden" }, Fe = /* @__PURE__ */ D({
|
|
140
140
|
__name: "XFormFlex",
|
|
141
141
|
props: {
|
|
142
142
|
content: { type: Function },
|
|
@@ -149,21 +149,21 @@ var Ae = /* @__PURE__ */ k({
|
|
|
149
149
|
size: {}
|
|
150
150
|
},
|
|
151
151
|
setup(e, { expose: t }) {
|
|
152
|
-
let n =
|
|
152
|
+
let n = Oe("form");
|
|
153
153
|
t({
|
|
154
154
|
clearValidate: () => n.value?.clearValidate(),
|
|
155
155
|
validate: () => n.value?.validate()
|
|
156
156
|
});
|
|
157
157
|
let r = () => e.content?.({ data: e.data ?? {} });
|
|
158
|
-
return (e, t) => (
|
|
159
|
-
default:
|
|
158
|
+
return (e, t) => (O(), ue("div", Pe, [E(k(S), null, {
|
|
159
|
+
default: A(() => [E(k(u), ve({
|
|
160
160
|
ref_key: "form",
|
|
161
161
|
ref: n
|
|
162
162
|
}, e.$props, { content: r }), null, 16)]),
|
|
163
163
|
_: 1
|
|
164
164
|
})]));
|
|
165
165
|
}
|
|
166
|
-
}),
|
|
166
|
+
}), Ie = /* @__PURE__ */ D({
|
|
167
167
|
__name: "XFormRequest",
|
|
168
168
|
props: {
|
|
169
169
|
content: { type: Function },
|
|
@@ -180,7 +180,7 @@ var Ae = /* @__PURE__ */ k({
|
|
|
180
180
|
},
|
|
181
181
|
emits: ["prepare"],
|
|
182
182
|
setup(e, { expose: t, emit: n }) {
|
|
183
|
-
let r = n, { data: i, execute: a, isFetching: o, path: s, query: c, url: l } = e.request(), d = JSON.stringify(i.value), p =
|
|
183
|
+
let r = n, { data: i, execute: a, isFetching: o, path: s, query: c, url: l } = e.request(), d = JSON.stringify(i.value), p = w(() => o.value || (typeof e.disabled == "function" ? e.disabled({ data: i.value }) : e.disabled)), m = Oe("form"), h = () => i.value = JSON.parse(d), g = () => m.value?.validate(), _ = () => m.value?.clearValidate(), v = () => {
|
|
184
184
|
h(), m.value?.resetFields();
|
|
185
185
|
}, y = f(async () => {
|
|
186
186
|
r("prepare", {
|
|
@@ -197,23 +197,23 @@ var Ae = /* @__PURE__ */ k({
|
|
|
197
197
|
url: l,
|
|
198
198
|
validate: g
|
|
199
199
|
}), (t, n) => {
|
|
200
|
-
let r =
|
|
201
|
-
return
|
|
200
|
+
let r = we("loading");
|
|
201
|
+
return Ae((O(), ce(k(u), ve({
|
|
202
202
|
ref_key: "form",
|
|
203
203
|
ref: m,
|
|
204
204
|
class: "flex flex-1 flex-col gap-2 overflow-hidden"
|
|
205
205
|
}, {
|
|
206
|
-
data:
|
|
206
|
+
data: k(i),
|
|
207
207
|
disabled: p.value,
|
|
208
208
|
inline: e.inline,
|
|
209
209
|
labelPosition: e.labelPosition,
|
|
210
210
|
labelSuffix: e.labelSuffix,
|
|
211
211
|
labelWidth: e.labelWidth,
|
|
212
212
|
content: b
|
|
213
|
-
}), null, 16)), [[r,
|
|
213
|
+
}), null, 16)), [[r, k(o)]]);
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
}),
|
|
216
|
+
}), Le = /* @__PURE__ */ D({
|
|
217
217
|
__name: "XRequest",
|
|
218
218
|
props: {
|
|
219
219
|
content: { type: Function },
|
|
@@ -243,18 +243,18 @@ var Ae = /* @__PURE__ */ k({
|
|
|
243
243
|
query: l,
|
|
244
244
|
search: d,
|
|
245
245
|
url: u
|
|
246
|
-
}), (e, t) =>
|
|
247
|
-
data:
|
|
248
|
-
paging:
|
|
249
|
-
path:
|
|
250
|
-
query:
|
|
251
|
-
isFetching:
|
|
252
|
-
search:
|
|
253
|
-
}, () => [
|
|
246
|
+
}), (e, t) => Se(e.$slots, "default", {
|
|
247
|
+
data: k(i),
|
|
248
|
+
paging: k(s),
|
|
249
|
+
path: k(c),
|
|
250
|
+
query: k(l),
|
|
251
|
+
isFetching: k(o),
|
|
252
|
+
search: k(d)
|
|
253
|
+
}, () => [E(p)]);
|
|
254
254
|
}
|
|
255
|
-
}),
|
|
255
|
+
}), Re = /* @__PURE__ */ D({
|
|
256
256
|
__name: "XSelectRequest",
|
|
257
|
-
props: /*@__PURE__*/
|
|
257
|
+
props: /*@__PURE__*/ _e({
|
|
258
258
|
request: { type: Function },
|
|
259
259
|
supplement: { type: Function },
|
|
260
260
|
allowCreate: { type: Boolean },
|
|
@@ -283,14 +283,14 @@ var Ae = /* @__PURE__ */ k({
|
|
|
283
283
|
modelValue: {},
|
|
284
284
|
modelModifiers: {}
|
|
285
285
|
}),
|
|
286
|
-
emits: /*@__PURE__*/
|
|
286
|
+
emits: /*@__PURE__*/ _e([
|
|
287
287
|
"prepare",
|
|
288
288
|
"blur",
|
|
289
289
|
"change",
|
|
290
290
|
"focus"
|
|
291
291
|
], ["update:modelValue"]),
|
|
292
292
|
setup(e, { expose: t, emit: n }) {
|
|
293
|
-
let r = n, i =
|
|
293
|
+
let r = n, i = De(e, "modelValue"), { data: a, execute: o, isFetching: s, path: c, query: l, url: u } = e.request(), d = 0, p = "", m = f(async (e) => {
|
|
294
294
|
(!d || e !== p) && (r("prepare", {
|
|
295
295
|
path: c.value,
|
|
296
296
|
query: l.value
|
|
@@ -303,10 +303,10 @@ var Ae = /* @__PURE__ */ k({
|
|
|
303
303
|
query: l,
|
|
304
304
|
search: m,
|
|
305
305
|
url: u
|
|
306
|
-
}), (t, n) => (
|
|
307
|
-
data:
|
|
308
|
-
supplement:
|
|
309
|
-
remoteMethod:
|
|
306
|
+
}), (t, n) => (O(), ce(k(h), ve({
|
|
307
|
+
data: k(a),
|
|
308
|
+
supplement: k(g),
|
|
309
|
+
remoteMethod: k(m),
|
|
310
310
|
factory: e.factory,
|
|
311
311
|
allowCreate: e.allowCreate,
|
|
312
312
|
clearable: e.clearable,
|
|
@@ -315,7 +315,7 @@ var Ae = /* @__PURE__ */ k({
|
|
|
315
315
|
remote: e.remote,
|
|
316
316
|
filterable: e.remote || e.filterable,
|
|
317
317
|
disabled: e.disabled,
|
|
318
|
-
loading:
|
|
318
|
+
loading: k(s) || e.loading,
|
|
319
319
|
multiple: e.multiple,
|
|
320
320
|
size: e.size
|
|
321
321
|
}, {
|
|
@@ -326,26 +326,26 @@ var Ae = /* @__PURE__ */ k({
|
|
|
326
326
|
onChange: n[3] ||= (e) => t.$emit("change", e)
|
|
327
327
|
}), null, 16, ["modelValue"]));
|
|
328
328
|
}
|
|
329
|
-
}),
|
|
329
|
+
}), ze = /* @__PURE__ */ D({
|
|
330
330
|
name: "Rank",
|
|
331
331
|
__name: "rank",
|
|
332
332
|
setup(e) {
|
|
333
|
-
return (e, t) => (
|
|
333
|
+
return (e, t) => (O(), ue("svg", {
|
|
334
334
|
xmlns: "http://www.w3.org/2000/svg",
|
|
335
335
|
viewBox: "0 0 1024 1024"
|
|
336
|
-
}, [
|
|
336
|
+
}, [de("path", {
|
|
337
337
|
fill: "currentColor",
|
|
338
338
|
d: "m186.496 544 41.408 41.344a32 32 0 1 1-45.248 45.312l-96-96a32 32 0 0 1 0-45.312l96-96a32 32 0 1 1 45.248 45.312L186.496 480h290.816V186.432l-41.472 41.472a32 32 0 1 1-45.248-45.184l96-96.128a32 32 0 0 1 45.312 0l96 96.064a32 32 0 0 1-45.248 45.184l-41.344-41.28V480H832l-41.344-41.344a32 32 0 0 1 45.248-45.312l96 96a32 32 0 0 1 0 45.312l-96 96a32 32 0 0 1-45.248-45.312L832 544H541.312v293.44l41.344-41.28a32 32 0 1 1 45.248 45.248l-96 96a32 32 0 0 1-45.312 0l-96-96a32 32 0 1 1 45.312-45.248l41.408 41.408V544z"
|
|
339
339
|
})]));
|
|
340
340
|
}
|
|
341
|
-
}),
|
|
341
|
+
}), Be = /* @__PURE__ */ D({
|
|
342
342
|
name: "Setting",
|
|
343
343
|
__name: "setting",
|
|
344
344
|
setup(e) {
|
|
345
|
-
return (e, t) => (
|
|
345
|
+
return (e, t) => (O(), ue("svg", {
|
|
346
346
|
xmlns: "http://www.w3.org/2000/svg",
|
|
347
347
|
viewBox: "0 0 1024 1024"
|
|
348
|
-
}, [
|
|
348
|
+
}, [de("path", {
|
|
349
349
|
fill: "currentColor",
|
|
350
350
|
d: "M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"
|
|
351
351
|
})]));
|
|
@@ -353,7 +353,7 @@ var Ae = /* @__PURE__ */ k({
|
|
|
353
353
|
});
|
|
354
354
|
//#endregion
|
|
355
355
|
//#region node_modules/.pnpm/sortablejs@1.15.7/node_modules/sortablejs/modular/sortable.esm.js
|
|
356
|
-
function
|
|
356
|
+
function Ve(e, t, n) {
|
|
357
357
|
return (t = qe(t)) in e ? Object.defineProperty(e, t, {
|
|
358
358
|
value: n,
|
|
359
359
|
enumerable: !0,
|
|
@@ -361,16 +361,16 @@ function Be(e, t, n) {
|
|
|
361
361
|
writable: !0
|
|
362
362
|
}) : e[t] = n, e;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
return
|
|
364
|
+
function He() {
|
|
365
|
+
return He = Object.assign ? Object.assign.bind() : function(e) {
|
|
366
366
|
for (var t = 1; t < arguments.length; t++) {
|
|
367
367
|
var n = arguments[t];
|
|
368
368
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
369
369
|
}
|
|
370
370
|
return e;
|
|
371
|
-
},
|
|
371
|
+
}, He.apply(null, arguments);
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function Ue(e, t) {
|
|
374
374
|
var n = Object.keys(e);
|
|
375
375
|
if (Object.getOwnPropertySymbols) {
|
|
376
376
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -380,12 +380,12 @@ function He(e, t) {
|
|
|
380
380
|
}
|
|
381
381
|
return n;
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function j(e) {
|
|
384
384
|
for (var t = 1; t < arguments.length; t++) {
|
|
385
385
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
386
|
-
t % 2 ?
|
|
387
|
-
|
|
388
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
386
|
+
t % 2 ? Ue(Object(n), !0).forEach(function(t) {
|
|
387
|
+
Ve(e, t, n[t]);
|
|
388
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ue(Object(n)).forEach(function(t) {
|
|
389
389
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
390
390
|
});
|
|
391
391
|
}
|
|
@@ -632,7 +632,7 @@ function Ct() {
|
|
|
632
632
|
target: t,
|
|
633
633
|
rect: R(t)
|
|
634
634
|
});
|
|
635
|
-
var n =
|
|
635
|
+
var n = j({}, e[e.length - 1].rect);
|
|
636
636
|
if (t.thisAnimationDuration) {
|
|
637
637
|
var r = st(t, !0);
|
|
638
638
|
r && (n.top -= r.f, n.left -= r.e);
|
|
@@ -694,7 +694,7 @@ var Et = [], Dt = { initializeByDefault: !0 }, Ot = {
|
|
|
694
694
|
};
|
|
695
695
|
var i = e + "Global";
|
|
696
696
|
Et.forEach(function(r) {
|
|
697
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
697
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](j({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](j({ sortable: t }, n)));
|
|
698
698
|
});
|
|
699
699
|
},
|
|
700
700
|
initializePlugins: function(e, t, n, r) {
|
|
@@ -702,7 +702,7 @@ var Et = [], Dt = { initializeByDefault: !0 }, Ot = {
|
|
|
702
702
|
var i = r.pluginName;
|
|
703
703
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
704
704
|
var a = new r(e, t, e.options);
|
|
705
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
705
|
+
a.sortable = e, a.options = e.options, e[i] = a, He(n, a.defaults);
|
|
706
706
|
}
|
|
707
707
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
708
708
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -712,7 +712,7 @@ var Et = [], Dt = { initializeByDefault: !0 }, Ot = {
|
|
|
712
712
|
getEventProperties: function(e, t) {
|
|
713
713
|
var n = {};
|
|
714
714
|
return Et.forEach(function(r) {
|
|
715
|
-
typeof r.eventProperties == "function" &&
|
|
715
|
+
typeof r.eventProperties == "function" && He(n, r.eventProperties.call(t[r.pluginName], e));
|
|
716
716
|
}), n;
|
|
717
717
|
},
|
|
718
718
|
modifyOption: function(e, t, n) {
|
|
@@ -730,14 +730,14 @@ function kt(e) {
|
|
|
730
730
|
bubbles: !0,
|
|
731
731
|
cancelable: !0
|
|
732
732
|
}) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
|
|
733
|
-
var v =
|
|
733
|
+
var v = j(j({}, m), Ot.getEventProperties(r, t));
|
|
734
734
|
for (var y in v) h[y] = v[y];
|
|
735
735
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
738
|
var At = ["evt"], V = function(e, t) {
|
|
739
739
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = We(n, At);
|
|
740
|
-
Ot.pluginEvent.bind(Q)(e, t,
|
|
740
|
+
Ot.pluginEvent.bind(Q)(e, t, j({
|
|
741
741
|
dragEl: U,
|
|
742
742
|
parentEl: W,
|
|
743
743
|
ghostEl: G,
|
|
@@ -772,7 +772,7 @@ var At = ["evt"], V = function(e, t) {
|
|
|
772
772
|
}, i));
|
|
773
773
|
};
|
|
774
774
|
function H(e) {
|
|
775
|
-
kt(
|
|
775
|
+
kt(j({
|
|
776
776
|
putSortable: Y,
|
|
777
777
|
cloneEl: q,
|
|
778
778
|
targetEl: U,
|
|
@@ -847,7 +847,7 @@ var pn = function(e) {
|
|
|
847
847
|
};
|
|
848
848
|
function Q(e, t) {
|
|
849
849
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
850
|
-
this.el = e, this.options = t =
|
|
850
|
+
this.el = e, this.options = t = He({}, t), e[B] = this;
|
|
851
851
|
var n = {
|
|
852
852
|
group: null,
|
|
853
853
|
sort: !0,
|
|
@@ -892,7 +892,7 @@ function Q(e, t) {
|
|
|
892
892
|
};
|
|
893
893
|
for (var r in Ot.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
894
894
|
for (var i in un(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
895
|
-
this.nativeDraggable = t.forceFallback ? !1 : an, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? M(e, "pointerdown", this._onTapStart) : (M(e, "mousedown", this._onTapStart), M(e, "touchstart", this._onTapStart)), this.nativeDraggable && (M(e, "dragover", this), M(e, "dragenter", this)), Bt.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []),
|
|
895
|
+
this.nativeDraggable = t.forceFallback ? !1 : an, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? M(e, "pointerdown", this._onTapStart) : (M(e, "mousedown", this._onTapStart), M(e, "touchstart", this._onTapStart)), this.nativeDraggable && (M(e, "dragover", this), M(e, "dragenter", this)), Bt.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), He(this, Ct());
|
|
896
896
|
}
|
|
897
897
|
Q.prototype = {
|
|
898
898
|
constructor: Q,
|
|
@@ -1062,7 +1062,7 @@ Q.prototype = {
|
|
|
1062
1062
|
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Lt === s, u = o.sort, d = Y || c, f, p = this, m = !1;
|
|
1063
1063
|
if ($t) return;
|
|
1064
1064
|
function h(o, s) {
|
|
1065
|
-
V(o, p,
|
|
1065
|
+
V(o, p, j({
|
|
1066
1066
|
evt: e,
|
|
1067
1067
|
isOwner: l,
|
|
1068
1068
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -1116,17 +1116,17 @@ Q.prototype = {
|
|
|
1116
1116
|
qt !== n && (ee = i[S], Yt = !1, Xt = !ne && o.invertSwap || te), x = xn(e, n, i, f, ne ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Xt, qt === n);
|
|
1117
1117
|
var C;
|
|
1118
1118
|
if (x !== 0) {
|
|
1119
|
-
var
|
|
1119
|
+
var ae = z(U);
|
|
1120
1120
|
do
|
|
1121
|
-
|
|
1121
|
+
ae -= x, C = W.children[ae];
|
|
1122
1122
|
while (C && (I(C, "display") === "none" || C === G));
|
|
1123
1123
|
}
|
|
1124
1124
|
if (x === 0 || C === n) return _(!1);
|
|
1125
1125
|
qt = n, Jt = x;
|
|
1126
|
-
var
|
|
1127
|
-
|
|
1128
|
-
var
|
|
1129
|
-
if (
|
|
1126
|
+
var oe = n.nextElementSibling, se = !1;
|
|
1127
|
+
se = x === 1;
|
|
1128
|
+
var w = gn(K, t, U, r, n, i, e, se);
|
|
1129
|
+
if (w !== !1) return (w === 1 || w === -1) && (se = w === 1), $t = !0, setTimeout(vn, 30), g(), se && !oe ? t.appendChild(U) : n.parentNode.insertBefore(U, se ? oe : n), re && bt(re, 0, ie - re.scrollTop), W = U.parentNode, ee !== void 0 && !Xt && (Zt = Math.abs(ee - R(n)[S])), v(), _(!0);
|
|
1130
1130
|
}
|
|
1131
1131
|
if (t.contains(U)) return _(!1);
|
|
1132
1132
|
}
|
|
@@ -1345,7 +1345,7 @@ tn && M(document, "touchmove", function(e) {
|
|
|
1345
1345
|
var e = [...arguments];
|
|
1346
1346
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
1347
1347
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
1348
|
-
e.utils && (Q.utils =
|
|
1348
|
+
e.utils && (Q.utils = j(j({}, Q.utils), e.utils)), Ot.mount(e);
|
|
1349
1349
|
});
|
|
1350
1350
|
}, Q.create = function(e, t) {
|
|
1351
1351
|
return new Q(e, t);
|
|
@@ -1396,7 +1396,7 @@ function Pn() {
|
|
|
1396
1396
|
Ln(e, this.options, mt(a, !1), !1);
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
|
-
},
|
|
1399
|
+
}, He(e, {
|
|
1400
1400
|
pluginName: "scroll",
|
|
1401
1401
|
initializeByDefault: !0
|
|
1402
1402
|
});
|
|
@@ -1417,9 +1417,9 @@ var Ln = vt(function(e, t, n, r) {
|
|
|
1417
1417
|
do {
|
|
1418
1418
|
var p = f, m = R(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, ee = void 0, te = p.scrollWidth, ne = p.scrollHeight, S = I(p), re = p.scrollLeft, ie = p.scrollTop;
|
|
1419
1419
|
p === c ? (x = y < te && (S.overflowX === "auto" || S.overflowX === "scroll" || S.overflowX === "visible"), ee = b < ne && (S.overflowY === "auto" || S.overflowY === "scroll" || S.overflowY === "visible")) : (x = y < te && (S.overflowX === "auto" || S.overflowX === "scroll"), ee = b < ne && (S.overflowY === "auto" || S.overflowY === "scroll"));
|
|
1420
|
-
var C = x && (Math.abs(v - i) <= o && re + y < te) - (Math.abs(_ - i) <= o && !!re),
|
|
1421
|
-
if (!$[d]) for (var
|
|
1422
|
-
($[d].vx != C || $[d].vy !=
|
|
1420
|
+
var C = x && (Math.abs(v - i) <= o && re + y < te) - (Math.abs(_ - i) <= o && !!re), ae = ee && (Math.abs(g - a) <= o && ie + b < ne) - (Math.abs(h - a) <= o && !!ie);
|
|
1421
|
+
if (!$[d]) for (var oe = 0; oe <= d; oe++) $[oe] || ($[oe] = {});
|
|
1422
|
+
($[d].vx != C || $[d].vy != ae || $[d].el !== p) && ($[d].el = p, $[d].vx = C, $[d].vy = ae, clearInterval($[d].pid), (C != 0 || ae != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
1423
1423
|
r && this.layer === 0 && Q.active._onTouchMove(Mn);
|
|
1424
1424
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
1425
1425
|
typeof u == "function" && u.call(Q.dragged.parentNode[B], n, t, e, Mn, $[this.layer].el) !== "continue" || bt($[this.layer].el, n, t);
|
|
@@ -1453,7 +1453,7 @@ zn.prototype = {
|
|
|
1453
1453
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
1454
1454
|
},
|
|
1455
1455
|
drop: Rn
|
|
1456
|
-
},
|
|
1456
|
+
}, He(zn, { pluginName: "revertOnSpill" });
|
|
1457
1457
|
function Bn() {}
|
|
1458
1458
|
Bn.prototype = {
|
|
1459
1459
|
onSpill: function(e) {
|
|
@@ -1461,7 +1461,7 @@ Bn.prototype = {
|
|
|
1461
1461
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
1462
1462
|
},
|
|
1463
1463
|
drop: Rn
|
|
1464
|
-
},
|
|
1464
|
+
}, He(Bn, { pluginName: "removeOnSpill" }), Q.mount(new Pn()), Q.mount(Bn, zn);
|
|
1465
1465
|
//#endregion
|
|
1466
1466
|
//#region node_modules/.pnpm/@vueuse+integrations@14.3.0_async-validator@4.2.5_sortablejs@1.15.7_vue@3.5.39_typescript@6.0.3_/node_modules/@vueuse/integrations/dist/useSortable.js
|
|
1467
1467
|
function Vn(e, n, i = {}) {
|
|
@@ -1481,7 +1481,7 @@ function Vn(e, n, i = {}) {
|
|
|
1481
1481
|
if (t !== void 0) s?.option(e, t);
|
|
1482
1482
|
else return s?.option(e);
|
|
1483
1483
|
}, g;
|
|
1484
|
-
return l && typeof e != "string" ? g =
|
|
1484
|
+
return l && typeof e != "string" ? g = ke(() => t(e), (e) => {
|
|
1485
1485
|
f(), e && p(e);
|
|
1486
1486
|
}, {
|
|
1487
1487
|
immediate: !0,
|
|
@@ -1505,10 +1505,10 @@ function Un(e) {
|
|
|
1505
1505
|
}
|
|
1506
1506
|
function Wn(e, t, n, r = null) {
|
|
1507
1507
|
r != null && (Un(r.item), Hn(r.from, r.item, t));
|
|
1508
|
-
let i =
|
|
1508
|
+
let i = he(e), a = i ? [...Ee(e)] : Ee(e);
|
|
1509
1509
|
if (n >= 0 && n < a.length) {
|
|
1510
1510
|
let r = a.splice(t, 1)[0];
|
|
1511
|
-
|
|
1511
|
+
ye(() => {
|
|
1512
1512
|
a.splice(n, 0, r), i && (e.value = a);
|
|
1513
1513
|
});
|
|
1514
1514
|
}
|
|
@@ -1517,11 +1517,11 @@ function Wn(e, t, n, r = null) {
|
|
|
1517
1517
|
//#region src/components/advance/XTableConfig.vue?vue&type=script&setup=true&lang.tsx
|
|
1518
1518
|
var Gn = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" };
|
|
1519
1519
|
function Kn(e) {
|
|
1520
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1520
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
|
|
1521
1521
|
}
|
|
1522
1522
|
//#endregion
|
|
1523
1523
|
//#region src/components/advance/XTableConfig.vue
|
|
1524
|
-
var qn = /* @__PURE__ */
|
|
1524
|
+
var qn = /* @__PURE__ */ D({
|
|
1525
1525
|
__name: "XTableConfig",
|
|
1526
1526
|
props: {
|
|
1527
1527
|
config: {},
|
|
@@ -1560,54 +1560,55 @@ var qn = /* @__PURE__ */ k({
|
|
|
1560
1560
|
minWidth: t.width,
|
|
1561
1561
|
prop: n?.prop ?? t.prop
|
|
1562
1562
|
};
|
|
1563
|
-
}), d =
|
|
1563
|
+
}), d = xe();
|
|
1564
1564
|
Vn(d, o, {
|
|
1565
1565
|
animation: 150,
|
|
1566
1566
|
ghostClass: "bg-(--el-color-primary-light-7)",
|
|
1567
1567
|
handle: ".cursor-grab",
|
|
1568
1568
|
onUpdate: (e) => {
|
|
1569
|
-
Wn(o.value, e.oldIndex, e.newIndex, e),
|
|
1569
|
+
Wn(o.value, e.oldIndex, e.newIndex, e), ye(() => {
|
|
1570
1570
|
c(o.value);
|
|
1571
1571
|
});
|
|
1572
1572
|
}
|
|
1573
1573
|
});
|
|
1574
|
-
let { t: f } =
|
|
1574
|
+
let { t: f } = oe(me(l, void 0)), p = () => E(Jn, {
|
|
1575
1575
|
border: !0,
|
|
1576
1576
|
columns: u.value,
|
|
1577
1577
|
data: e.data,
|
|
1578
1578
|
onHeaderDragend: (e, t, n) => {
|
|
1579
1579
|
let r = o.value.find((e) => e.code === n.columnKey);
|
|
1580
|
-
r && (r.width = e,
|
|
1580
|
+
r && (r.width = e, ye(() => {
|
|
1581
1581
|
c(o.value);
|
|
1582
1582
|
}));
|
|
1583
1583
|
},
|
|
1584
1584
|
onRowClick: (e) => a("rowClick", e),
|
|
1585
|
+
onScroll: (e) => a("scroll", e),
|
|
1585
1586
|
showOverflowTooltip: !0
|
|
1586
|
-
}, null), m = () =>
|
|
1587
|
+
}, null), m = () => E(ne, {
|
|
1587
1588
|
"popper-class": "shadow-xl bg-(--el-bg-color)",
|
|
1588
1589
|
trigger: "click",
|
|
1589
1590
|
width: "auto"
|
|
1590
1591
|
}, {
|
|
1591
1592
|
default: () => {
|
|
1592
1593
|
let e;
|
|
1593
|
-
return
|
|
1594
|
+
return E("div", { class: "flex flex-col gap-2" }, [E(C, { size: "large" }, Kn(e = f("el.common.tableConfigTitle")) ? e : { default: () => [e] }), E(S, { "max-height": 500 }, { default: () => [E("div", {
|
|
1594
1595
|
class: "flex flex-col divide-y divide-[#f2f6fc]",
|
|
1595
1596
|
ref: d
|
|
1596
|
-
}, { default: () => o.value.map((e) =>
|
|
1597
|
-
|
|
1597
|
+
}, { default: () => o.value.map((e) => E("div", { class: "flex w-50 items-center gap-2 py-2" }, [
|
|
1598
|
+
E(y, {
|
|
1598
1599
|
class: "cursor-grab",
|
|
1599
1600
|
disabled: !1,
|
|
1600
|
-
icon:
|
|
1601
|
+
icon: ze,
|
|
1601
1602
|
size: "small",
|
|
1602
1603
|
text: !0,
|
|
1603
1604
|
type: "primary"
|
|
1604
1605
|
}, null),
|
|
1605
|
-
|
|
1606
|
-
|
|
1606
|
+
E(C, { class: "flex-1 text-ellipsis" }, { default: () => [e.label] }),
|
|
1607
|
+
E(ie, {
|
|
1607
1608
|
disabled: !1,
|
|
1608
1609
|
modelValue: e.visible,
|
|
1609
1610
|
"onUpdate:modelValue": (t) => {
|
|
1610
|
-
e.visible = t,
|
|
1611
|
+
e.visible = t, ye(() => {
|
|
1611
1612
|
c(o.value);
|
|
1612
1613
|
});
|
|
1613
1614
|
},
|
|
@@ -1615,19 +1616,19 @@ var qn = /* @__PURE__ */ k({
|
|
|
1615
1616
|
}, null)
|
|
1616
1617
|
])) })] })]);
|
|
1617
1618
|
},
|
|
1618
|
-
reference: () =>
|
|
1619
|
+
reference: () => E(y, {
|
|
1619
1620
|
class: "absolute top-0 right-0 z-1000",
|
|
1620
1621
|
disabled: !1,
|
|
1621
|
-
icon:
|
|
1622
|
+
icon: Be,
|
|
1622
1623
|
text: !0
|
|
1623
1624
|
}, null)
|
|
1624
1625
|
});
|
|
1625
1626
|
return t({ data: e.data }), (e, t) => {
|
|
1626
|
-
let n =
|
|
1627
|
-
return
|
|
1627
|
+
let n = we("loading");
|
|
1628
|
+
return Ae((O(), ue("div", Gn, [E(m), E(p)])), [[n, k(s)]]);
|
|
1628
1629
|
};
|
|
1629
1630
|
}
|
|
1630
|
-
}), Jn = /* @__PURE__ */
|
|
1631
|
+
}), Jn = /* @__PURE__ */ D({
|
|
1631
1632
|
__name: "XTableFlex",
|
|
1632
1633
|
props: {
|
|
1633
1634
|
cellClassName: {},
|
|
@@ -1666,29 +1667,26 @@ var qn = /* @__PURE__ */ k({
|
|
|
1666
1667
|
"selectionChange"
|
|
1667
1668
|
],
|
|
1668
1669
|
setup(e, { expose: t }) {
|
|
1669
|
-
let n = e, r =
|
|
1670
|
+
let n = e, r = Oe("container"), i = v(r), a = Oe("table");
|
|
1670
1671
|
return t({
|
|
1671
1672
|
clearSelection: () => a.value?.clearSelection(),
|
|
1672
|
-
container: r,
|
|
1673
1673
|
getSelectionRows: () => a.value?.getSelectionRows(),
|
|
1674
|
+
scrollBarRef: w(() => a.value?.scrollBarRef),
|
|
1674
1675
|
scrollTo: (e, t) => a.value?.scrollTo(e, t),
|
|
1675
1676
|
setCurrentRow: (e) => a.value?.setCurrentRow(e),
|
|
1676
1677
|
setScrollLeft: (e) => a.value?.setScrollLeft(e),
|
|
1677
1678
|
setScrollTop: (e) => a.value?.setScrollTop(e),
|
|
1678
1679
|
toggleRowSelection: (e, t, n) => a.value?.toggleRowSelection(e, t, n)
|
|
1679
|
-
}), (e, t) => (
|
|
1680
|
+
}), (e, t) => (O(), ue("div", {
|
|
1680
1681
|
ref_key: "container",
|
|
1681
1682
|
ref: r,
|
|
1682
1683
|
class: "flex-1 overflow-hidden"
|
|
1683
|
-
}, [
|
|
1684
|
+
}, [E(k(c), ve({
|
|
1684
1685
|
ref_key: "table",
|
|
1685
1686
|
ref: a
|
|
1686
1687
|
}, { ...n }, {
|
|
1687
|
-
height:
|
|
1688
|
-
onScroll: t[0] ||= (
|
|
1689
|
-
scrollLeft: t,
|
|
1690
|
-
scrollTop: n
|
|
1691
|
-
}),
|
|
1688
|
+
height: k(i).height.value,
|
|
1689
|
+
onScroll: t[0] ||= (t) => e.$emit("scroll", t),
|
|
1692
1690
|
onRowClick: t[1] ||= (t) => e.$emit("rowClick", t),
|
|
1693
1691
|
onRowDblclick: t[2] ||= (t) => e.$emit("rowDblclick", t),
|
|
1694
1692
|
onSelectionChange: t[3] ||= (t) => e.$emit("selectionChange", t),
|
|
@@ -1698,7 +1696,7 @@ var qn = /* @__PURE__ */ k({
|
|
|
1698
1696
|
}), Yn = { class: "flex flex-1 flex-col gap-2 overflow-hidden" }, Xn = {
|
|
1699
1697
|
key: 0,
|
|
1700
1698
|
class: "flex justify-end"
|
|
1701
|
-
}, Zn = /* @__PURE__ */
|
|
1699
|
+
}, Zn = /* @__PURE__ */ D({
|
|
1702
1700
|
__name: "XTableRequest",
|
|
1703
1701
|
props: {
|
|
1704
1702
|
cellClassName: { type: [Function, String] },
|
|
@@ -1760,7 +1758,7 @@ var qn = /* @__PURE__ */ k({
|
|
|
1760
1758
|
search: p,
|
|
1761
1759
|
url: u
|
|
1762
1760
|
});
|
|
1763
|
-
let m = () => e.header?.({ query: l.value }), h = () =>
|
|
1761
|
+
let m = () => e.header?.({ query: l.value }), h = () => E(Jn, {
|
|
1764
1762
|
cellClassName: e.cellClassName,
|
|
1765
1763
|
cellStyle: e.cellStyle,
|
|
1766
1764
|
columns: e.columns,
|
|
@@ -1769,15 +1767,12 @@ var qn = /* @__PURE__ */ k({
|
|
|
1769
1767
|
onHeaderDragend: (e, t, n) => r("headerDragend", e, t, n),
|
|
1770
1768
|
onRowClick: (e) => r("rowClick", e),
|
|
1771
1769
|
onRowDblclick: (e) => r("rowDblclick", e),
|
|
1772
|
-
onScroll: (
|
|
1773
|
-
scrollLeft: e,
|
|
1774
|
-
scrollTop: t
|
|
1775
|
-
}),
|
|
1770
|
+
onScroll: (e) => r("scroll", e),
|
|
1776
1771
|
onSelectionChange: (e) => r("selectionChange", e),
|
|
1777
1772
|
rowClassName: e.rowClassName,
|
|
1778
1773
|
rowStyle: e.rowStyle,
|
|
1779
1774
|
showOverflowTooltip: e.showOverflowTooltip
|
|
1780
|
-
}, null), _ = () =>
|
|
1775
|
+
}, null), _ = () => E(g, {
|
|
1781
1776
|
currentPage: s.value.pageIndex,
|
|
1782
1777
|
layout: e.paginationLayout,
|
|
1783
1778
|
onCurrentChange: () => a(),
|
|
@@ -1792,13 +1787,13 @@ var qn = /* @__PURE__ */ k({
|
|
|
1792
1787
|
total: s.value.itemCount
|
|
1793
1788
|
}, null), v = () => e.footer?.({ query: l.value });
|
|
1794
1789
|
return (t, n) => {
|
|
1795
|
-
let r =
|
|
1796
|
-
return
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
e.pagination ? (
|
|
1800
|
-
|
|
1801
|
-
])), [[r,
|
|
1790
|
+
let r = we("loading");
|
|
1791
|
+
return Ae((O(), ue("div", Yn, [
|
|
1792
|
+
E(m),
|
|
1793
|
+
E(h),
|
|
1794
|
+
e.pagination ? (O(), ue("div", Xn, [E(_)])) : le("", !0),
|
|
1795
|
+
E(v)
|
|
1796
|
+
])), [[r, k(o)]]);
|
|
1802
1797
|
};
|
|
1803
1798
|
}
|
|
1804
1799
|
}), Qn = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, $n = {
|
|
@@ -1806,11 +1801,11 @@ var qn = /* @__PURE__ */ k({
|
|
|
1806
1801
|
class: "flex justify-end"
|
|
1807
1802
|
};
|
|
1808
1803
|
function er(e) {
|
|
1809
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1804
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
|
|
1810
1805
|
}
|
|
1811
1806
|
//#endregion
|
|
1812
1807
|
//#region src/components/advance/XTableRequestConfig.vue
|
|
1813
|
-
var tr = /* @__PURE__ */
|
|
1808
|
+
var tr = /* @__PURE__ */ D({
|
|
1814
1809
|
__name: "XTableRequestConfig",
|
|
1815
1810
|
props: {
|
|
1816
1811
|
config: {},
|
|
@@ -1824,11 +1819,11 @@ var tr = /* @__PURE__ */ k({
|
|
|
1824
1819
|
request: { type: Function },
|
|
1825
1820
|
cellClassName: { type: [Function, String] },
|
|
1826
1821
|
cellStyle: { type: [Function, Object] },
|
|
1827
|
-
rowClassName: { type: [Function, String] },
|
|
1828
|
-
rowStyle: { type: [Function, Object] },
|
|
1829
1822
|
data: {},
|
|
1830
1823
|
height: {},
|
|
1824
|
+
rowClassName: { type: [Function, String] },
|
|
1831
1825
|
rowKey: { type: [Function, String] },
|
|
1826
|
+
rowStyle: { type: [Function, Object] },
|
|
1832
1827
|
showSummary: { type: Boolean },
|
|
1833
1828
|
size: {},
|
|
1834
1829
|
spanMethod: { type: Function },
|
|
@@ -1848,14 +1843,14 @@ var tr = /* @__PURE__ */ k({
|
|
|
1848
1843
|
"selectionChange"
|
|
1849
1844
|
],
|
|
1850
1845
|
setup(e, { expose: t, emit: r }) {
|
|
1851
|
-
let a = r, { data: o, execute: s, isFetching:
|
|
1846
|
+
let a = r, { data: o, execute: s, isFetching: d, paging: m, path: h, query: b, url: ee } = e.request(), te = JSON.stringify(b.value), ae = f(async () => {
|
|
1852
1847
|
a("prepare", {
|
|
1853
|
-
path:
|
|
1854
|
-
query:
|
|
1848
|
+
path: h.value,
|
|
1849
|
+
query: b.value
|
|
1855
1850
|
}), s();
|
|
1856
|
-
}),
|
|
1857
|
-
|
|
1858
|
-
}), { data:
|
|
1851
|
+
}), fe = f(async () => {
|
|
1852
|
+
b.value = JSON.parse(te), ae();
|
|
1853
|
+
}), { data: T, loading: D, update: pe } = e.fields(), he = n(T, (e) => e.visible), ge = i(he, (t) => {
|
|
1859
1854
|
let n = e.config[t.code];
|
|
1860
1855
|
return {
|
|
1861
1856
|
columnKey: t.code,
|
|
@@ -1864,141 +1859,150 @@ var tr = /* @__PURE__ */ k({
|
|
|
1864
1859
|
minWidth: t.width,
|
|
1865
1860
|
prop: n?.prop ?? t.prop
|
|
1866
1861
|
};
|
|
1867
|
-
}),
|
|
1868
|
-
Vn(
|
|
1862
|
+
}), _e = n(he, (e) => e.search), ve = w(() => !!_e.value.length), be = xe();
|
|
1863
|
+
Vn(be, T, {
|
|
1869
1864
|
animation: 150,
|
|
1870
1865
|
ghostClass: "bg-(--el-color-primary-light-7)",
|
|
1871
1866
|
handle: ".cursor-grab",
|
|
1872
1867
|
onUpdate: (e) => {
|
|
1873
|
-
Wn(
|
|
1874
|
-
|
|
1868
|
+
Wn(T.value, e.oldIndex, e.newIndex, e), ye(() => {
|
|
1869
|
+
pe(T.value);
|
|
1875
1870
|
});
|
|
1876
1871
|
}
|
|
1877
1872
|
});
|
|
1878
|
-
let
|
|
1879
|
-
content: ({ data: t }) =>
|
|
1873
|
+
let Se = me(l, void 0), { t: Ce } = oe(Se), Te = xe(), Ee = Oe("container"), De = v(Ee), ke = () => E(u, {
|
|
1874
|
+
content: ({ data: t }) => E("div", { class: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-x-2" }, [[..._e.value.map((n) => {
|
|
1880
1875
|
let r = e.config[n.code];
|
|
1881
|
-
return
|
|
1882
|
-
content: () => r?.search?.({ query: t }) ??
|
|
1876
|
+
return E(_, {
|
|
1877
|
+
content: () => r?.search?.({ query: t }) ?? E(p, {
|
|
1883
1878
|
disabled: !0,
|
|
1884
1879
|
modelValue: n.code
|
|
1885
1880
|
}, null),
|
|
1886
1881
|
label: r?.label ?? n.label
|
|
1887
1882
|
}, null);
|
|
1888
|
-
}),
|
|
1883
|
+
}), E(x, null, {
|
|
1889
1884
|
default: () => {
|
|
1890
1885
|
let e, t;
|
|
1891
|
-
return
|
|
1892
|
-
let e =
|
|
1893
|
-
e.pageIndex = void 0, e.pageSize = void 0,
|
|
1894
|
-
} }, er(e =
|
|
1886
|
+
return E(re, null, { default: () => [E(je, { action: () => {
|
|
1887
|
+
let e = b.value;
|
|
1888
|
+
e.pageIndex = void 0, e.pageSize = void 0, ae();
|
|
1889
|
+
} }, er(e = Ce("el.common.query")) ? e : { default: () => [e] }), E(y, { onClick: () => fe() }, er(t = Ce("el.common.reset")) ? t : { default: () => [t] })] });
|
|
1895
1890
|
},
|
|
1896
|
-
label: () =>
|
|
1891
|
+
label: () => E("div", { style: "height: 22px" }, null)
|
|
1897
1892
|
})]]),
|
|
1898
|
-
data:
|
|
1899
|
-
disabled:
|
|
1900
|
-
labelPosition:
|
|
1901
|
-
}, null),
|
|
1893
|
+
data: b.value,
|
|
1894
|
+
disabled: D.value || d.value,
|
|
1895
|
+
labelPosition: Se?.value.name.toLowerCase() === "zh-cn" ? "left" : "top"
|
|
1896
|
+
}, null), A = () => e.header?.({
|
|
1902
1897
|
data: o.value,
|
|
1903
|
-
isFetching:
|
|
1904
|
-
paging:
|
|
1905
|
-
path:
|
|
1906
|
-
query:
|
|
1907
|
-
}),
|
|
1898
|
+
isFetching: d.value,
|
|
1899
|
+
paging: m.value,
|
|
1900
|
+
path: h.value,
|
|
1901
|
+
query: b.value
|
|
1902
|
+
}), Me = () => E(c, {
|
|
1908
1903
|
border: !0,
|
|
1909
|
-
columns:
|
|
1904
|
+
columns: ge.value,
|
|
1910
1905
|
data: o.value,
|
|
1906
|
+
height: De.height.value,
|
|
1911
1907
|
onHeaderDragend: (e, t, n) => {
|
|
1912
|
-
let r =
|
|
1913
|
-
r && (r.width = e,
|
|
1914
|
-
|
|
1908
|
+
let r = T.value.find((e) => e.code === n.columnKey);
|
|
1909
|
+
r && (r.width = e, ye(() => {
|
|
1910
|
+
pe(T.value);
|
|
1915
1911
|
}));
|
|
1916
1912
|
},
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1913
|
+
onRowClick: (e) => a("rowClick", e),
|
|
1914
|
+
onRowDblclick: (e) => a("rowDblclick", e),
|
|
1915
|
+
onScroll: (e) => a("scroll", e),
|
|
1916
|
+
onSelectionChange: (e) => a("selectionChange", e),
|
|
1917
|
+
ref: Te,
|
|
1918
|
+
rowClassName: e.rowClassName,
|
|
1919
|
+
rowStyle: e.rowStyle,
|
|
1921
1920
|
showOverflowTooltip: !0
|
|
1922
|
-
}, null),
|
|
1921
|
+
}, null), Ne = () => E(ne, {
|
|
1923
1922
|
"popper-class": "shadow-xl bg-(--el-bg-color)",
|
|
1924
1923
|
trigger: "click",
|
|
1925
1924
|
width: "auto"
|
|
1926
1925
|
}, {
|
|
1927
1926
|
default: () => {
|
|
1928
1927
|
let e;
|
|
1929
|
-
return
|
|
1928
|
+
return E("div", { class: "flex flex-col gap-2" }, [E(C, { size: "large" }, er(e = Ce("el.common.tableConfigTitle")) ? e : { default: () => [e] }), E(S, { "max-height": 500 }, { default: () => [E("div", {
|
|
1930
1929
|
class: "flex flex-col divide-y divide-[#f2f6fc]",
|
|
1931
|
-
ref:
|
|
1932
|
-
}, { default: () =>
|
|
1933
|
-
|
|
1930
|
+
ref: be
|
|
1931
|
+
}, { default: () => T.value.map((e) => E("div", { class: "flex w-50 items-center gap-2 py-2" }, [
|
|
1932
|
+
E(y, {
|
|
1934
1933
|
class: "cursor-grab",
|
|
1935
1934
|
disabled: !1,
|
|
1936
|
-
icon:
|
|
1935
|
+
icon: ze,
|
|
1937
1936
|
size: "small",
|
|
1938
1937
|
text: !0,
|
|
1939
1938
|
type: "primary"
|
|
1940
1939
|
}, null),
|
|
1941
|
-
|
|
1942
|
-
|
|
1940
|
+
E(C, { class: "flex-1 text-ellipsis" }, { default: () => [e.label] }),
|
|
1941
|
+
E(ie, {
|
|
1943
1942
|
disabled: !1,
|
|
1944
1943
|
modelValue: e.visible,
|
|
1945
1944
|
"onUpdate:modelValue": (t) => {
|
|
1946
|
-
e.visible = t,
|
|
1947
|
-
|
|
1945
|
+
e.visible = t, ye(() => {
|
|
1946
|
+
pe(T.value);
|
|
1948
1947
|
});
|
|
1949
1948
|
},
|
|
1950
1949
|
size: "small"
|
|
1951
1950
|
}, null)
|
|
1952
1951
|
])) })] })]);
|
|
1953
1952
|
},
|
|
1954
|
-
reference: () =>
|
|
1953
|
+
reference: () => E(y, {
|
|
1955
1954
|
class: "absolute top-0 right-0 z-1000",
|
|
1956
1955
|
disabled: !1,
|
|
1957
|
-
icon:
|
|
1956
|
+
icon: Be,
|
|
1958
1957
|
text: !0
|
|
1959
1958
|
}, null)
|
|
1960
|
-
}),
|
|
1961
|
-
currentPage:
|
|
1959
|
+
}), Pe = () => E(g, {
|
|
1960
|
+
currentPage: m.value.pageIndex,
|
|
1962
1961
|
layout: e.paginationLayout,
|
|
1963
1962
|
onCurrentChange: () => s(),
|
|
1964
1963
|
onSizeChange: () => {
|
|
1965
|
-
let e =
|
|
1964
|
+
let e = b.value;
|
|
1966
1965
|
e.pageIndex = 1, s();
|
|
1967
1966
|
},
|
|
1968
|
-
"onUpdate:currentPage": (e) =>
|
|
1969
|
-
"onUpdate:pageSize": (e) =>
|
|
1970
|
-
pageSize:
|
|
1967
|
+
"onUpdate:currentPage": (e) => b.value.pageIndex = e ?? 0,
|
|
1968
|
+
"onUpdate:pageSize": (e) => b.value.pageSize = e ?? 0,
|
|
1969
|
+
pageSize: m.value.pageSize,
|
|
1971
1970
|
size: "small",
|
|
1972
|
-
total:
|
|
1971
|
+
total: m.value.itemCount
|
|
1973
1972
|
}, null);
|
|
1974
1973
|
return t({
|
|
1975
1974
|
data: o,
|
|
1976
|
-
isFetching:
|
|
1977
|
-
paging:
|
|
1978
|
-
path:
|
|
1979
|
-
query:
|
|
1980
|
-
reset:
|
|
1981
|
-
search:
|
|
1982
|
-
|
|
1975
|
+
isFetching: d,
|
|
1976
|
+
paging: m,
|
|
1977
|
+
path: h,
|
|
1978
|
+
query: b,
|
|
1979
|
+
reset: fe,
|
|
1980
|
+
search: ae,
|
|
1981
|
+
table: Te,
|
|
1982
|
+
url: ee
|
|
1983
1983
|
}), (t, n) => {
|
|
1984
|
-
let r =
|
|
1985
|
-
return
|
|
1986
|
-
|
|
1984
|
+
let r = we("loading");
|
|
1985
|
+
return O(), ue(se, null, [
|
|
1986
|
+
ve.value ? (O(), ce(ke, {
|
|
1987
1987
|
key: 0,
|
|
1988
1988
|
class: "rounded bg-(--el-fill-color-darker) px-2 pt-4"
|
|
1989
|
-
})) :
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1989
|
+
})) : le("", !0),
|
|
1990
|
+
E(A),
|
|
1991
|
+
Ae((O(), ue("div", Qn, [
|
|
1992
|
+
E(Ne),
|
|
1993
|
+
de("div", {
|
|
1994
|
+
ref_key: "container",
|
|
1995
|
+
ref: Ee,
|
|
1996
|
+
class: "flex-1 overflow-hidden"
|
|
1997
|
+
}, [E(Me)], 512),
|
|
1998
|
+
e.pagination ? (O(), ue("div", $n, [E(Pe)])) : le("", !0)
|
|
1999
|
+
])), [[r, k(D) || k(d)]])
|
|
1996
2000
|
], 64);
|
|
1997
2001
|
};
|
|
1998
2002
|
}
|
|
1999
|
-
}), nr = /* @__PURE__ */
|
|
2003
|
+
}), nr = /* @__PURE__ */ D({
|
|
2000
2004
|
__name: "XUploadOss",
|
|
2001
|
-
props: /*@__PURE__*/
|
|
2005
|
+
props: /*@__PURE__*/ _e({
|
|
2002
2006
|
maxSize: { default: () => 50 * 1024 * 1024 },
|
|
2003
2007
|
accept: {},
|
|
2004
2008
|
disabled: { type: Boolean },
|
|
@@ -2014,7 +2018,7 @@ var tr = /* @__PURE__ */ k({
|
|
|
2014
2018
|
}),
|
|
2015
2019
|
emits: ["update:modelValue"],
|
|
2016
2020
|
setup(e) {
|
|
2017
|
-
let t =
|
|
2021
|
+
let t = De(e, "modelValue"), n = me(s), r = w(() => typeof n?.oss == "function" ? n.oss() : n?.oss), i = xe(""), a = (e) => {
|
|
2018
2022
|
let t = `${r.value?.dir}/${Date.now()}/${e.name}`;
|
|
2019
2023
|
return i.value = `${r.value?.host}/${t}`, {
|
|
2020
2024
|
...r.value,
|
|
@@ -2026,17 +2030,17 @@ var tr = /* @__PURE__ */ k({
|
|
|
2026
2030
|
if (!/^\d+$/.test(e)) return !1;
|
|
2027
2031
|
let t = Number(e);
|
|
2028
2032
|
return !Number.isSafeInteger(t) || e.length < 12 || e.length > 16 ? !1 : t >= Date.UTC(2e3, 0, 1) && t <= Date.UTC(2100, 0, 1);
|
|
2029
|
-
}, p =
|
|
2033
|
+
}, p = w(() => [].concat(t.value ?? []).reverse().map((e) => {
|
|
2030
2034
|
let t = e.split("/"), n = t.at(-1), r = n?.split("_").at(0);
|
|
2031
|
-
return (!r || !f(r)) && (r = t.at(-2)), r && !f(r) && (r = `${
|
|
2035
|
+
return (!r || !f(r)) && (r = t.at(-2)), r && !f(r) && (r = `${ae()}`), {
|
|
2032
2036
|
name: n,
|
|
2033
2037
|
uid: Number(r),
|
|
2034
2038
|
url: e
|
|
2035
2039
|
};
|
|
2036
|
-
})), { t: h } =
|
|
2040
|
+
})), { t: h } = oe(me(l, void 0));
|
|
2037
2041
|
return (t, n) => {
|
|
2038
|
-
let i =
|
|
2039
|
-
return
|
|
2042
|
+
let i = Ce("XButton");
|
|
2043
|
+
return O(), ce(k(m), ve({
|
|
2040
2044
|
accept: e.accept,
|
|
2041
2045
|
action: r.value?.host,
|
|
2042
2046
|
data: a,
|
|
@@ -2045,30 +2049,30 @@ var tr = /* @__PURE__ */ k({
|
|
|
2045
2049
|
onRemove: c,
|
|
2046
2050
|
onSuccess: u,
|
|
2047
2051
|
onPreview: d
|
|
2048
|
-
}, { "show-file-list": "" }),
|
|
2049
|
-
default:
|
|
2052
|
+
}, { "show-file-list": "" }), fe({
|
|
2053
|
+
default: A(() => [Se(t.$slots, "default", {}, () => [E(i, {
|
|
2050
2054
|
type: "primary",
|
|
2051
2055
|
size: "small"
|
|
2052
2056
|
}, {
|
|
2053
|
-
default:
|
|
2057
|
+
default: A(() => [T(Te(k(h)("el.uploadOss.placeholder")), 1)]),
|
|
2054
2058
|
_: 1
|
|
2055
2059
|
})])]),
|
|
2056
2060
|
_: 2
|
|
2057
2061
|
}, ["tip" in t.$slots ? {
|
|
2058
2062
|
name: "tip",
|
|
2059
|
-
fn:
|
|
2063
|
+
fn: A(() => [Se(t.$slots, "tip")]),
|
|
2060
2064
|
key: "0"
|
|
2061
2065
|
} : void 0]), 1040);
|
|
2062
2066
|
};
|
|
2063
2067
|
}
|
|
2064
2068
|
}), rr = /* @__PURE__ */ e({
|
|
2065
|
-
XButtonAsync: () =>
|
|
2066
|
-
XButtonConfirm: () =>
|
|
2067
|
-
XCascaderRequest: () =>
|
|
2068
|
-
XFormFlex: () =>
|
|
2069
|
-
XFormRequest: () =>
|
|
2070
|
-
XRequest: () =>
|
|
2071
|
-
XSelectRequest: () =>
|
|
2069
|
+
XButtonAsync: () => je,
|
|
2070
|
+
XButtonConfirm: () => Me,
|
|
2071
|
+
XCascaderRequest: () => Ne,
|
|
2072
|
+
XFormFlex: () => Fe,
|
|
2073
|
+
XFormRequest: () => Ie,
|
|
2074
|
+
XRequest: () => Le,
|
|
2075
|
+
XSelectRequest: () => Re,
|
|
2072
2076
|
XTableConfig: () => qn,
|
|
2073
2077
|
XTableFlex: () => Jn,
|
|
2074
2078
|
XTableRequest: () => Zn,
|
|
@@ -2076,4 +2080,4 @@ var tr = /* @__PURE__ */ k({
|
|
|
2076
2080
|
XUploadOss: () => nr
|
|
2077
2081
|
});
|
|
2078
2082
|
//#endregion
|
|
2079
|
-
export { Jn as a,
|
|
2083
|
+
export { Jn as a, Le as c, Ne as d, Me as f, Zn as i, Ie as l, nr as n, qn as o, je as p, tr as r, Re as s, rr as t, Fe as u };
|