@pungfe/element 0.6.9 → 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-lzClEuJ2.cjs → advance-C3SseCj_.cjs} +1 -1
- package/dist/{advance-DBw0H1he.js → advance-KmjnJagK.js} +231 -219
- package/dist/advance.cjs +1 -1
- package/dist/advance.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/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/package.json.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
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
|
|
3
|
-
import { Fragment as
|
|
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,55 +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
1585
|
onScroll: (e) => a("scroll", e),
|
|
1586
1586
|
showOverflowTooltip: !0
|
|
1587
|
-
}, null), m = () =>
|
|
1587
|
+
}, null), m = () => E(ne, {
|
|
1588
1588
|
"popper-class": "shadow-xl bg-(--el-bg-color)",
|
|
1589
1589
|
trigger: "click",
|
|
1590
1590
|
width: "auto"
|
|
1591
1591
|
}, {
|
|
1592
1592
|
default: () => {
|
|
1593
1593
|
let e;
|
|
1594
|
-
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", {
|
|
1595
1595
|
class: "flex flex-col divide-y divide-[#f2f6fc]",
|
|
1596
1596
|
ref: d
|
|
1597
|
-
}, { default: () => o.value.map((e) =>
|
|
1598
|
-
|
|
1597
|
+
}, { default: () => o.value.map((e) => E("div", { class: "flex w-50 items-center gap-2 py-2" }, [
|
|
1598
|
+
E(y, {
|
|
1599
1599
|
class: "cursor-grab",
|
|
1600
1600
|
disabled: !1,
|
|
1601
|
-
icon:
|
|
1601
|
+
icon: ze,
|
|
1602
1602
|
size: "small",
|
|
1603
1603
|
text: !0,
|
|
1604
1604
|
type: "primary"
|
|
1605
1605
|
}, null),
|
|
1606
|
-
|
|
1607
|
-
|
|
1606
|
+
E(C, { class: "flex-1 text-ellipsis" }, { default: () => [e.label] }),
|
|
1607
|
+
E(ie, {
|
|
1608
1608
|
disabled: !1,
|
|
1609
1609
|
modelValue: e.visible,
|
|
1610
1610
|
"onUpdate:modelValue": (t) => {
|
|
1611
|
-
e.visible = t,
|
|
1611
|
+
e.visible = t, ye(() => {
|
|
1612
1612
|
c(o.value);
|
|
1613
1613
|
});
|
|
1614
1614
|
},
|
|
@@ -1616,19 +1616,19 @@ var qn = /* @__PURE__ */ k({
|
|
|
1616
1616
|
}, null)
|
|
1617
1617
|
])) })] })]);
|
|
1618
1618
|
},
|
|
1619
|
-
reference: () =>
|
|
1619
|
+
reference: () => E(y, {
|
|
1620
1620
|
class: "absolute top-0 right-0 z-1000",
|
|
1621
1621
|
disabled: !1,
|
|
1622
|
-
icon:
|
|
1622
|
+
icon: Be,
|
|
1623
1623
|
text: !0
|
|
1624
1624
|
}, null)
|
|
1625
1625
|
});
|
|
1626
1626
|
return t({ data: e.data }), (e, t) => {
|
|
1627
|
-
let n =
|
|
1628
|
-
return
|
|
1627
|
+
let n = we("loading");
|
|
1628
|
+
return Ae((O(), ue("div", Gn, [E(m), E(p)])), [[n, k(s)]]);
|
|
1629
1629
|
};
|
|
1630
1630
|
}
|
|
1631
|
-
}), Jn = /* @__PURE__ */
|
|
1631
|
+
}), Jn = /* @__PURE__ */ D({
|
|
1632
1632
|
__name: "XTableFlex",
|
|
1633
1633
|
props: {
|
|
1634
1634
|
cellClassName: {},
|
|
@@ -1667,25 +1667,25 @@ var qn = /* @__PURE__ */ k({
|
|
|
1667
1667
|
"selectionChange"
|
|
1668
1668
|
],
|
|
1669
1669
|
setup(e, { expose: t }) {
|
|
1670
|
-
let n = e, r =
|
|
1670
|
+
let n = e, r = Oe("container"), i = v(r), a = Oe("table");
|
|
1671
1671
|
return t({
|
|
1672
1672
|
clearSelection: () => a.value?.clearSelection(),
|
|
1673
|
-
container: r,
|
|
1674
1673
|
getSelectionRows: () => a.value?.getSelectionRows(),
|
|
1674
|
+
scrollBarRef: w(() => a.value?.scrollBarRef),
|
|
1675
1675
|
scrollTo: (e, t) => a.value?.scrollTo(e, t),
|
|
1676
1676
|
setCurrentRow: (e) => a.value?.setCurrentRow(e),
|
|
1677
1677
|
setScrollLeft: (e) => a.value?.setScrollLeft(e),
|
|
1678
1678
|
setScrollTop: (e) => a.value?.setScrollTop(e),
|
|
1679
1679
|
toggleRowSelection: (e, t, n) => a.value?.toggleRowSelection(e, t, n)
|
|
1680
|
-
}), (e, t) => (
|
|
1680
|
+
}), (e, t) => (O(), ue("div", {
|
|
1681
1681
|
ref_key: "container",
|
|
1682
1682
|
ref: r,
|
|
1683
1683
|
class: "flex-1 overflow-hidden"
|
|
1684
|
-
}, [
|
|
1684
|
+
}, [E(k(c), ve({
|
|
1685
1685
|
ref_key: "table",
|
|
1686
1686
|
ref: a
|
|
1687
1687
|
}, { ...n }, {
|
|
1688
|
-
height:
|
|
1688
|
+
height: k(i).height.value,
|
|
1689
1689
|
onScroll: t[0] ||= (t) => e.$emit("scroll", t),
|
|
1690
1690
|
onRowClick: t[1] ||= (t) => e.$emit("rowClick", t),
|
|
1691
1691
|
onRowDblclick: t[2] ||= (t) => e.$emit("rowDblclick", t),
|
|
@@ -1696,7 +1696,7 @@ var qn = /* @__PURE__ */ k({
|
|
|
1696
1696
|
}), Yn = { class: "flex flex-1 flex-col gap-2 overflow-hidden" }, Xn = {
|
|
1697
1697
|
key: 0,
|
|
1698
1698
|
class: "flex justify-end"
|
|
1699
|
-
}, Zn = /* @__PURE__ */
|
|
1699
|
+
}, Zn = /* @__PURE__ */ D({
|
|
1700
1700
|
__name: "XTableRequest",
|
|
1701
1701
|
props: {
|
|
1702
1702
|
cellClassName: { type: [Function, String] },
|
|
@@ -1758,7 +1758,7 @@ var qn = /* @__PURE__ */ k({
|
|
|
1758
1758
|
search: p,
|
|
1759
1759
|
url: u
|
|
1760
1760
|
});
|
|
1761
|
-
let m = () => e.header?.({ query: l.value }), h = () =>
|
|
1761
|
+
let m = () => e.header?.({ query: l.value }), h = () => E(Jn, {
|
|
1762
1762
|
cellClassName: e.cellClassName,
|
|
1763
1763
|
cellStyle: e.cellStyle,
|
|
1764
1764
|
columns: e.columns,
|
|
@@ -1772,7 +1772,7 @@ var qn = /* @__PURE__ */ k({
|
|
|
1772
1772
|
rowClassName: e.rowClassName,
|
|
1773
1773
|
rowStyle: e.rowStyle,
|
|
1774
1774
|
showOverflowTooltip: e.showOverflowTooltip
|
|
1775
|
-
}, null), _ = () =>
|
|
1775
|
+
}, null), _ = () => E(g, {
|
|
1776
1776
|
currentPage: s.value.pageIndex,
|
|
1777
1777
|
layout: e.paginationLayout,
|
|
1778
1778
|
onCurrentChange: () => a(),
|
|
@@ -1787,13 +1787,13 @@ var qn = /* @__PURE__ */ k({
|
|
|
1787
1787
|
total: s.value.itemCount
|
|
1788
1788
|
}, null), v = () => e.footer?.({ query: l.value });
|
|
1789
1789
|
return (t, n) => {
|
|
1790
|
-
let r =
|
|
1791
|
-
return
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
e.pagination ? (
|
|
1795
|
-
|
|
1796
|
-
])), [[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)]]);
|
|
1797
1797
|
};
|
|
1798
1798
|
}
|
|
1799
1799
|
}), Qn = { class: "relative flex flex-1 flex-col gap-2 overflow-hidden" }, $n = {
|
|
@@ -1801,11 +1801,11 @@ var qn = /* @__PURE__ */ k({
|
|
|
1801
1801
|
class: "flex justify-end"
|
|
1802
1802
|
};
|
|
1803
1803
|
function er(e) {
|
|
1804
|
-
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);
|
|
1805
1805
|
}
|
|
1806
1806
|
//#endregion
|
|
1807
1807
|
//#region src/components/advance/XTableRequestConfig.vue
|
|
1808
|
-
var tr = /* @__PURE__ */
|
|
1808
|
+
var tr = /* @__PURE__ */ D({
|
|
1809
1809
|
__name: "XTableRequestConfig",
|
|
1810
1810
|
props: {
|
|
1811
1811
|
config: {},
|
|
@@ -1819,11 +1819,11 @@ var tr = /* @__PURE__ */ k({
|
|
|
1819
1819
|
request: { type: Function },
|
|
1820
1820
|
cellClassName: { type: [Function, String] },
|
|
1821
1821
|
cellStyle: { type: [Function, Object] },
|
|
1822
|
-
rowClassName: { type: [Function, String] },
|
|
1823
|
-
rowStyle: { type: [Function, Object] },
|
|
1824
1822
|
data: {},
|
|
1825
1823
|
height: {},
|
|
1824
|
+
rowClassName: { type: [Function, String] },
|
|
1826
1825
|
rowKey: { type: [Function, String] },
|
|
1826
|
+
rowStyle: { type: [Function, Object] },
|
|
1827
1827
|
showSummary: { type: Boolean },
|
|
1828
1828
|
size: {},
|
|
1829
1829
|
spanMethod: { type: Function },
|
|
@@ -1843,14 +1843,14 @@ var tr = /* @__PURE__ */ k({
|
|
|
1843
1843
|
"selectionChange"
|
|
1844
1844
|
],
|
|
1845
1845
|
setup(e, { expose: t, emit: r }) {
|
|
1846
|
-
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 () => {
|
|
1847
1847
|
a("prepare", {
|
|
1848
|
-
path:
|
|
1849
|
-
query:
|
|
1848
|
+
path: h.value,
|
|
1849
|
+
query: b.value
|
|
1850
1850
|
}), s();
|
|
1851
|
-
}),
|
|
1852
|
-
|
|
1853
|
-
}), { 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) => {
|
|
1854
1854
|
let n = e.config[t.code];
|
|
1855
1855
|
return {
|
|
1856
1856
|
columnKey: t.code,
|
|
@@ -1859,138 +1859,150 @@ var tr = /* @__PURE__ */ k({
|
|
|
1859
1859
|
minWidth: t.width,
|
|
1860
1860
|
prop: n?.prop ?? t.prop
|
|
1861
1861
|
};
|
|
1862
|
-
}),
|
|
1863
|
-
Vn(
|
|
1862
|
+
}), _e = n(he, (e) => e.search), ve = w(() => !!_e.value.length), be = xe();
|
|
1863
|
+
Vn(be, T, {
|
|
1864
1864
|
animation: 150,
|
|
1865
1865
|
ghostClass: "bg-(--el-color-primary-light-7)",
|
|
1866
1866
|
handle: ".cursor-grab",
|
|
1867
1867
|
onUpdate: (e) => {
|
|
1868
|
-
Wn(
|
|
1869
|
-
|
|
1868
|
+
Wn(T.value, e.oldIndex, e.newIndex, e), ye(() => {
|
|
1869
|
+
pe(T.value);
|
|
1870
1870
|
});
|
|
1871
1871
|
}
|
|
1872
1872
|
});
|
|
1873
|
-
let
|
|
1874
|
-
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) => {
|
|
1875
1875
|
let r = e.config[n.code];
|
|
1876
|
-
return
|
|
1877
|
-
content: () => r?.search?.({ query: t }) ??
|
|
1876
|
+
return E(_, {
|
|
1877
|
+
content: () => r?.search?.({ query: t }) ?? E(p, {
|
|
1878
1878
|
disabled: !0,
|
|
1879
1879
|
modelValue: n.code
|
|
1880
1880
|
}, null),
|
|
1881
1881
|
label: r?.label ?? n.label
|
|
1882
1882
|
}, null);
|
|
1883
|
-
}),
|
|
1883
|
+
}), E(x, null, {
|
|
1884
1884
|
default: () => {
|
|
1885
1885
|
let e, t;
|
|
1886
|
-
return
|
|
1887
|
-
let e =
|
|
1888
|
-
e.pageIndex = void 0, e.pageSize = void 0,
|
|
1889
|
-
} }, 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] })] });
|
|
1890
1890
|
},
|
|
1891
|
-
label: () =>
|
|
1891
|
+
label: () => E("div", { style: "height: 22px" }, null)
|
|
1892
1892
|
})]]),
|
|
1893
|
-
data:
|
|
1894
|
-
disabled:
|
|
1895
|
-
labelPosition:
|
|
1896
|
-
}, 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?.({
|
|
1897
1897
|
data: o.value,
|
|
1898
|
-
isFetching:
|
|
1899
|
-
paging:
|
|
1900
|
-
path:
|
|
1901
|
-
query:
|
|
1902
|
-
}),
|
|
1898
|
+
isFetching: d.value,
|
|
1899
|
+
paging: m.value,
|
|
1900
|
+
path: h.value,
|
|
1901
|
+
query: b.value
|
|
1902
|
+
}), Me = () => E(c, {
|
|
1903
1903
|
border: !0,
|
|
1904
|
-
columns:
|
|
1904
|
+
columns: ge.value,
|
|
1905
1905
|
data: o.value,
|
|
1906
|
+
height: De.height.value,
|
|
1906
1907
|
onHeaderDragend: (e, t, n) => {
|
|
1907
|
-
let r =
|
|
1908
|
-
r && (r.width = e,
|
|
1909
|
-
|
|
1908
|
+
let r = T.value.find((e) => e.code === n.columnKey);
|
|
1909
|
+
r && (r.width = e, ye(() => {
|
|
1910
|
+
pe(T.value);
|
|
1910
1911
|
}));
|
|
1911
1912
|
},
|
|
1913
|
+
onRowClick: (e) => a("rowClick", e),
|
|
1914
|
+
onRowDblclick: (e) => a("rowDblclick", e),
|
|
1912
1915
|
onScroll: (e) => a("scroll", e),
|
|
1916
|
+
onSelectionChange: (e) => a("selectionChange", e),
|
|
1917
|
+
ref: Te,
|
|
1918
|
+
rowClassName: e.rowClassName,
|
|
1919
|
+
rowStyle: e.rowStyle,
|
|
1913
1920
|
showOverflowTooltip: !0
|
|
1914
|
-
}, null),
|
|
1921
|
+
}, null), Ne = () => E(ne, {
|
|
1915
1922
|
"popper-class": "shadow-xl bg-(--el-bg-color)",
|
|
1916
1923
|
trigger: "click",
|
|
1917
1924
|
width: "auto"
|
|
1918
1925
|
}, {
|
|
1919
1926
|
default: () => {
|
|
1920
1927
|
let e;
|
|
1921
|
-
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", {
|
|
1922
1929
|
class: "flex flex-col divide-y divide-[#f2f6fc]",
|
|
1923
|
-
ref:
|
|
1924
|
-
}, { default: () =>
|
|
1925
|
-
|
|
1930
|
+
ref: be
|
|
1931
|
+
}, { default: () => T.value.map((e) => E("div", { class: "flex w-50 items-center gap-2 py-2" }, [
|
|
1932
|
+
E(y, {
|
|
1926
1933
|
class: "cursor-grab",
|
|
1927
1934
|
disabled: !1,
|
|
1928
|
-
icon:
|
|
1935
|
+
icon: ze,
|
|
1929
1936
|
size: "small",
|
|
1930
1937
|
text: !0,
|
|
1931
1938
|
type: "primary"
|
|
1932
1939
|
}, null),
|
|
1933
|
-
|
|
1934
|
-
|
|
1940
|
+
E(C, { class: "flex-1 text-ellipsis" }, { default: () => [e.label] }),
|
|
1941
|
+
E(ie, {
|
|
1935
1942
|
disabled: !1,
|
|
1936
1943
|
modelValue: e.visible,
|
|
1937
1944
|
"onUpdate:modelValue": (t) => {
|
|
1938
|
-
e.visible = t,
|
|
1939
|
-
|
|
1945
|
+
e.visible = t, ye(() => {
|
|
1946
|
+
pe(T.value);
|
|
1940
1947
|
});
|
|
1941
1948
|
},
|
|
1942
1949
|
size: "small"
|
|
1943
1950
|
}, null)
|
|
1944
1951
|
])) })] })]);
|
|
1945
1952
|
},
|
|
1946
|
-
reference: () =>
|
|
1953
|
+
reference: () => E(y, {
|
|
1947
1954
|
class: "absolute top-0 right-0 z-1000",
|
|
1948
1955
|
disabled: !1,
|
|
1949
|
-
icon:
|
|
1956
|
+
icon: Be,
|
|
1950
1957
|
text: !0
|
|
1951
1958
|
}, null)
|
|
1952
|
-
}),
|
|
1953
|
-
currentPage:
|
|
1959
|
+
}), Pe = () => E(g, {
|
|
1960
|
+
currentPage: m.value.pageIndex,
|
|
1954
1961
|
layout: e.paginationLayout,
|
|
1955
1962
|
onCurrentChange: () => s(),
|
|
1956
1963
|
onSizeChange: () => {
|
|
1957
|
-
let e =
|
|
1964
|
+
let e = b.value;
|
|
1958
1965
|
e.pageIndex = 1, s();
|
|
1959
1966
|
},
|
|
1960
|
-
"onUpdate:currentPage": (e) =>
|
|
1961
|
-
"onUpdate:pageSize": (e) =>
|
|
1962
|
-
pageSize:
|
|
1967
|
+
"onUpdate:currentPage": (e) => b.value.pageIndex = e ?? 0,
|
|
1968
|
+
"onUpdate:pageSize": (e) => b.value.pageSize = e ?? 0,
|
|
1969
|
+
pageSize: m.value.pageSize,
|
|
1963
1970
|
size: "small",
|
|
1964
|
-
total:
|
|
1971
|
+
total: m.value.itemCount
|
|
1965
1972
|
}, null);
|
|
1966
1973
|
return t({
|
|
1967
1974
|
data: o,
|
|
1968
|
-
isFetching:
|
|
1969
|
-
paging:
|
|
1970
|
-
path:
|
|
1971
|
-
query:
|
|
1972
|
-
reset:
|
|
1973
|
-
search:
|
|
1974
|
-
|
|
1975
|
+
isFetching: d,
|
|
1976
|
+
paging: m,
|
|
1977
|
+
path: h,
|
|
1978
|
+
query: b,
|
|
1979
|
+
reset: fe,
|
|
1980
|
+
search: ae,
|
|
1981
|
+
table: Te,
|
|
1982
|
+
url: ee
|
|
1975
1983
|
}), (t, n) => {
|
|
1976
|
-
let r =
|
|
1977
|
-
return
|
|
1978
|
-
|
|
1984
|
+
let r = we("loading");
|
|
1985
|
+
return O(), ue(se, null, [
|
|
1986
|
+
ve.value ? (O(), ce(ke, {
|
|
1979
1987
|
key: 0,
|
|
1980
1988
|
class: "rounded bg-(--el-fill-color-darker) px-2 pt-4"
|
|
1981
|
-
})) :
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
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)]])
|
|
1988
2000
|
], 64);
|
|
1989
2001
|
};
|
|
1990
2002
|
}
|
|
1991
|
-
}), nr = /* @__PURE__ */
|
|
2003
|
+
}), nr = /* @__PURE__ */ D({
|
|
1992
2004
|
__name: "XUploadOss",
|
|
1993
|
-
props: /*@__PURE__*/
|
|
2005
|
+
props: /*@__PURE__*/ _e({
|
|
1994
2006
|
maxSize: { default: () => 50 * 1024 * 1024 },
|
|
1995
2007
|
accept: {},
|
|
1996
2008
|
disabled: { type: Boolean },
|
|
@@ -2006,7 +2018,7 @@ var tr = /* @__PURE__ */ k({
|
|
|
2006
2018
|
}),
|
|
2007
2019
|
emits: ["update:modelValue"],
|
|
2008
2020
|
setup(e) {
|
|
2009
|
-
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) => {
|
|
2010
2022
|
let t = `${r.value?.dir}/${Date.now()}/${e.name}`;
|
|
2011
2023
|
return i.value = `${r.value?.host}/${t}`, {
|
|
2012
2024
|
...r.value,
|
|
@@ -2018,17 +2030,17 @@ var tr = /* @__PURE__ */ k({
|
|
|
2018
2030
|
if (!/^\d+$/.test(e)) return !1;
|
|
2019
2031
|
let t = Number(e);
|
|
2020
2032
|
return !Number.isSafeInteger(t) || e.length < 12 || e.length > 16 ? !1 : t >= Date.UTC(2e3, 0, 1) && t <= Date.UTC(2100, 0, 1);
|
|
2021
|
-
}, p =
|
|
2033
|
+
}, p = w(() => [].concat(t.value ?? []).reverse().map((e) => {
|
|
2022
2034
|
let t = e.split("/"), n = t.at(-1), r = n?.split("_").at(0);
|
|
2023
|
-
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()}`), {
|
|
2024
2036
|
name: n,
|
|
2025
2037
|
uid: Number(r),
|
|
2026
2038
|
url: e
|
|
2027
2039
|
};
|
|
2028
|
-
})), { t: h } =
|
|
2040
|
+
})), { t: h } = oe(me(l, void 0));
|
|
2029
2041
|
return (t, n) => {
|
|
2030
|
-
let i =
|
|
2031
|
-
return
|
|
2042
|
+
let i = Ce("XButton");
|
|
2043
|
+
return O(), ce(k(m), ve({
|
|
2032
2044
|
accept: e.accept,
|
|
2033
2045
|
action: r.value?.host,
|
|
2034
2046
|
data: a,
|
|
@@ -2037,30 +2049,30 @@ var tr = /* @__PURE__ */ k({
|
|
|
2037
2049
|
onRemove: c,
|
|
2038
2050
|
onSuccess: u,
|
|
2039
2051
|
onPreview: d
|
|
2040
|
-
}, { "show-file-list": "" }),
|
|
2041
|
-
default:
|
|
2052
|
+
}, { "show-file-list": "" }), fe({
|
|
2053
|
+
default: A(() => [Se(t.$slots, "default", {}, () => [E(i, {
|
|
2042
2054
|
type: "primary",
|
|
2043
2055
|
size: "small"
|
|
2044
2056
|
}, {
|
|
2045
|
-
default:
|
|
2057
|
+
default: A(() => [T(Te(k(h)("el.uploadOss.placeholder")), 1)]),
|
|
2046
2058
|
_: 1
|
|
2047
2059
|
})])]),
|
|
2048
2060
|
_: 2
|
|
2049
2061
|
}, ["tip" in t.$slots ? {
|
|
2050
2062
|
name: "tip",
|
|
2051
|
-
fn:
|
|
2063
|
+
fn: A(() => [Se(t.$slots, "tip")]),
|
|
2052
2064
|
key: "0"
|
|
2053
2065
|
} : void 0]), 1040);
|
|
2054
2066
|
};
|
|
2055
2067
|
}
|
|
2056
2068
|
}), rr = /* @__PURE__ */ e({
|
|
2057
|
-
XButtonAsync: () =>
|
|
2058
|
-
XButtonConfirm: () =>
|
|
2059
|
-
XCascaderRequest: () =>
|
|
2060
|
-
XFormFlex: () =>
|
|
2061
|
-
XFormRequest: () =>
|
|
2062
|
-
XRequest: () =>
|
|
2063
|
-
XSelectRequest: () =>
|
|
2069
|
+
XButtonAsync: () => je,
|
|
2070
|
+
XButtonConfirm: () => Me,
|
|
2071
|
+
XCascaderRequest: () => Ne,
|
|
2072
|
+
XFormFlex: () => Fe,
|
|
2073
|
+
XFormRequest: () => Ie,
|
|
2074
|
+
XRequest: () => Le,
|
|
2075
|
+
XSelectRequest: () => Re,
|
|
2064
2076
|
XTableConfig: () => qn,
|
|
2065
2077
|
XTableFlex: () => Jn,
|
|
2066
2078
|
XTableRequest: () => Zn,
|
|
@@ -2068,4 +2080,4 @@ var tr = /* @__PURE__ */ k({
|
|
|
2068
2080
|
XUploadOss: () => nr
|
|
2069
2081
|
});
|
|
2070
2082
|
//#endregion
|
|
2071
|
-
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 };
|