vue-2024-ui 0.0.35 → 0.0.37
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/index.es.js +222 -213
- package/dist/src/components/db.d.ts +43 -0
- package/dist/src/components/index.d.ts +83 -0
- package/dist/style.css +1 -1
- package/package.json +11 -15
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Je, { ElMessage as be, ElMessageBox as
|
|
2
|
-
import { mergeModels as we, useModel as _e, ref as me, onMounted as Ve, resolveComponent as F, openBlock as _, createElementBlock as te, unref as o, createBlock as I, mergeProps as V, withCtx as c, renderSlot as g, Fragment as pe, renderList as R, createTextVNode as ue, toDisplayString as K, createSlots as Z, normalizeProps as Ce, createVNode as A, createElementVNode as j, useSlots as et, inject as je, useAttrs as tt, watch as lt, computed as xe, normalizeStyle as Re, withModifiers as ot, createCommentVNode as de, guardReactiveProps as Te, Transition as rt, withDirectives as Oe, vShow as Ae, onBeforeUnmount as at, normalizeClass as
|
|
1
|
+
import Je, { ElMessage as be, ElMessageBox as He, ElDialog as Ze, ElDrawer as Ke } from "element-plus";
|
|
2
|
+
import { mergeModels as we, useModel as _e, ref as me, onMounted as Ve, resolveComponent as F, openBlock as _, createElementBlock as te, unref as o, createBlock as I, mergeProps as V, withCtx as c, renderSlot as g, Fragment as pe, renderList as R, createTextVNode as ue, toDisplayString as K, createSlots as Z, normalizeProps as Ce, createVNode as A, createElementVNode as j, useSlots as et, inject as je, useAttrs as tt, watch as lt, computed as xe, normalizeStyle as Re, withModifiers as ot, createCommentVNode as de, guardReactiveProps as Te, Transition as rt, withDirectives as Oe, vShow as Ae, onBeforeUnmount as at, normalizeClass as We, watchEffect as nt, h as Se, createApp as ut } from "vue";
|
|
3
3
|
import { FullScreen as st, Remove as it } from "@element-plus/icons-vue";
|
|
4
|
-
import
|
|
4
|
+
import Ne from "sortablejs";
|
|
5
5
|
import { Dexie as dt } from "dexie";
|
|
6
6
|
var ct = {
|
|
7
7
|
name: "zh-cn",
|
|
@@ -189,7 +189,7 @@ var Ye = { exports: {} };
|
|
|
189
189
|
(function(l, e) {
|
|
190
190
|
s.exports = e();
|
|
191
191
|
})(ft, function() {
|
|
192
|
-
var l = 1e3, e = 6e4, a = 36e5, i = "millisecond", m = "second", T = "minute", E = "hour", h = "day", p = "week", $ = "month", ee = "quarter", w = "year", d = "date", G = "Invalid Date", ce = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, f = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,
|
|
192
|
+
var l = 1e3, e = 6e4, a = 36e5, i = "millisecond", m = "second", T = "minute", E = "hour", h = "day", p = "week", $ = "month", ee = "quarter", w = "year", d = "date", G = "Invalid Date", ce = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, f = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, S = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(D) {
|
|
193
193
|
var y = ["th", "st", "nd", "rd"], v = D % 100;
|
|
194
194
|
return "[" + D + (y[(v - 20) % 10] || y[v] || y[0]) + "]";
|
|
195
195
|
} }, ie = function(D, y, v) {
|
|
@@ -208,8 +208,8 @@ var Ye = { exports: {} };
|
|
|
208
208
|
return { M: $, y: w, w: p, d: h, D: d, h: E, m: T, s: m, ms: i, Q: ee }[D] || String(D || "").toLowerCase().replace(/s$/, "");
|
|
209
209
|
}, u: function(D) {
|
|
210
210
|
return D === void 0;
|
|
211
|
-
} }, se = "en",
|
|
212
|
-
|
|
211
|
+
} }, se = "en", N = {};
|
|
212
|
+
N[se] = S;
|
|
213
213
|
var B = "$isDayjsObject", re = function(D) {
|
|
214
214
|
return D instanceof ye || !(!D || !D[B]);
|
|
215
215
|
}, fe = function D(y, v, C) {
|
|
@@ -217,12 +217,12 @@ var Ye = { exports: {} };
|
|
|
217
217
|
if (!y) return se;
|
|
218
218
|
if (typeof y == "string") {
|
|
219
219
|
var M = y.toLowerCase();
|
|
220
|
-
|
|
220
|
+
N[M] && (b = M), v && (N[M] = v, b = M);
|
|
221
221
|
var O = y.split("-");
|
|
222
222
|
if (!b && O.length > 1) return D(O[0]);
|
|
223
223
|
} else {
|
|
224
224
|
var P = y.name;
|
|
225
|
-
|
|
225
|
+
N[P] = y, b = P;
|
|
226
226
|
}
|
|
227
227
|
return !C && b && (se = b), b || !C && se;
|
|
228
228
|
}, L = function(D, y) {
|
|
@@ -274,20 +274,20 @@ var Ye = { exports: {} };
|
|
|
274
274
|
}, y.valueOf = function() {
|
|
275
275
|
return this.$d.getTime();
|
|
276
276
|
}, y.startOf = function(v, C) {
|
|
277
|
-
var b = this, M = !!U.u(C) || C, O = U.p(v), P = function(
|
|
278
|
-
var he = U.w(b.$u ? Date.UTC(b.$y, ae,
|
|
277
|
+
var b = this, M = !!U.u(C) || C, O = U.p(v), P = function(Q, ae) {
|
|
278
|
+
var he = U.w(b.$u ? Date.UTC(b.$y, ae, Q) : new Date(b.$y, ae, Q), b);
|
|
279
279
|
return M ? he : he.endOf(h);
|
|
280
|
-
}, Y = function(
|
|
281
|
-
return U.w(b.toDate()[
|
|
282
|
-
},
|
|
280
|
+
}, Y = function(Q, ae) {
|
|
281
|
+
return U.w(b.toDate()[Q].apply(b.toDate("s"), (M ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ae)), b);
|
|
282
|
+
}, X = this.$W, r = this.$M, t = this.$D, n = "set" + (this.$u ? "UTC" : "");
|
|
283
283
|
switch (O) {
|
|
284
284
|
case w:
|
|
285
285
|
return M ? P(1, 0) : P(31, 11);
|
|
286
286
|
case $:
|
|
287
287
|
return M ? P(1, r) : P(0, r + 1);
|
|
288
288
|
case p:
|
|
289
|
-
var k = this.$locale().weekStart || 0,
|
|
290
|
-
return P(M ? t -
|
|
289
|
+
var k = this.$locale().weekStart || 0, H = (X < k ? X + 7 : X) - k;
|
|
290
|
+
return P(M ? t - H : t + (6 - H), r);
|
|
291
291
|
case h:
|
|
292
292
|
case d:
|
|
293
293
|
return Y(n + "Hours", 0);
|
|
@@ -305,8 +305,8 @@ var Ye = { exports: {} };
|
|
|
305
305
|
}, y.$set = function(v, C) {
|
|
306
306
|
var b, M = U.p(v), O = "set" + (this.$u ? "UTC" : ""), P = (b = {}, b[h] = O + "Date", b[d] = O + "Date", b[$] = O + "Month", b[w] = O + "FullYear", b[E] = O + "Hours", b[T] = O + "Minutes", b[m] = O + "Seconds", b[i] = O + "Milliseconds", b)[M], Y = M === h ? this.$D + (C - this.$W) : C;
|
|
307
307
|
if (M === $ || M === w) {
|
|
308
|
-
var
|
|
309
|
-
|
|
308
|
+
var X = this.clone().set(d, 1);
|
|
309
|
+
X.$d[P](Y), X.init(), this.$d = X.set(d, Math.min(this.$D, X.daysInMonth())).$d;
|
|
310
310
|
} else P && this.$d[P](Y);
|
|
311
311
|
return this.init(), this;
|
|
312
312
|
}, y.set = function(v, C) {
|
|
@@ -324,20 +324,20 @@ var Ye = { exports: {} };
|
|
|
324
324
|
if (O === w) return this.set(w, this.$y + v);
|
|
325
325
|
if (O === h) return P(1);
|
|
326
326
|
if (O === p) return P(7);
|
|
327
|
-
var Y = (b = {}, b[T] = e, b[E] = a, b[m] = l, b)[O] || 1,
|
|
328
|
-
return U.w(
|
|
327
|
+
var Y = (b = {}, b[T] = e, b[E] = a, b[m] = l, b)[O] || 1, X = this.$d.getTime() + v * Y;
|
|
328
|
+
return U.w(X, this);
|
|
329
329
|
}, y.subtract = function(v, C) {
|
|
330
330
|
return this.add(-1 * v, C);
|
|
331
331
|
}, y.format = function(v) {
|
|
332
332
|
var C = this, b = this.$locale();
|
|
333
333
|
if (!this.isValid()) return b.invalidDate || G;
|
|
334
|
-
var M = v || "YYYY-MM-DDTHH:mm:ssZ", O = U.z(this), P = this.$H, Y = this.$m,
|
|
335
|
-
return ae && (ae[he] || ae(C, M)) || $e[he].slice(0,
|
|
336
|
-
},
|
|
334
|
+
var M = v || "YYYY-MM-DDTHH:mm:ssZ", O = U.z(this), P = this.$H, Y = this.$m, X = this.$M, r = b.weekdays, t = b.months, n = b.meridiem, k = function(ae, he, $e, q) {
|
|
335
|
+
return ae && (ae[he] || ae(C, M)) || $e[he].slice(0, q);
|
|
336
|
+
}, H = function(ae) {
|
|
337
337
|
return U.s(P % 12 || 12, ae, "0");
|
|
338
|
-
},
|
|
339
|
-
var
|
|
340
|
-
return $e ?
|
|
338
|
+
}, Q = n || function(ae, he, $e) {
|
|
339
|
+
var q = ae < 12 ? "AM" : "PM";
|
|
340
|
+
return $e ? q.toLowerCase() : q;
|
|
341
341
|
};
|
|
342
342
|
return M.replace(f, function(ae, he) {
|
|
343
343
|
return he || function($e) {
|
|
@@ -347,13 +347,13 @@ var Ye = { exports: {} };
|
|
|
347
347
|
case "YYYY":
|
|
348
348
|
return U.s(C.$y, 4, "0");
|
|
349
349
|
case "M":
|
|
350
|
-
return
|
|
350
|
+
return X + 1;
|
|
351
351
|
case "MM":
|
|
352
|
-
return U.s(
|
|
352
|
+
return U.s(X + 1, 2, "0");
|
|
353
353
|
case "MMM":
|
|
354
|
-
return k(b.monthsShort,
|
|
354
|
+
return k(b.monthsShort, X, t, 3);
|
|
355
355
|
case "MMMM":
|
|
356
|
-
return k(t,
|
|
356
|
+
return k(t, X);
|
|
357
357
|
case "D":
|
|
358
358
|
return C.$D;
|
|
359
359
|
case "DD":
|
|
@@ -371,13 +371,13 @@ var Ye = { exports: {} };
|
|
|
371
371
|
case "HH":
|
|
372
372
|
return U.s(P, 2, "0");
|
|
373
373
|
case "h":
|
|
374
|
-
return
|
|
374
|
+
return H(1);
|
|
375
375
|
case "hh":
|
|
376
|
-
return
|
|
376
|
+
return H(2);
|
|
377
377
|
case "a":
|
|
378
|
-
return
|
|
378
|
+
return Q(P, Y, !0);
|
|
379
379
|
case "A":
|
|
380
|
-
return
|
|
380
|
+
return Q(P, Y, !1);
|
|
381
381
|
case "m":
|
|
382
382
|
return String(Y);
|
|
383
383
|
case "mm":
|
|
@@ -397,7 +397,7 @@ var Ye = { exports: {} };
|
|
|
397
397
|
}, y.utcOffset = function() {
|
|
398
398
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
399
399
|
}, y.diff = function(v, C, b) {
|
|
400
|
-
var M, O = this, P = U.p(C), Y = L(v),
|
|
400
|
+
var M, O = this, P = U.p(C), Y = L(v), X = (Y.utcOffset() - this.utcOffset()) * e, r = this - Y, t = function() {
|
|
401
401
|
return U.m(O, Y);
|
|
402
402
|
};
|
|
403
403
|
switch (P) {
|
|
@@ -411,10 +411,10 @@ var Ye = { exports: {} };
|
|
|
411
411
|
M = t() / 3;
|
|
412
412
|
break;
|
|
413
413
|
case p:
|
|
414
|
-
M = (r -
|
|
414
|
+
M = (r - X) / 6048e5;
|
|
415
415
|
break;
|
|
416
416
|
case h:
|
|
417
|
-
M = (r -
|
|
417
|
+
M = (r - X) / 864e5;
|
|
418
418
|
break;
|
|
419
419
|
case E:
|
|
420
420
|
M = r / a;
|
|
@@ -432,7 +432,7 @@ var Ye = { exports: {} };
|
|
|
432
432
|
}, y.daysInMonth = function() {
|
|
433
433
|
return this.endOf($).$D;
|
|
434
434
|
}, y.$locale = function() {
|
|
435
|
-
return
|
|
435
|
+
return N[this.$L];
|
|
436
436
|
}, y.locale = function(v, C) {
|
|
437
437
|
if (!v) return this.$L;
|
|
438
438
|
var b = this.clone(), M = fe(v, C, !0);
|
|
@@ -457,7 +457,7 @@ var Ye = { exports: {} };
|
|
|
457
457
|
return D.$i || (D(y, ye, L), D.$i = !0), L;
|
|
458
458
|
}, L.locale = fe, L.isDayjs = re, L.unix = function(D) {
|
|
459
459
|
return L(1e3 * D);
|
|
460
|
-
}, L.en =
|
|
460
|
+
}, L.en = N[se], L.Ls = N, L.p = {}, L;
|
|
461
461
|
});
|
|
462
462
|
})(Ye);
|
|
463
463
|
var pt = Ye.exports;
|
|
@@ -494,8 +494,8 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
494
494
|
return Ve(async () => {
|
|
495
495
|
e && e["remote-method"] && (h["remote-method"] = p);
|
|
496
496
|
const w = (G, ce = "options", f = m[a]) => {
|
|
497
|
-
typeof e.getDicts == "function" && ee(ce).catch((
|
|
498
|
-
console.error(`Failed to load ${ce} for ${G}:`,
|
|
497
|
+
typeof e.getDicts == "function" && ee(ce).catch((S) => {
|
|
498
|
+
console.error(`Failed to load ${ce} for ${G}:`, S);
|
|
499
499
|
});
|
|
500
500
|
};
|
|
501
501
|
["radio", "radio-button", "checkbox-group", "checkbox-group-button", "select", "cascader"].includes(i) && w(i), i === "tree-select" && await (async () => {
|
|
@@ -506,8 +506,8 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
506
506
|
}
|
|
507
507
|
})();
|
|
508
508
|
}), (w, d) => {
|
|
509
|
-
var
|
|
510
|
-
const G = F("el-radio"), ce = F("el-radio-group"), f = F("el-radio-button"),
|
|
509
|
+
var X, r;
|
|
510
|
+
const G = F("el-radio"), ce = F("el-radio-group"), f = F("el-radio-button"), S = F("el-checkbox"), ie = F("el-checkbox-group"), x = F("el-checkbox-button"), se = F("el-option"), N = F("el-option-group"), B = F("el-select"), re = F("el-tree-select"), fe = F("el-time-picker"), L = F("el-time-select"), U = F("el-date-picker"), ye = F("el-color-picker"), le = F("el-rate"), D = F("el-slider"), y = F("el-switch"), v = F("el-transfer"), C = F("el-cascader"), b = F("el-button"), M = F("el-upload"), O = F("el-autocomplete"), P = F("el-input-number"), Y = F("el-input");
|
|
511
511
|
return _(), te("div", vt, [
|
|
512
512
|
o(i) == o(J).RADIO ? (_(), I(ce, V({
|
|
513
513
|
key: 0,
|
|
@@ -541,7 +541,7 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
541
541
|
])
|
|
542
542
|
]),
|
|
543
543
|
_: 3
|
|
544
|
-
}, 16, ["modelValue"])) : o(i) == o(J).CHECKBOX ? (_(), I(
|
|
544
|
+
}, 16, ["modelValue"])) : o(i) == o(J).CHECKBOX ? (_(), I(S, V({
|
|
545
545
|
key: 2,
|
|
546
546
|
modelValue: u.value,
|
|
547
547
|
"onUpdate:modelValue": d[2] || (d[2] = (t) => u.value = t)
|
|
@@ -559,7 +559,7 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
559
559
|
}, o(e)), {
|
|
560
560
|
default: c(() => [
|
|
561
561
|
g(w.$slots, `${l.t}-${o(a)}`, { data: o(e) }, () => [
|
|
562
|
-
(_(!0), te(pe, null, R(o(m)[o(a)].options, (t) => (_(), I(
|
|
562
|
+
(_(!0), te(pe, null, R(o(m)[o(a)].options, (t) => (_(), I(S, V({ ref_for: !0 }, t), {
|
|
563
563
|
default: c(() => [
|
|
564
564
|
g(w.$slots, `${l.t}-${o(a)}-options`, { option: t }, () => [
|
|
565
565
|
ue(K(t.label), 1)
|
|
@@ -598,17 +598,17 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
598
598
|
}, () => {
|
|
599
599
|
var t, n;
|
|
600
600
|
return [
|
|
601
|
-
(n = (t = o(m)[o(a)]) == null ? void 0 : t.options) != null && n.some((k) => k.options) ? (_(!0), te(pe, { key: 0 }, R(o(m)[o(a)].options, (k) => (_(), I(
|
|
601
|
+
(n = (t = o(m)[o(a)]) == null ? void 0 : t.options) != null && n.some((k) => k.options) ? (_(!0), te(pe, { key: 0 }, R(o(m)[o(a)].options, (k) => (_(), I(N, {
|
|
602
602
|
key: k.label,
|
|
603
603
|
label: k.label
|
|
604
604
|
}, {
|
|
605
605
|
default: c(() => [
|
|
606
|
-
(_(!0), te(pe, null, R(k.options, (
|
|
607
|
-
key:
|
|
608
|
-
onClick: (
|
|
606
|
+
(_(!0), te(pe, null, R(k.options, (H) => (_(), I(se, V({ ref_for: !0 }, H, {
|
|
607
|
+
key: H.value,
|
|
608
|
+
onClick: (Q) => h.change && h.change(H)
|
|
609
609
|
}), {
|
|
610
610
|
default: c(() => [
|
|
611
|
-
g(w.$slots, `${l.t}-${o(a)}-options`, { option:
|
|
611
|
+
g(w.$slots, `${l.t}-${o(a)}-options`, { option: H })
|
|
612
612
|
]),
|
|
613
613
|
_: 2
|
|
614
614
|
}, 1040, ["onClick"]))), 128))
|
|
@@ -616,7 +616,7 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
616
616
|
_: 2
|
|
617
617
|
}, 1032, ["label"]))), 128)) : (_(!0), te(pe, { key: 1 }, R(o(m)[o(a)].options, (k) => (_(), I(se, V({ ref_for: !0 }, k, {
|
|
618
618
|
key: k.value,
|
|
619
|
-
onClick: (
|
|
619
|
+
onClick: (H) => h.change && h.change(k)
|
|
620
620
|
}), {
|
|
621
621
|
default: c(() => [
|
|
622
622
|
g(w.$slots, `${l.t}-${o(a)}-options`, { option: k })
|
|
@@ -784,7 +784,7 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
784
784
|
"onUpdate:modelValue": d[19] || (d[19] = (t) => u.value = t),
|
|
785
785
|
placeholder: o(m)[o(a)].label,
|
|
786
786
|
type: o(J).NUMBER,
|
|
787
|
-
maxlength: ((
|
|
787
|
+
maxlength: ((X = o(e)) == null ? void 0 : X.max) || 25
|
|
788
788
|
}, { ...o(e), type: o(i) }), Z({ _: 2 }, [
|
|
789
789
|
u.value ? {
|
|
790
790
|
name: "suffix",
|
|
@@ -821,7 +821,7 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
821
821
|
]);
|
|
822
822
|
};
|
|
823
823
|
}
|
|
824
|
-
}),
|
|
824
|
+
}), qe = /* @__PURE__ */ Object.assign({
|
|
825
825
|
name: "g-form",
|
|
826
826
|
inheritAttrs: !1
|
|
827
827
|
}, {
|
|
@@ -863,9 +863,9 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
863
863
|
label: "提交",
|
|
864
864
|
plain: !0,
|
|
865
865
|
hidden: !1,
|
|
866
|
-
click: async (f,
|
|
866
|
+
click: async (f, S) => {
|
|
867
867
|
a.value && await a.value.validate((ie, x) => {
|
|
868
|
-
ie ? e("submit", f,
|
|
868
|
+
ie ? e("submit", f, S) : console.log("表单验证不通过!", x);
|
|
869
869
|
});
|
|
870
870
|
}
|
|
871
871
|
},
|
|
@@ -878,8 +878,8 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
878
878
|
click: () => {
|
|
879
879
|
if (!a.value) return;
|
|
880
880
|
let f = !0;
|
|
881
|
-
e("reset", (
|
|
882
|
-
f =
|
|
881
|
+
e("reset", (S) => {
|
|
882
|
+
f = S;
|
|
883
883
|
}), f && a.value.resetFields();
|
|
884
884
|
}
|
|
885
885
|
},
|
|
@@ -912,9 +912,9 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
912
912
|
l.value.form.cols
|
|
913
913
|
);
|
|
914
914
|
const h = (f) => {
|
|
915
|
-
let
|
|
915
|
+
let S = [];
|
|
916
916
|
if (f.rules)
|
|
917
|
-
|
|
917
|
+
S = f.rules;
|
|
918
918
|
else {
|
|
919
919
|
const x = { ...{
|
|
920
920
|
required: void 0,
|
|
@@ -925,36 +925,36 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
925
925
|
pattern: void 0,
|
|
926
926
|
validate: void 0
|
|
927
927
|
}, ...f };
|
|
928
|
-
x.required &&
|
|
929
|
-
validator: (se,
|
|
930
|
-
|
|
928
|
+
x.required && S.push({ required: !0, message: `${x.label}不能为空!`, trigger: "blur" }), x.max && x.min && S.push({
|
|
929
|
+
validator: (se, N, B) => {
|
|
930
|
+
N && f.type == "number" && (N < x.min || N > x.max) ? B(new Error(`${x.label} 必须在 ${x.min} 和 ${x.max} 之间!`)) : N && f.type !== "number" && (N.toString().length < x.min || N.toString().length > x.max) ? B(new Error(`字符长度必须在 ${x.min} 和 ${x.max} 之间!`)) : B();
|
|
931
931
|
}
|
|
932
|
-
}), x.max && !x.min && f.type == "number" &&
|
|
933
|
-
validator: (se,
|
|
934
|
-
|
|
932
|
+
}), x.max && !x.min && f.type == "number" && S.push({
|
|
933
|
+
validator: (se, N, B) => {
|
|
934
|
+
N && N > x.max ? B(new Error(`${x.label}不能大于${x.max}!`)) : B();
|
|
935
935
|
}
|
|
936
|
-
}), x.min && !x.max && f.type == "number" &&
|
|
937
|
-
validator: (se,
|
|
938
|
-
|
|
936
|
+
}), x.min && !x.max && f.type == "number" && S.push({
|
|
937
|
+
validator: (se, N, B) => {
|
|
938
|
+
N && N < x.min ? B(new Error(`${x.label}不能小于${x.min}!`)) : B();
|
|
939
939
|
}
|
|
940
|
-
}), x.type == "email" &&
|
|
941
|
-
validator: (se,
|
|
940
|
+
}), x.type == "email" && S.push({ type: "email", message: "不是一个正确的邮箱地址!" }), x.type == "url" && S.push({ type: "url", message: "不是一个合正确的URL!" }), x.pattern && S.push({ pattern: x == null ? void 0 : x.pattern, message: (x == null ? void 0 : x.message) || "格式不正确!" }), x.validate && S.push({
|
|
941
|
+
validator: (se, N, B) => x.validate(se, N, B)
|
|
942
942
|
});
|
|
943
943
|
}
|
|
944
|
-
return
|
|
944
|
+
return S;
|
|
945
945
|
};
|
|
946
946
|
Ve(() => {
|
|
947
947
|
p();
|
|
948
948
|
});
|
|
949
949
|
const p = () => {
|
|
950
|
-
for (const [f,
|
|
951
|
-
l.value[f].formItem = { ...l.value[f].formItem, ...
|
|
950
|
+
for (const [f, S] of Object.entries($.value))
|
|
951
|
+
l.value[f].formItem = { ...l.value[f].formItem, ...S.formItem }, l.value[f].formItem.style = { ...l.value[f].formItem.style, ...S.formItem.style };
|
|
952
952
|
};
|
|
953
953
|
lt(() => l.value.form.inline, () => p());
|
|
954
954
|
const $ = xe(() => Object.fromEntries(Object.entries(l.value).filter((f) => f[1].type != "hidden").filter((f) => f[1].editor !== !1).filter((f) => f[1].type !== "control").map((f) => [f[0], f[1]]))), ee = xe(() => Object.fromEntries(Object.entries(l.value).filter((f) => f[1].type != "hidden").filter((f) => f[1].type != "control").map((f) => [f[0], f[1].value])));
|
|
955
|
-
return (f,
|
|
956
|
-
const ie = F("el-form-item"), x = F("el-col"), se = F("el-button"),
|
|
957
|
-
return _(), I(
|
|
955
|
+
return (f, S) => {
|
|
956
|
+
const ie = F("el-form-item"), x = F("el-col"), se = F("el-button"), N = F("el-form");
|
|
957
|
+
return _(), I(N, V({
|
|
958
958
|
ref_key: "gform",
|
|
959
959
|
ref: a,
|
|
960
960
|
model: l.value,
|
|
@@ -1027,7 +1027,7 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
1027
1027
|
g(f.$slots, "f-footer-left"),
|
|
1028
1028
|
(fe = (re = (B = l.value) == null ? void 0 : B.form) == null ? void 0 : re.submit) != null && fe.hidden ? de("", !0) : (_(), I(se, V({
|
|
1029
1029
|
key: 0,
|
|
1030
|
-
onClick:
|
|
1030
|
+
onClick: S[0] || (S[0] = ot((le) => l.value.form.submit.click(ee.value, l.value), ["stop"]))
|
|
1031
1031
|
}, o(ge)(l.value.form.submit, (le) => !["click"].includes(le))), {
|
|
1032
1032
|
default: c(() => {
|
|
1033
1033
|
var le, D, y;
|
|
@@ -1039,7 +1039,7 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
1039
1039
|
}, 16)),
|
|
1040
1040
|
(ye = (U = (L = l.value) == null ? void 0 : L.form) == null ? void 0 : U.reset) != null && ye.hidden ? de("", !0) : (_(), I(se, V({
|
|
1041
1041
|
key: 1,
|
|
1042
|
-
onClick:
|
|
1042
|
+
onClick: S[1] || (S[1] = (le) => l.value.form.reset.click(l.value))
|
|
1043
1043
|
}, o(ge)(l.value.form.reset, (le) => !["click"].includes(le))), {
|
|
1044
1044
|
default: c(() => {
|
|
1045
1045
|
var le, D, y;
|
|
@@ -1142,7 +1142,7 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
1142
1142
|
inline: !0,
|
|
1143
1143
|
style: { display: "flex", flex: 1, "flex-wrap": "wrap" },
|
|
1144
1144
|
more: {
|
|
1145
|
-
mode:
|
|
1145
|
+
mode: 1,
|
|
1146
1146
|
hidden: !1,
|
|
1147
1147
|
type: "primary",
|
|
1148
1148
|
label: "更多",
|
|
@@ -1172,7 +1172,7 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
1172
1172
|
width: "100%",
|
|
1173
1173
|
display: "flex",
|
|
1174
1174
|
flexWrap: "wrap",
|
|
1175
|
-
justifyContent: "flex-
|
|
1175
|
+
justifyContent: "flex-end"
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
1178
|
};
|
|
@@ -1209,10 +1209,10 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
1209
1209
|
"onUpdate:info": $[1] || ($[1] = (f) => T.value = f),
|
|
1210
1210
|
more: void 0
|
|
1211
1211
|
}, Z({ _: 2 }, [
|
|
1212
|
-
R(p.$slots, (f,
|
|
1213
|
-
name:
|
|
1212
|
+
R(p.$slots, (f, S, ie) => ({
|
|
1213
|
+
name: S,
|
|
1214
1214
|
fn: c((x) => [
|
|
1215
|
-
g(p.$slots,
|
|
1215
|
+
g(p.$slots, S, { model: l.value }, void 0, !0)
|
|
1216
1216
|
])
|
|
1217
1217
|
}))
|
|
1218
1218
|
]), 1032, ["modelValue", "info"])
|
|
@@ -1269,10 +1269,10 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
1269
1269
|
"onUpdate:info": $[6] || ($[6] = (f) => T.value = f),
|
|
1270
1270
|
more: !0
|
|
1271
1271
|
}, Z({ _: 2 }, [
|
|
1272
|
-
R(p.$slots, (f,
|
|
1273
|
-
name:
|
|
1272
|
+
R(p.$slots, (f, S, ie) => ({
|
|
1273
|
+
name: S,
|
|
1274
1274
|
fn: c((x) => [
|
|
1275
|
-
g(p.$slots,
|
|
1275
|
+
g(p.$slots, S, { model: l.value }, void 0, !0)
|
|
1276
1276
|
])
|
|
1277
1277
|
}))
|
|
1278
1278
|
]), 1032, ["modelValue", "info"])
|
|
@@ -1306,10 +1306,10 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
1306
1306
|
"onUpdate:info": $[8] || ($[8] = (f) => T.value = f),
|
|
1307
1307
|
more: !0
|
|
1308
1308
|
}, Z({ _: 2 }, [
|
|
1309
|
-
R(p.$slots, (f,
|
|
1310
|
-
name:
|
|
1309
|
+
R(p.$slots, (f, S, ie) => ({
|
|
1310
|
+
name: S,
|
|
1311
1311
|
fn: c((x) => [
|
|
1312
|
-
g(p.$slots,
|
|
1312
|
+
g(p.$slots, S, { model: l.value }, void 0, !0)
|
|
1313
1313
|
])
|
|
1314
1314
|
}))
|
|
1315
1315
|
]), 1032, ["modelValue", "info"])
|
|
@@ -1340,10 +1340,10 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
1340
1340
|
"onUpdate:info": $[10] || ($[10] = (f) => T.value = f),
|
|
1341
1341
|
more: !0
|
|
1342
1342
|
}, Z({ _: 2 }, [
|
|
1343
|
-
R(p.$slots, (f,
|
|
1344
|
-
name:
|
|
1343
|
+
R(p.$slots, (f, S, ie) => ({
|
|
1344
|
+
name: S,
|
|
1345
1345
|
fn: c((x) => [
|
|
1346
|
-
g(p.$slots,
|
|
1346
|
+
g(p.$slots, S, { model: l.value }, void 0, !0)
|
|
1347
1347
|
])
|
|
1348
1348
|
}))
|
|
1349
1349
|
]), 1032, ["modelValue", "info"])
|
|
@@ -1381,7 +1381,7 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
1381
1381
|
]);
|
|
1382
1382
|
};
|
|
1383
1383
|
}
|
|
1384
|
-
}, wt = /* @__PURE__ */ Fe(Et, [["__scopeId", "data-v-
|
|
1384
|
+
}, wt = /* @__PURE__ */ Fe(Et, [["__scopeId", "data-v-7d8aa037"]]), _t = { style: { padding: "0", margin: "0", "box-sizing": "border-box" } }, Ct = { style: { padding: "10px", "box-sizing": "border-box" } }, Dt = { style: { margin: "10px" } }, Vt = {
|
|
1385
1385
|
style: { display: "flex", "flex-wrap": "wrap" },
|
|
1386
1386
|
id: "excelSortEl"
|
|
1387
1387
|
}, kt = ["textContent"], xt = { style: { width: "100%", display: "flex", padding: "10px", "box-sizing": "border-box", "justify-content": "center", "border-top": "1px solid #dcdfe6" } }, Ft = {
|
|
@@ -1415,7 +1415,7 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
1415
1415
|
});
|
|
1416
1416
|
};
|
|
1417
1417
|
return Ve(() => {
|
|
1418
|
-
const E = new
|
|
1418
|
+
const E = new Ne(document.getElementById("excelSortEl"), {
|
|
1419
1419
|
animation: 150,
|
|
1420
1420
|
onEnd: () => {
|
|
1421
1421
|
let p = E.toArray();
|
|
@@ -1511,10 +1511,10 @@ async function Ot(s, u) {
|
|
|
1511
1511
|
async function At(s) {
|
|
1512
1512
|
return await Ee.tableList.where({ name: s }).first();
|
|
1513
1513
|
}
|
|
1514
|
-
async function
|
|
1514
|
+
async function St(s) {
|
|
1515
1515
|
return typeof s == "string" && (s = { name: s }), await Ee.tableList.add(s), "add success";
|
|
1516
1516
|
}
|
|
1517
|
-
const
|
|
1517
|
+
const qt = {
|
|
1518
1518
|
style: { margin: "10px" },
|
|
1519
1519
|
class: "allcheck"
|
|
1520
1520
|
}, Bt = {
|
|
@@ -1547,7 +1547,7 @@ const St = {
|
|
|
1547
1547
|
}, i = () => {
|
|
1548
1548
|
const h = document.getElementById("cols");
|
|
1549
1549
|
if (h) {
|
|
1550
|
-
let p =
|
|
1550
|
+
let p = Ne.create(h, {
|
|
1551
1551
|
animation: 150,
|
|
1552
1552
|
filter: ".filtered",
|
|
1553
1553
|
//
|
|
@@ -1605,7 +1605,7 @@ const St = {
|
|
|
1605
1605
|
});
|
|
1606
1606
|
}
|
|
1607
1607
|
}, E = () => {
|
|
1608
|
-
|
|
1608
|
+
He.confirm("确定要复位吗?", "提示", {
|
|
1609
1609
|
confirmButtonText: "确定",
|
|
1610
1610
|
cancelButtonText: "取消",
|
|
1611
1611
|
type: "warning"
|
|
@@ -1632,7 +1632,7 @@ const St = {
|
|
|
1632
1632
|
}), (h, p) => {
|
|
1633
1633
|
const $ = F("el-divider"), ee = F("el-alert"), w = F("el-checkbox");
|
|
1634
1634
|
return _(), te("div", null, [
|
|
1635
|
-
j("div",
|
|
1635
|
+
j("div", qt, [
|
|
1636
1636
|
j("a", { onClick: m }, "全选"),
|
|
1637
1637
|
A($, { direction: "vertical" }),
|
|
1638
1638
|
j("a", { onClick: T }, "全不选"),
|
|
@@ -1652,7 +1652,7 @@ const St = {
|
|
|
1652
1652
|
modelValue: d.showCol,
|
|
1653
1653
|
"onUpdate:modelValue": (G) => d.showCol = G,
|
|
1654
1654
|
"data-id": d.value,
|
|
1655
|
-
class:
|
|
1655
|
+
class: We(["check-box-hover", d.value == "control" ? "filtered" : ""]),
|
|
1656
1656
|
onChange: (G) => a(G, d.value),
|
|
1657
1657
|
style: { width: "125px !important", height: "30px !important", border: "1px solid #dfe6ec", margin: "5px !important", "border-radius": "2px !important", "padding-left": "5px !important", display: "flex !important", "align-items": "center !important" },
|
|
1658
1658
|
value: d.value,
|
|
@@ -1673,10 +1673,10 @@ const St = {
|
|
|
1673
1673
|
]);
|
|
1674
1674
|
};
|
|
1675
1675
|
}
|
|
1676
|
-
}, jt = /* @__PURE__ */ Fe(It, [["__scopeId", "data-v-fe875b13"]]), Rt = { class: "table-query-container" }, Lt = { class: "btns" }, Pt = { class: "btns" },
|
|
1676
|
+
}, jt = /* @__PURE__ */ Fe(It, [["__scopeId", "data-v-fe875b13"]]), Rt = { class: "table-query-container" }, Lt = { class: "btns" }, Pt = { class: "btns" }, zt = ["innerHTML"], Ht = ["src"], Wt = { style: { display: "flex", "margin-top": "-2px" } }, Nt = { style: { display: "flex", flex: "1" } }, Yt = {
|
|
1677
1677
|
style: { display: "flex", "justify-content": "center", width: "100%", height: "100%" },
|
|
1678
1678
|
id: "table-form"
|
|
1679
|
-
}, Gt = { style: { display: "flex" } },
|
|
1679
|
+
}, Gt = { style: { display: "flex" } }, Xt = { style: { display: "flex", flex: "1" } }, Qt = /* @__PURE__ */ Object.assign({
|
|
1680
1680
|
name: "g-table",
|
|
1681
1681
|
inheritAttrs: !1
|
|
1682
1682
|
}, {
|
|
@@ -1690,7 +1690,7 @@ const St = {
|
|
|
1690
1690
|
}),
|
|
1691
1691
|
emits: /* @__PURE__ */ we(["load", "open", "delete", "submit", "reset", "download"], ["update:modelValue"]),
|
|
1692
1692
|
setup(s, { emit: u }) {
|
|
1693
|
-
var C, b, M, O, P, Y,
|
|
1693
|
+
var C, b, M, O, P, Y, X;
|
|
1694
1694
|
const l = u, e = _e(s, "modelValue"), a = je("options"), i = me({}), m = me(!1), T = ["type", "index", "label", "column-key", "prop", "width", "min-width", "fixed", "render-header", "sortable", "sort-method", "sort-by", "sort-orders", "resizable", "formatter", "show-overflow-tooltip", "align", "header-align", "class-name", "label-class-name", "selectable", "reserve-selection", "filters", "filter-placement", "filter-class-name", "filter-multiple", "filter-method", "filtered-value"], E = me(void 0), h = me([]), p = s, $ = {
|
|
1695
1695
|
data: [],
|
|
1696
1696
|
border: !0,
|
|
@@ -1790,6 +1790,7 @@ const St = {
|
|
|
1790
1790
|
label: "下载",
|
|
1791
1791
|
text: !1,
|
|
1792
1792
|
type: "primary",
|
|
1793
|
+
mode: "dialog",
|
|
1793
1794
|
style: {
|
|
1794
1795
|
marginLeft: "10px"
|
|
1795
1796
|
},
|
|
@@ -1800,6 +1801,7 @@ const St = {
|
|
|
1800
1801
|
label: "设置列",
|
|
1801
1802
|
text: !1,
|
|
1802
1803
|
type: "primary",
|
|
1804
|
+
mode: "dialog",
|
|
1803
1805
|
style: {
|
|
1804
1806
|
marginLeft: "10px"
|
|
1805
1807
|
},
|
|
@@ -1855,17 +1857,17 @@ const St = {
|
|
|
1855
1857
|
e.value.dialog = ve(
|
|
1856
1858
|
ce,
|
|
1857
1859
|
a == null ? void 0 : a.dialog,
|
|
1858
|
-
(
|
|
1860
|
+
(X = e.value) == null ? void 0 : X.dialog
|
|
1859
1861
|
);
|
|
1860
|
-
const f = Object.fromEntries(Object.entries(ge(e.value, (r, t) => t.type != "control" && t.editor !== !1 && t.type != "hidden")).map(([r, t]) => [r, t.value])),
|
|
1862
|
+
const f = Object.fromEntries(Object.entries(ge(e.value, (r, t) => t.type != "control" && t.editor !== !1 && t.type != "hidden")).map(([r, t]) => [r, t.value])), S = (r, t) => {
|
|
1861
1863
|
let n = t;
|
|
1862
|
-
if (r.decimals && !isNaN(t) && (typeof r.decimals == "number" ? n = parseFloat(n).toFixed(r.decimals) : typeof r.decimals == "object" && r.decimals.num && (r.decimals.pad ? n = parseFloat(n).toFixed(r.decimals.num) : n = parseFloat(parseFloat(n).toFixed(r.decimals.num)).toString())), ["date", "datetime", "time"].includes(r.type) && Me(t).isValid()) {
|
|
1863
|
-
const
|
|
1864
|
+
if (r.decimals && !isNaN(t) && (typeof r.decimals == "number" ? n = parseFloat(n).toFixed(r.decimals) : typeof r.decimals == "object" && r.decimals.num && (r.decimals.pad ? n = parseFloat(n).toFixed(r.decimals.num) : n = parseFloat(parseFloat(n).toFixed(r.decimals.num)).toString())), ["date", "datetime", "time", "time-select"].includes(r.type) && Me(t).isValid()) {
|
|
1865
|
+
const H = {
|
|
1864
1866
|
date: "YYYY-MM-DD",
|
|
1865
1867
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
1866
1868
|
time: "HH:mm:ss"
|
|
1867
1869
|
};
|
|
1868
|
-
n = r.dateFormat ? Me(n).format(r.dateFormat) : Me(n).format(
|
|
1870
|
+
n = r.dateFormat ? Me(n).format(r.dateFormat) : Me(n).format(H[r.type]);
|
|
1869
1871
|
}
|
|
1870
1872
|
return r.type === "money" && (r.align = r.align || "right", r.width = r.width || 130, n = `<span title="${Ie(parseFloat(n))}">${tl(parseFloat(n))}</span>`), r.prefix && n && (n = `<span>${r.prefix}${n}</span>`), r.suffix && n && (n = `${n}<span>${r.suffix}</span>`), n;
|
|
1871
1873
|
}, ie = (r) => {
|
|
@@ -1877,13 +1879,13 @@ const St = {
|
|
|
1877
1879
|
E.value = "add", (t = e.value.control.add) != null && t.click ? e.value.control.add.click(r) : (e.value.form.disabled = !1, e.value.dialog.mode = e.value.control.add.mode, e.value.dialog.title = e.value.control.add.label, Object.keys(f).forEach((n) => {
|
|
1878
1880
|
e.value[n] && (e.value[n].value = f[n]);
|
|
1879
1881
|
}), m.value = !0, l("open", r, "add"));
|
|
1880
|
-
},
|
|
1881
|
-
var
|
|
1882
|
-
if ((
|
|
1882
|
+
}, N = (r, t, n, k) => {
|
|
1883
|
+
var H;
|
|
1884
|
+
if ((H = e.value.control.delete) != null && H.click)
|
|
1883
1885
|
e.value.control.delete.click(r, t, n, k);
|
|
1884
1886
|
else {
|
|
1885
|
-
let { message:
|
|
1886
|
-
|
|
1887
|
+
let { message: Q, title: ae, options: he } = e.value.control.delete.dialog;
|
|
1888
|
+
He.confirm(Q, ae, he).then(() => {
|
|
1887
1889
|
l("delete", { row: r, column: t, $index: n }, ($e) => {
|
|
1888
1890
|
$e && (e.value.table.data.splice(n, 1), e.value.table.page.total--);
|
|
1889
1891
|
});
|
|
@@ -1891,14 +1893,14 @@ const St = {
|
|
|
1891
1893
|
});
|
|
1892
1894
|
}
|
|
1893
1895
|
}, B = (r, t, n, k) => {
|
|
1894
|
-
var
|
|
1895
|
-
E.value = "edit", (
|
|
1896
|
-
e.value[
|
|
1896
|
+
var H;
|
|
1897
|
+
E.value = "edit", (H = e.value.control.edit) != null && H.click ? e.value.control.edit.click(r, t, n, k) : (e.value.form.disabled = !1, e.value.dialog.mode = e.value.control.edit.mode, e.value.dialog.title = e.value.control.edit.label, Object.keys(r).forEach((Q) => {
|
|
1898
|
+
e.value[Q] && (e.value[Q].value = r[Q]);
|
|
1897
1899
|
}), m.value = !0, l("open", k, "edit", r, t, n));
|
|
1898
1900
|
}, re = (r, t, n, k) => {
|
|
1899
|
-
var
|
|
1900
|
-
E.value = void 0, (
|
|
1901
|
-
e.value[
|
|
1901
|
+
var H;
|
|
1902
|
+
E.value = void 0, (H = e.value.control.view) != null && H.click ? e.value.control.view.click(r, t, n, k) : (e.value.form.disabled = !0, e.value.dialog.mode = e.value.control.view.mode, e.value.dialog.title = e.value.control.view.label, Object.keys(r).forEach((Q) => {
|
|
1903
|
+
e.value[Q] && (e.value[Q].value = r[Q]);
|
|
1902
1904
|
}), m.value = !0, l("open", k, "view", r, t, n));
|
|
1903
1905
|
}, fe = (r, t) => {
|
|
1904
1906
|
l("submit", E.value, r, t, (n) => {
|
|
@@ -1913,36 +1915,38 @@ const St = {
|
|
|
1913
1915
|
else {
|
|
1914
1916
|
let k = Ue({
|
|
1915
1917
|
title: r.control.download.label,
|
|
1918
|
+
size: 480,
|
|
1916
1919
|
width: 600,
|
|
1917
1920
|
slots: {
|
|
1918
|
-
default: () =>
|
|
1921
|
+
default: () => Se(Tt, {
|
|
1919
1922
|
items: t,
|
|
1920
1923
|
commitText: r.control.download.excelLabel,
|
|
1921
|
-
onExcel: (
|
|
1922
|
-
l("download",
|
|
1924
|
+
onExcel: (H, Q) => {
|
|
1925
|
+
l("download", H, Q), k();
|
|
1923
1926
|
}
|
|
1924
1927
|
})
|
|
1925
1928
|
}
|
|
1926
|
-
});
|
|
1929
|
+
}, r.control.download.mode);
|
|
1927
1930
|
}
|
|
1928
1931
|
}, ye = (r) => {
|
|
1929
1932
|
var t;
|
|
1930
1933
|
(t = r.control.setting) != null && t.click ? r.control.setting.click(r) : Ue({
|
|
1931
1934
|
title: r.control.setting.label,
|
|
1935
|
+
size: 470,
|
|
1932
1936
|
width: 600,
|
|
1933
1937
|
slots: {
|
|
1934
|
-
default: () =>
|
|
1938
|
+
default: () => Se(jt, {
|
|
1935
1939
|
modelValue: r,
|
|
1936
1940
|
name: p.name
|
|
1937
1941
|
})
|
|
1938
1942
|
}
|
|
1939
|
-
});
|
|
1943
|
+
}, r.control.setting.mode);
|
|
1940
1944
|
}, le = xe(() => Object.fromEntries(
|
|
1941
1945
|
Object.entries(e.value).filter(([r, t]) => t.type !== "hidden").filter(([r, t]) => t.visible !== !1).filter(([r, t]) => t.showCol !== !1).map(([r, t]) => (t.sort = typeof t.sort == "number" ? t.sort : 0, [r, t])).sort((r, t) => r[1].sort - t[1].sort)
|
|
1942
1946
|
)), D = me({}), y = (r) => {
|
|
1943
1947
|
if (r.getDicts) {
|
|
1944
1948
|
const t = r.getDicts.toString();
|
|
1945
|
-
return D.value[t] ? (r.options = D.value[t], Promise.resolve()) : r.getDicts().then((n) => {
|
|
1949
|
+
return D.value[t] ? (r.options = D.value[t], Promise.resolve()) : r.getDicts(r, e.value).then((n) => {
|
|
1946
1950
|
D.value[t] = n, r.options = n;
|
|
1947
1951
|
});
|
|
1948
1952
|
}
|
|
@@ -1953,15 +1957,15 @@ const St = {
|
|
|
1953
1957
|
if (e.value[t].getDicts) {
|
|
1954
1958
|
const n = y(e.value[t]).then(() => {
|
|
1955
1959
|
e.value.table.data.forEach((k) => {
|
|
1956
|
-
var
|
|
1957
|
-
k[t] && (k[t] = ((
|
|
1960
|
+
var H;
|
|
1961
|
+
k[t] && (k[t] = ((H = e.value[t].options.find((Q) => Q.value == k[t])) == null ? void 0 : H.label) || k[t]);
|
|
1958
1962
|
});
|
|
1959
1963
|
}).catch((k) => {
|
|
1960
1964
|
console.error(`加载字典${t}:出现了错误!`, k);
|
|
1961
1965
|
});
|
|
1962
1966
|
r.push(n);
|
|
1963
1967
|
}
|
|
1964
|
-
}), Promise.all(r).then(() => {
|
|
1968
|
+
}), Promise.all(r).then((t) => {
|
|
1965
1969
|
});
|
|
1966
1970
|
};
|
|
1967
1971
|
return nt(() => {
|
|
@@ -1984,7 +1988,7 @@ const St = {
|
|
|
1984
1988
|
return;
|
|
1985
1989
|
}
|
|
1986
1990
|
} else
|
|
1987
|
-
await
|
|
1991
|
+
await St({ name: p.name });
|
|
1988
1992
|
} catch (t) {
|
|
1989
1993
|
console.error("检查表格名称时出现错误:", t), be.error("检查表格名称时出现错误,请稍后重试。");
|
|
1990
1994
|
}
|
|
@@ -1997,13 +2001,13 @@ const St = {
|
|
|
1997
2001
|
console.error("Error fetching table column settings:", t);
|
|
1998
2002
|
}
|
|
1999
2003
|
}), (r, t) => {
|
|
2000
|
-
const n = F("el-button"), k = F("el-table-column"),
|
|
2004
|
+
const n = F("el-button"), k = F("el-table-column"), H = F("el-table"), Q = F("el-pagination"), ae = F("el-icon"), he = F("el-dialog"), $e = F("el-drawer");
|
|
2001
2005
|
return _(), te(pe, null, [
|
|
2002
2006
|
j("div", Rt, [
|
|
2003
2007
|
g(r.$slots, "query", {}, () => [
|
|
2004
2008
|
A(wt, {
|
|
2005
2009
|
modelValue: e.value,
|
|
2006
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
2010
|
+
"onUpdate:modelValue": t[3] || (t[3] = (q) => e.value = q),
|
|
2007
2011
|
onQuery: x,
|
|
2008
2012
|
onReset: ie
|
|
2009
2013
|
}, Z({
|
|
@@ -2013,7 +2017,7 @@ const St = {
|
|
|
2013
2017
|
g(r.$slots, "control-add-left", {}, void 0, !0),
|
|
2014
2018
|
e.value.control.add.auth() ? g(r.$slots, "control-add", { key: 0 }, () => [
|
|
2015
2019
|
A(n, V(e.value.control.add, {
|
|
2016
|
-
onClick: t[0] || (t[0] = (
|
|
2020
|
+
onClick: t[0] || (t[0] = (q) => se(e.value))
|
|
2017
2021
|
}), {
|
|
2018
2022
|
default: c(() => [
|
|
2019
2023
|
ue(K(e.value.control.add.label), 1)
|
|
@@ -2026,7 +2030,7 @@ const St = {
|
|
|
2026
2030
|
j("div", Pt, [
|
|
2027
2031
|
e.value.control.download.auth() ? g(r.$slots, "control-download", { key: 0 }, () => [
|
|
2028
2032
|
A(n, V(e.value.control.download, {
|
|
2029
|
-
onClick: t[1] || (t[1] = (
|
|
2033
|
+
onClick: t[1] || (t[1] = (q) => U(e.value, h.value))
|
|
2030
2034
|
}), {
|
|
2031
2035
|
default: c(() => [
|
|
2032
2036
|
ue(K(e.value.control.download.label), 1)
|
|
@@ -2036,7 +2040,7 @@ const St = {
|
|
|
2036
2040
|
], !0) : de("", !0),
|
|
2037
2041
|
e.value.control.setting.auth() ? g(r.$slots, "control-setting", { key: 1 }, () => [
|
|
2038
2042
|
A(n, V(e.value.control.setting, {
|
|
2039
|
-
onClick: t[2] || (t[2] = (
|
|
2043
|
+
onClick: t[2] || (t[2] = (q) => ye(e.value))
|
|
2040
2044
|
}), {
|
|
2041
2045
|
default: c(() => [
|
|
2042
2046
|
ue(K(e.value.control.setting.label), 1)
|
|
@@ -2049,16 +2053,16 @@ const St = {
|
|
|
2049
2053
|
]),
|
|
2050
2054
|
_: 2
|
|
2051
2055
|
}, [
|
|
2052
|
-
R(r.$slots, (
|
|
2056
|
+
R(r.$slots, (q, ne, z) => ({
|
|
2053
2057
|
name: ne,
|
|
2054
|
-
fn: c((
|
|
2058
|
+
fn: c((W) => [
|
|
2055
2059
|
g(r.$slots, ne, { model: e.value }, void 0, !0)
|
|
2056
2060
|
])
|
|
2057
2061
|
}))
|
|
2058
2062
|
]), 1032, ["modelValue"])
|
|
2059
2063
|
], !0)
|
|
2060
2064
|
]),
|
|
2061
|
-
A(
|
|
2065
|
+
A(H, V({ class: "g-table-container" }, { ...r.$attrs, ...o(ge)(e.value.table, (q) => !["dblclickType", "page"].includes(q)) }), {
|
|
2062
2066
|
append: c(() => [
|
|
2063
2067
|
g(r.$slots, "append", {}, void 0, !0)
|
|
2064
2068
|
]),
|
|
@@ -2067,77 +2071,77 @@ const St = {
|
|
|
2067
2071
|
]),
|
|
2068
2072
|
default: c(() => [
|
|
2069
2073
|
g(r.$slots, "default", {}, () => [
|
|
2070
|
-
(_(!0), te(pe, null, R(le.value, (
|
|
2074
|
+
(_(!0), te(pe, null, R(le.value, (q, ne) => (_(), I(k, V({
|
|
2071
2075
|
prop: ne,
|
|
2072
2076
|
key: ne,
|
|
2073
2077
|
ref_for: !0
|
|
2074
|
-
}, { ...e.value.tableColumns, ...o(ge)(
|
|
2075
|
-
header: c(({ column:
|
|
2078
|
+
}, { ...e.value.tableColumns, ...o(ge)(q, (z) => T.includes(z)) }, { "header-align": "center" }), Z({
|
|
2079
|
+
header: c(({ column: z, $index: W }) => [
|
|
2076
2080
|
g(r.$slots, `${ne}-header`, {
|
|
2077
|
-
column:
|
|
2078
|
-
$index:
|
|
2081
|
+
column: z,
|
|
2082
|
+
$index: W
|
|
2079
2083
|
}, void 0, !0)
|
|
2080
2084
|
]),
|
|
2081
|
-
"filter-icon": c((
|
|
2082
|
-
g(r.$slots, `${ne}-filter-icon`, { data:
|
|
2085
|
+
"filter-icon": c((z) => [
|
|
2086
|
+
g(r.$slots, `${ne}-filter-icon`, { data: z }, void 0, !0)
|
|
2083
2087
|
]),
|
|
2084
2088
|
_: 2
|
|
2085
2089
|
}, [
|
|
2086
|
-
|
|
2090
|
+
q.type != "selection" && q.type != "index" && q.type != "expand" ? {
|
|
2087
2091
|
name: "default",
|
|
2088
|
-
fn: c(({ row:
|
|
2092
|
+
fn: c(({ row: z, column: W, $index: oe }) => [
|
|
2089
2093
|
g(r.$slots, `${ne}`, {
|
|
2090
|
-
row:
|
|
2091
|
-
column:
|
|
2094
|
+
row: z,
|
|
2095
|
+
column: W,
|
|
2092
2096
|
$index: oe
|
|
2093
2097
|
}, () => [
|
|
2094
2098
|
j("div", {
|
|
2095
|
-
innerHTML: q
|
|
2096
|
-
}, null, 8,
|
|
2099
|
+
innerHTML: S(q, W.formatter(z, W, z[ne], oe))
|
|
2100
|
+
}, null, 8, zt)
|
|
2097
2101
|
], !0)
|
|
2098
2102
|
]),
|
|
2099
2103
|
key: "0"
|
|
2100
2104
|
} : void 0,
|
|
2101
|
-
|
|
2105
|
+
q.type === "image" ? {
|
|
2102
2106
|
name: "default",
|
|
2103
|
-
fn: c(({ row:
|
|
2107
|
+
fn: c(({ row: z, column: W, $index: oe }) => [
|
|
2104
2108
|
g(r.$slots, `${ne}`, {
|
|
2105
|
-
row:
|
|
2106
|
-
column:
|
|
2109
|
+
row: z,
|
|
2110
|
+
column: W,
|
|
2107
2111
|
$index: oe
|
|
2108
2112
|
}, () => [
|
|
2109
2113
|
j("img", V({
|
|
2110
|
-
style: { width: "80px", height: "80px", "object-fit": "cover" },
|
|
2111
|
-
src:
|
|
2114
|
+
style: { width: "80px", height: "80px", "object-fit": "cover", "border-radius": "3px" },
|
|
2115
|
+
src: q.value,
|
|
2112
2116
|
ref_for: !0
|
|
2113
|
-
},
|
|
2117
|
+
}, q), null, 16, Ht)
|
|
2114
2118
|
], !0)
|
|
2115
2119
|
]),
|
|
2116
2120
|
key: "1"
|
|
2117
2121
|
} : void 0,
|
|
2118
|
-
|
|
2122
|
+
q.type == "control" ? {
|
|
2119
2123
|
name: "default",
|
|
2120
|
-
fn: c(({ row:
|
|
2124
|
+
fn: c(({ row: z, column: W, $index: oe }) => {
|
|
2121
2125
|
var Le, Pe;
|
|
2122
2126
|
return [
|
|
2123
2127
|
j("div", {
|
|
2124
|
-
class:
|
|
2128
|
+
class: We(["control", (Le = e.value.control) == null ? void 0 : Le.class]),
|
|
2125
2129
|
style: Re((Pe = e.value.control) == null ? void 0 : Pe.style)
|
|
2126
2130
|
}, [
|
|
2127
2131
|
g(r.$slots, "control", {}, () => [
|
|
2128
2132
|
g(r.$slots, "control-left", {
|
|
2129
|
-
row:
|
|
2130
|
-
column:
|
|
2133
|
+
row: z,
|
|
2134
|
+
column: W,
|
|
2131
2135
|
$index: oe
|
|
2132
2136
|
}, void 0, !0),
|
|
2133
|
-
e.value.control.view.auth(
|
|
2137
|
+
e.value.control.view.auth(z, W, oe) ? g(r.$slots, "control-view", {
|
|
2134
2138
|
key: 0,
|
|
2135
|
-
row:
|
|
2136
|
-
column:
|
|
2139
|
+
row: z,
|
|
2140
|
+
column: W,
|
|
2137
2141
|
$index: oe
|
|
2138
2142
|
}, () => [
|
|
2139
2143
|
A(n, V({ ref_for: !0 }, e.value.control.view, {
|
|
2140
|
-
onClick: (
|
|
2144
|
+
onClick: (ze) => re(z, W, oe, e.value)
|
|
2141
2145
|
}), {
|
|
2142
2146
|
default: c(() => [
|
|
2143
2147
|
ue(K(e.value.control.view.label), 1)
|
|
@@ -2146,18 +2150,18 @@ const St = {
|
|
|
2146
2150
|
}, 1040, ["onClick"])
|
|
2147
2151
|
], !0) : de("", !0),
|
|
2148
2152
|
g(r.$slots, "control-edit-left", {
|
|
2149
|
-
row:
|
|
2150
|
-
column:
|
|
2153
|
+
row: z,
|
|
2154
|
+
column: W,
|
|
2151
2155
|
$index: oe
|
|
2152
2156
|
}, void 0, !0),
|
|
2153
|
-
e.value.control.edit.auth(
|
|
2157
|
+
e.value.control.edit.auth(z, W, oe) ? g(r.$slots, "control-edit", {
|
|
2154
2158
|
key: 1,
|
|
2155
|
-
row:
|
|
2156
|
-
column:
|
|
2159
|
+
row: z,
|
|
2160
|
+
column: W,
|
|
2157
2161
|
$index: oe
|
|
2158
2162
|
}, () => [
|
|
2159
2163
|
A(n, V({ ref_for: !0 }, e.value.control.edit, {
|
|
2160
|
-
onClick: (
|
|
2164
|
+
onClick: (ze) => B(z, W, oe, e.value)
|
|
2161
2165
|
}), {
|
|
2162
2166
|
default: c(() => [
|
|
2163
2167
|
ue(K(e.value.control.edit.label), 1)
|
|
@@ -2166,18 +2170,18 @@ const St = {
|
|
|
2166
2170
|
}, 1040, ["onClick"])
|
|
2167
2171
|
], !0) : de("", !0),
|
|
2168
2172
|
g(r.$slots, "control-edit-right", {
|
|
2169
|
-
row:
|
|
2170
|
-
column:
|
|
2173
|
+
row: z,
|
|
2174
|
+
column: W,
|
|
2171
2175
|
$index: oe
|
|
2172
2176
|
}, void 0, !0),
|
|
2173
|
-
e.value.control.delete.auth(
|
|
2177
|
+
e.value.control.delete.auth(z, W, oe) ? g(r.$slots, "control-delete", {
|
|
2174
2178
|
key: 2,
|
|
2175
|
-
row:
|
|
2176
|
-
column:
|
|
2179
|
+
row: z,
|
|
2180
|
+
column: W,
|
|
2177
2181
|
$index: oe
|
|
2178
2182
|
}, () => [
|
|
2179
2183
|
A(n, V({ ref_for: !0 }, e.value.control.delete, {
|
|
2180
|
-
onClick: (
|
|
2184
|
+
onClick: (ze) => N(z, W, oe, e.value)
|
|
2181
2185
|
}), {
|
|
2182
2186
|
default: c(() => [
|
|
2183
2187
|
ue(K(e.value.control.delete.label), 1)
|
|
@@ -2186,8 +2190,8 @@ const St = {
|
|
|
2186
2190
|
}, 1040, ["onClick"])
|
|
2187
2191
|
], !0) : de("", !0),
|
|
2188
2192
|
g(r.$slots, "control-right", {
|
|
2189
|
-
row:
|
|
2190
|
-
column:
|
|
2193
|
+
row: z,
|
|
2194
|
+
column: W,
|
|
2191
2195
|
$index: oe
|
|
2192
2196
|
}, void 0, !0)
|
|
2193
2197
|
], !0)
|
|
@@ -2202,11 +2206,11 @@ const St = {
|
|
|
2202
2206
|
_: 3
|
|
2203
2207
|
}, 16),
|
|
2204
2208
|
e.value.table.page.hidden ? de("", !0) : g(r.$slots, "page", { key: 0 }, () => [
|
|
2205
|
-
A(
|
|
2209
|
+
A(Q, V({
|
|
2206
2210
|
"page-size": e.value.table.page.pageSize,
|
|
2207
|
-
"onUpdate:pageSize": t[4] || (t[4] = (
|
|
2211
|
+
"onUpdate:pageSize": t[4] || (t[4] = (q) => e.value.table.page.pageSize = q),
|
|
2208
2212
|
"current-page": e.value.table.page.currentPage,
|
|
2209
|
-
"onUpdate:currentPage": t[5] || (t[5] = (
|
|
2213
|
+
"onUpdate:currentPage": t[5] || (t[5] = (q) => e.value.table.page.currentPage = q)
|
|
2210
2214
|
}, e.value.table.page), {
|
|
2211
2215
|
default: c(() => [
|
|
2212
2216
|
g(r.$slots, "table-page", {}, void 0, !0)
|
|
@@ -2217,21 +2221,21 @@ const St = {
|
|
|
2217
2221
|
Oe(j("div", null, [
|
|
2218
2222
|
A(he, V({
|
|
2219
2223
|
modelValue: m.value,
|
|
2220
|
-
"onUpdate:modelValue": t[9] || (t[9] = (
|
|
2224
|
+
"onUpdate:modelValue": t[9] || (t[9] = (q) => m.value = q),
|
|
2221
2225
|
fullscreen: e.value.dialog.fullScreen
|
|
2222
|
-
}, o(ge)(e.value.dialog, (
|
|
2223
|
-
width: o(
|
|
2226
|
+
}, o(ge)(e.value.dialog, (q) => !["size"].includes(q)), {
|
|
2227
|
+
width: o(Qe)(e.value.dialog.width) + 35
|
|
2224
2228
|
}), {
|
|
2225
2229
|
header: c(() => {
|
|
2226
|
-
var
|
|
2230
|
+
var q, ne, z, W;
|
|
2227
2231
|
return [
|
|
2228
|
-
j("div",
|
|
2229
|
-
j("div",
|
|
2232
|
+
j("div", Wt, [
|
|
2233
|
+
j("div", Nt, [
|
|
2230
2234
|
g(r.$slots, "f-header", {}, () => [
|
|
2231
2235
|
j("div", null, K(e.value.dialog.title), 1)
|
|
2232
2236
|
], !0)
|
|
2233
2237
|
]),
|
|
2234
|
-
((ne = (
|
|
2238
|
+
((ne = (q = e.value) == null ? void 0 : q.dialog) == null ? void 0 : ne.fullScreen) === !1 ? (_(), te("div", {
|
|
2235
2239
|
key: 0,
|
|
2236
2240
|
onClick: t[6] || (t[6] = (oe) => {
|
|
2237
2241
|
e.value.dialog.fullScreen = !0;
|
|
@@ -2245,7 +2249,7 @@ const St = {
|
|
|
2245
2249
|
_: 1
|
|
2246
2250
|
})
|
|
2247
2251
|
])) : de("", !0),
|
|
2248
|
-
((
|
|
2252
|
+
((W = (z = e.value) == null ? void 0 : z.dialog) == null ? void 0 : W.fullScreen) === !0 ? (_(), te("div", {
|
|
2249
2253
|
key: 1,
|
|
2250
2254
|
onClick: t[7] || (t[7] = (oe) => {
|
|
2251
2255
|
e.value.dialog.fullScreen = !1;
|
|
@@ -2264,16 +2268,16 @@ const St = {
|
|
|
2264
2268
|
}),
|
|
2265
2269
|
default: c(() => [
|
|
2266
2270
|
j("div", Yt, [
|
|
2267
|
-
A(
|
|
2271
|
+
A(qe, {
|
|
2268
2272
|
modelValue: e.value,
|
|
2269
|
-
"onUpdate:modelValue": t[8] || (t[8] = (
|
|
2273
|
+
"onUpdate:modelValue": t[8] || (t[8] = (q) => e.value = q),
|
|
2270
2274
|
onSubmit: fe,
|
|
2271
2275
|
onReset: L
|
|
2272
2276
|
}, Z({ _: 2 }, [
|
|
2273
|
-
R(r.$slots, (
|
|
2277
|
+
R(r.$slots, (q, ne, z) => ({
|
|
2274
2278
|
name: ne,
|
|
2275
|
-
fn: c((
|
|
2276
|
-
g(r.$slots, ne, { model:
|
|
2279
|
+
fn: c((W) => [
|
|
2280
|
+
g(r.$slots, ne, { model: W }, void 0, !0)
|
|
2277
2281
|
])
|
|
2278
2282
|
}))
|
|
2279
2283
|
]), 1032, ["modelValue"])
|
|
@@ -2287,11 +2291,11 @@ const St = {
|
|
|
2287
2291
|
Oe(j("div", null, [
|
|
2288
2292
|
A($e, V({
|
|
2289
2293
|
modelValue: m.value,
|
|
2290
|
-
"onUpdate:modelValue": t[11] || (t[11] = (
|
|
2291
|
-
}, o(ge)(e.value.dialog, (
|
|
2294
|
+
"onUpdate:modelValue": t[11] || (t[11] = (q) => m.value = q)
|
|
2295
|
+
}, o(ge)(e.value.dialog, (q) => !["width"].includes(q))), {
|
|
2292
2296
|
header: c(() => [
|
|
2293
2297
|
j("div", Gt, [
|
|
2294
|
-
j("div",
|
|
2298
|
+
j("div", Xt, [
|
|
2295
2299
|
g(r.$slots, "f-header", {}, () => [
|
|
2296
2300
|
j("div", null, K(e.value.dialog.title), 1)
|
|
2297
2301
|
], !0)
|
|
@@ -2299,16 +2303,16 @@ const St = {
|
|
|
2299
2303
|
])
|
|
2300
2304
|
]),
|
|
2301
2305
|
default: c(() => [
|
|
2302
|
-
A(
|
|
2306
|
+
A(qe, {
|
|
2303
2307
|
modelValue: e.value,
|
|
2304
|
-
"onUpdate:modelValue": t[10] || (t[10] = (
|
|
2308
|
+
"onUpdate:modelValue": t[10] || (t[10] = (q) => e.value = q),
|
|
2305
2309
|
onSubmit: fe,
|
|
2306
2310
|
onReset: L
|
|
2307
2311
|
}, Z({ _: 2 }, [
|
|
2308
|
-
R(r.$slots, (
|
|
2312
|
+
R(r.$slots, (q, ne, z) => ({
|
|
2309
2313
|
name: ne,
|
|
2310
|
-
fn: c((
|
|
2311
|
-
g(r.$slots, ne, { model:
|
|
2314
|
+
fn: c((W) => [
|
|
2315
|
+
g(r.$slots, ne, { model: W }, void 0, !0)
|
|
2312
2316
|
])
|
|
2313
2317
|
}))
|
|
2314
2318
|
]), 1032, ["modelValue"])
|
|
@@ -2321,14 +2325,14 @@ const St = {
|
|
|
2321
2325
|
], 64);
|
|
2322
2326
|
};
|
|
2323
2327
|
}
|
|
2324
|
-
}), Jt = /* @__PURE__ */ Fe(
|
|
2328
|
+
}), Jt = /* @__PURE__ */ Fe(Qt, [["__scopeId", "data-v-adebf1ad"]]), Zt = Object.freeze({}), Xe = [
|
|
2325
2329
|
Jt,
|
|
2326
|
-
|
|
2330
|
+
qe
|
|
2327
2331
|
];
|
|
2328
2332
|
let Be = {};
|
|
2329
2333
|
const ul = {
|
|
2330
2334
|
install: (s, u = {}) => {
|
|
2331
|
-
Be = Object.freeze({ ...Zt, ...u }),
|
|
2335
|
+
Be = Object.freeze({ ...Zt, ...u }), Xe.forEach((l) => {
|
|
2332
2336
|
s.component(l.name, l);
|
|
2333
2337
|
}), s.provide("options", Be), s.config.globalProperties.$openModal = Ue;
|
|
2334
2338
|
}
|
|
@@ -2349,7 +2353,7 @@ const ul = {
|
|
|
2349
2353
|
}, 300);
|
|
2350
2354
|
}, () => {
|
|
2351
2355
|
var T, E, h;
|
|
2352
|
-
return
|
|
2356
|
+
return Se(a, {
|
|
2353
2357
|
modelValue: i.value,
|
|
2354
2358
|
"onUpdate:modelValue": (p) => i.value = p,
|
|
2355
2359
|
...s,
|
|
@@ -2363,11 +2367,11 @@ const ul = {
|
|
|
2363
2367
|
};
|
|
2364
2368
|
}
|
|
2365
2369
|
});
|
|
2366
|
-
return
|
|
2370
|
+
return Xe.forEach((T) => {
|
|
2367
2371
|
m.component(T.name, T);
|
|
2368
2372
|
}), m.provide("options", Be), m.use(Je, { locale: ct }), document.body.appendChild(l), m.mount(l), e;
|
|
2369
2373
|
};
|
|
2370
|
-
function
|
|
2374
|
+
function Qe(s, u = window.innerWidth) {
|
|
2371
2375
|
if (typeof s == "number")
|
|
2372
2376
|
return s;
|
|
2373
2377
|
if (s.endsWith("px"))
|
|
@@ -2389,7 +2393,7 @@ function Xe(s, u = window.innerWidth) {
|
|
|
2389
2393
|
throw new Error("Invalid calc expression");
|
|
2390
2394
|
};
|
|
2391
2395
|
const a = s.slice(5, -1).trim();
|
|
2392
|
-
return i(a.replace(/([0-9.]+)([a-z%]+)/g, (T, E, h) =>
|
|
2396
|
+
return i(a.replace(/([0-9.]+)([a-z%]+)/g, (T, E, h) => Qe(E + h, u)));
|
|
2393
2397
|
}
|
|
2394
2398
|
throw new Error("Unsupported unit in value: " + s);
|
|
2395
2399
|
}
|
|
@@ -2463,11 +2467,16 @@ const J = {
|
|
|
2463
2467
|
AUTOCOMPLETE: "autocomplete",
|
|
2464
2468
|
INPUTNUMBER: "input-number",
|
|
2465
2469
|
MONEY: "money",
|
|
2466
|
-
NUMBER: "number"
|
|
2470
|
+
NUMBER: "number",
|
|
2471
|
+
URL: "url",
|
|
2472
|
+
EMAIL: "email",
|
|
2473
|
+
PASSWORD: "password",
|
|
2474
|
+
TEXTAREA: "textarea",
|
|
2475
|
+
TEL: "tel"
|
|
2467
2476
|
};
|
|
2468
2477
|
export {
|
|
2469
2478
|
J as CT,
|
|
2470
|
-
|
|
2479
|
+
Qe as convertToPx,
|
|
2471
2480
|
ul as default,
|
|
2472
2481
|
ge as filterObject,
|
|
2473
2482
|
el as findTreeLabelByValue,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Dexie } from 'dexie';
|
|
2
|
+
// 定义 tableInfo 表的记录类型
|
|
3
|
+
interface TableInfo {
|
|
4
|
+
id?: number;
|
|
5
|
+
user: string;
|
|
6
|
+
page: string;
|
|
7
|
+
key: string;
|
|
8
|
+
showCol?: boolean;
|
|
9
|
+
width?: string;
|
|
10
|
+
sort?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// 定义 tableList 表的记录类型
|
|
14
|
+
interface TableList {
|
|
15
|
+
id?: number;
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 定义数据库类型
|
|
20
|
+
declare class GycDatabase extends Dexie {
|
|
21
|
+
tableInfo: Dexie.Table<TableInfo, number>;
|
|
22
|
+
tableList: Dexie.Table<TableList, number>;
|
|
23
|
+
|
|
24
|
+
constructor(name: string);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// 定义数据库实例
|
|
28
|
+
declare const db: GycDatabase;
|
|
29
|
+
|
|
30
|
+
// 保存表格项设置信息的函数类型
|
|
31
|
+
export declare function saveTableInfo(user: string, page: string, key: string, options?: Partial<TableInfo>): Promise<string>;
|
|
32
|
+
|
|
33
|
+
// 获取表格项设置信息的函数类型
|
|
34
|
+
export declare function getTableInfo(user: string, page: string): Promise<TableInfo[]>;
|
|
35
|
+
|
|
36
|
+
// 删除表格项设置信息的函数类型
|
|
37
|
+
export declare function deleteTableInfo(user: string, page: string): Promise<void>;
|
|
38
|
+
|
|
39
|
+
// 判断是否存在表名的函数类型
|
|
40
|
+
export declare function existsTableName(page: string): Promise<TableList | undefined>;
|
|
41
|
+
|
|
42
|
+
// 增加表的函数类型
|
|
43
|
+
export declare function addTableName(page: string): Promise<string>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Config } from 'g.config';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
declare module '@vue/runtime-core' {
|
|
5
|
+
interface ComponentCustomProperties {
|
|
6
|
+
$openModal: typeof import('./index').openModal
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type ModalMode = 'dialog' | 'drawer';
|
|
11
|
+
|
|
12
|
+
export declare const openModal: (
|
|
13
|
+
modalProps?: Record<string, any>,
|
|
14
|
+
mode?: ModalMode
|
|
15
|
+
) => () => void;
|
|
16
|
+
|
|
17
|
+
export declare function convertToPx(
|
|
18
|
+
value: string | number,
|
|
19
|
+
referenceSize?: number
|
|
20
|
+
): number;
|
|
21
|
+
|
|
22
|
+
export declare function mergeObjects<T extends Record<string, any>>(
|
|
23
|
+
...objects: Partial<T>[]
|
|
24
|
+
): T;
|
|
25
|
+
|
|
26
|
+
export declare function filterObject<T extends object>(
|
|
27
|
+
obj: T,
|
|
28
|
+
filter?: (key: keyof T, value: T[keyof T]) => boolean
|
|
29
|
+
): Partial<T>;
|
|
30
|
+
|
|
31
|
+
interface TreeNode<T = any> {
|
|
32
|
+
value: any;
|
|
33
|
+
label: string;
|
|
34
|
+
children?: TreeNode<T>[];
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export declare function findTreeLabelByValue(
|
|
39
|
+
treeData: TreeNode[],
|
|
40
|
+
value: any,
|
|
41
|
+
valueKey?: string,
|
|
42
|
+
labelKey?: string,
|
|
43
|
+
childrenKey?: string
|
|
44
|
+
): string | null;
|
|
45
|
+
|
|
46
|
+
export declare function moneyToChinese(money: number): string;
|
|
47
|
+
export declare function formatAmount(amount: number): string;
|
|
48
|
+
|
|
49
|
+
export declare const CT: {
|
|
50
|
+
readonly RADIO: 'radio';
|
|
51
|
+
readonly RADIOBUTTON: 'radio-button';
|
|
52
|
+
CHECKBOX: 'checkbox';
|
|
53
|
+
CHECKBOXGROUP: 'checkbox-group';
|
|
54
|
+
CHECKBOXGROUPBUTTON: 'checkbox-group-button';
|
|
55
|
+
SELECT: 'select';
|
|
56
|
+
TREESELECT: 'tree-select';
|
|
57
|
+
TIME: 'time';
|
|
58
|
+
TIMESELECT: 'time-select';
|
|
59
|
+
DATE: 'date';
|
|
60
|
+
DATETIME: 'datetime';
|
|
61
|
+
COLOR: 'color';
|
|
62
|
+
RATE: 'rate';
|
|
63
|
+
SLIDER: 'slider';
|
|
64
|
+
SWITCH: 'switch';
|
|
65
|
+
TRANSFER: 'transfer';
|
|
66
|
+
CASCADER: 'cascader';
|
|
67
|
+
IMAGE: 'image';
|
|
68
|
+
AUTOCOMPLETE: 'autocomplete';
|
|
69
|
+
INPUTNUMBER: 'input-number';
|
|
70
|
+
MONEY: 'money';
|
|
71
|
+
NUMBER: 'number';
|
|
72
|
+
URL: 'url';
|
|
73
|
+
EMAIL: 'email';
|
|
74
|
+
PASSWORD: 'password';
|
|
75
|
+
TEXTAREA: 'textarea';
|
|
76
|
+
readonly TEL: 'tel';
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
declare const _default: {
|
|
80
|
+
install: (app: import('vue').App, options?: Config) => void;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export default _default;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.g-query-container[data-v-
|
|
1
|
+
.g-query-container[data-v-7d8aa037]{display:flex;flex:1;flex-direction:column;padding:10px;box-sizing:border-box}.outer[data-v-7d8aa037]{min-height:100px;border-radius:10px;background-color:#fffc;box-shadow:0 0 10px #0000001a;top:60px;padding:10px;width:100%;box-sizing:border-box}.inner[data-v-7d8aa037]{border-radius:6px;min-height:100px;border:1px solid #f2f2f2;padding:20px;box-sizing:border-box;width:100%;background-color:#fffc}.nested-enter-active[data-v-7d8aa037],.nested-leave-active[data-v-7d8aa037]{transition:all .3s ease-in-out}.nested-leave-active[data-v-7d8aa037]{transition-delay:.25s}.nested-enter-from[data-v-7d8aa037],.nested-leave-to[data-v-7d8aa037]{transform:translateY(-100px);opacity:0}.nested-enter-active .inner[data-v-7d8aa037],.nested-leave-active .inner[data-v-7d8aa037]{transition:all .3s ease-in-out}.nested-enter-active .inner[data-v-7d8aa037]{transition-delay:.25s}.nested-enter-from .inner[data-v-7d8aa037],.nested-leave-to .inner[data-v-7d8aa037]{transform:translateY(-100px);opacity:.001}.check-box-hover[data-v-64e6e1c0]:hover,.check-box-hover[data-v-fe875b13]:hover{background:#f5f1f1}.allcheck a[data-v-fe875b13]{cursor:pointer}.filtered[data-v-fe875b13]{pointer-events:none}.max[data-v-adebf1ad]{cursor:pointer;color:#333}.max[data-v-adebf1ad]:hover{color:var(--el-color-primary)}.btns[data-v-adebf1ad]{display:flex}
|
package/package.json
CHANGED
|
@@ -1,40 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-2024-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.37",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A Vue 3 and Element Plus based plugin",
|
|
7
|
-
"module": "dist/index.es.js",
|
|
8
|
-
"types": "dist/
|
|
9
|
-
"author": {
|
|
10
|
-
"name": "guoyuanchao",
|
|
11
|
-
"email": "xg816620@163.com"
|
|
12
|
-
},
|
|
7
|
+
"module": "dist/index.es.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
13
9
|
"files": [
|
|
14
10
|
"dist"
|
|
15
11
|
],
|
|
16
12
|
"scripts": {
|
|
17
13
|
"i": "pnpm i",
|
|
18
14
|
"dev": "vite",
|
|
19
|
-
"build": "vite build"
|
|
20
|
-
"prepublishOnly": "npm run build"
|
|
21
|
-
},
|
|
22
|
-
"dependencies": {
|
|
15
|
+
"build": "vite build"
|
|
23
16
|
},
|
|
24
17
|
"peerDependencies": {
|
|
18
|
+
"@element-plus/icons-vue": "^2.3.1",
|
|
25
19
|
"dexie": "^4.0.0",
|
|
26
20
|
"element-plus": "^2.8.0",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"sortablejs": "^1.15.6"
|
|
21
|
+
"sortablejs": "^1.15.6",
|
|
22
|
+
"vue": "^3.4.0"
|
|
30
23
|
},
|
|
31
24
|
"license": "MIT",
|
|
32
25
|
"devDependencies": {
|
|
33
26
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
27
|
+
"@types/node": "^22.13.5",
|
|
34
28
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
35
29
|
"@vitejs/plugin-vue-jsx": "^4.0.0",
|
|
36
30
|
"@vue/compiler-sfc": "^3.4.29",
|
|
31
|
+
"@vue/runtime-core": "^3.5.13",
|
|
37
32
|
"vite": "^5.3.1",
|
|
38
|
-
"vite-plugin-dts": "^4.5.0"
|
|
33
|
+
"vite-plugin-dts": "^4.5.0",
|
|
34
|
+
"vite-plugin-vue-devtools": "^7.7.2"
|
|
39
35
|
}
|
|
40
36
|
}
|