vue-2024-ui 0.0.36 → 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 +182 -177
- 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 +4 -6
- package/dist/types/index.d.ts +0 -86
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
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
|
|
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,19 +274,19 @@ 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, H = (
|
|
289
|
+
var k = this.$locale().weekStart || 0, H = (X < k ? X + 7 : X) - k;
|
|
290
290
|
return P(M ? t - H : t + (6 - H), r);
|
|
291
291
|
case h:
|
|
292
292
|
case d:
|
|
@@ -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,
|
|
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
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":
|
|
@@ -375,9 +375,9 @@ var Ye = { exports: {} };
|
|
|
375
375
|
case "hh":
|
|
376
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,14 +598,14 @@ 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
606
|
(_(!0), te(pe, null, R(k.options, (H) => (_(), I(se, V({ ref_for: !0 }, H, {
|
|
607
607
|
key: H.value,
|
|
608
|
-
onClick: (
|
|
608
|
+
onClick: (Q) => h.change && h.change(H)
|
|
609
609
|
}), {
|
|
610
610
|
default: c(() => [
|
|
611
611
|
g(w.$slots, `${l.t}-${o(a)}-options`, { option: H })
|
|
@@ -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
|
//
|
|
@@ -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" }, zt = ["innerHTML"], Ht = ["src"],
|
|
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,
|
|
@@ -1857,9 +1857,9 @@ const St = {
|
|
|
1857
1857
|
e.value.dialog = ve(
|
|
1858
1858
|
ce,
|
|
1859
1859
|
a == null ? void 0 : a.dialog,
|
|
1860
|
-
(
|
|
1860
|
+
(X = e.value) == null ? void 0 : X.dialog
|
|
1861
1861
|
);
|
|
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])),
|
|
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) => {
|
|
1863
1863
|
let n = t;
|
|
1864
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
1865
|
const H = {
|
|
@@ -1879,13 +1879,13 @@ const St = {
|
|
|
1879
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) => {
|
|
1880
1880
|
e.value[n] && (e.value[n].value = f[n]);
|
|
1881
1881
|
}), m.value = !0, l("open", r, "add"));
|
|
1882
|
-
},
|
|
1882
|
+
}, N = (r, t, n, k) => {
|
|
1883
1883
|
var H;
|
|
1884
1884
|
if ((H = e.value.control.delete) != null && H.click)
|
|
1885
1885
|
e.value.control.delete.click(r, t, n, k);
|
|
1886
1886
|
else {
|
|
1887
|
-
let { message:
|
|
1888
|
-
He.confirm(
|
|
1887
|
+
let { message: Q, title: ae, options: he } = e.value.control.delete.dialog;
|
|
1888
|
+
He.confirm(Q, ae, he).then(() => {
|
|
1889
1889
|
l("delete", { row: r, column: t, $index: n }, ($e) => {
|
|
1890
1890
|
$e && (e.value.table.data.splice(n, 1), e.value.table.page.total--);
|
|
1891
1891
|
});
|
|
@@ -1894,13 +1894,13 @@ const St = {
|
|
|
1894
1894
|
}
|
|
1895
1895
|
}, B = (r, t, n, k) => {
|
|
1896
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((
|
|
1898
|
-
e.value[
|
|
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]);
|
|
1899
1899
|
}), m.value = !0, l("open", k, "edit", r, t, n));
|
|
1900
1900
|
}, re = (r, t, n, k) => {
|
|
1901
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((
|
|
1903
|
-
e.value[
|
|
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]);
|
|
1904
1904
|
}), m.value = !0, l("open", k, "view", r, t, n));
|
|
1905
1905
|
}, fe = (r, t) => {
|
|
1906
1906
|
l("submit", E.value, r, t, (n) => {
|
|
@@ -1918,11 +1918,11 @@ const St = {
|
|
|
1918
1918
|
size: 480,
|
|
1919
1919
|
width: 600,
|
|
1920
1920
|
slots: {
|
|
1921
|
-
default: () =>
|
|
1921
|
+
default: () => Se(Tt, {
|
|
1922
1922
|
items: t,
|
|
1923
1923
|
commitText: r.control.download.excelLabel,
|
|
1924
|
-
onExcel: (H,
|
|
1925
|
-
l("download", H,
|
|
1924
|
+
onExcel: (H, Q) => {
|
|
1925
|
+
l("download", H, Q), k();
|
|
1926
1926
|
}
|
|
1927
1927
|
})
|
|
1928
1928
|
}
|
|
@@ -1935,7 +1935,7 @@ const St = {
|
|
|
1935
1935
|
size: 470,
|
|
1936
1936
|
width: 600,
|
|
1937
1937
|
slots: {
|
|
1938
|
-
default: () =>
|
|
1938
|
+
default: () => Se(jt, {
|
|
1939
1939
|
modelValue: r,
|
|
1940
1940
|
name: p.name
|
|
1941
1941
|
})
|
|
@@ -1958,7 +1958,7 @@ const St = {
|
|
|
1958
1958
|
const n = y(e.value[t]).then(() => {
|
|
1959
1959
|
e.value.table.data.forEach((k) => {
|
|
1960
1960
|
var H;
|
|
1961
|
-
k[t] && (k[t] = ((H = e.value[t].options.find((
|
|
1961
|
+
k[t] && (k[t] = ((H = e.value[t].options.find((Q) => Q.value == k[t])) == null ? void 0 : H.label) || k[t]);
|
|
1962
1962
|
});
|
|
1963
1963
|
}).catch((k) => {
|
|
1964
1964
|
console.error(`加载字典${t}:出现了错误!`, k);
|
|
@@ -1988,7 +1988,7 @@ const St = {
|
|
|
1988
1988
|
return;
|
|
1989
1989
|
}
|
|
1990
1990
|
} else
|
|
1991
|
-
await
|
|
1991
|
+
await St({ name: p.name });
|
|
1992
1992
|
} catch (t) {
|
|
1993
1993
|
console.error("检查表格名称时出现错误:", t), be.error("检查表格名称时出现错误,请稍后重试。");
|
|
1994
1994
|
}
|
|
@@ -2001,13 +2001,13 @@ const St = {
|
|
|
2001
2001
|
console.error("Error fetching table column settings:", t);
|
|
2002
2002
|
}
|
|
2003
2003
|
}), (r, t) => {
|
|
2004
|
-
const n = F("el-button"), k = F("el-table-column"), H = F("el-table"),
|
|
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");
|
|
2005
2005
|
return _(), te(pe, null, [
|
|
2006
2006
|
j("div", Rt, [
|
|
2007
2007
|
g(r.$slots, "query", {}, () => [
|
|
2008
2008
|
A(wt, {
|
|
2009
2009
|
modelValue: e.value,
|
|
2010
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
2010
|
+
"onUpdate:modelValue": t[3] || (t[3] = (q) => e.value = q),
|
|
2011
2011
|
onQuery: x,
|
|
2012
2012
|
onReset: ie
|
|
2013
2013
|
}, Z({
|
|
@@ -2017,7 +2017,7 @@ const St = {
|
|
|
2017
2017
|
g(r.$slots, "control-add-left", {}, void 0, !0),
|
|
2018
2018
|
e.value.control.add.auth() ? g(r.$slots, "control-add", { key: 0 }, () => [
|
|
2019
2019
|
A(n, V(e.value.control.add, {
|
|
2020
|
-
onClick: t[0] || (t[0] = (
|
|
2020
|
+
onClick: t[0] || (t[0] = (q) => se(e.value))
|
|
2021
2021
|
}), {
|
|
2022
2022
|
default: c(() => [
|
|
2023
2023
|
ue(K(e.value.control.add.label), 1)
|
|
@@ -2030,7 +2030,7 @@ const St = {
|
|
|
2030
2030
|
j("div", Pt, [
|
|
2031
2031
|
e.value.control.download.auth() ? g(r.$slots, "control-download", { key: 0 }, () => [
|
|
2032
2032
|
A(n, V(e.value.control.download, {
|
|
2033
|
-
onClick: t[1] || (t[1] = (
|
|
2033
|
+
onClick: t[1] || (t[1] = (q) => U(e.value, h.value))
|
|
2034
2034
|
}), {
|
|
2035
2035
|
default: c(() => [
|
|
2036
2036
|
ue(K(e.value.control.download.label), 1)
|
|
@@ -2040,7 +2040,7 @@ const St = {
|
|
|
2040
2040
|
], !0) : de("", !0),
|
|
2041
2041
|
e.value.control.setting.auth() ? g(r.$slots, "control-setting", { key: 1 }, () => [
|
|
2042
2042
|
A(n, V(e.value.control.setting, {
|
|
2043
|
-
onClick: t[2] || (t[2] = (
|
|
2043
|
+
onClick: t[2] || (t[2] = (q) => ye(e.value))
|
|
2044
2044
|
}), {
|
|
2045
2045
|
default: c(() => [
|
|
2046
2046
|
ue(K(e.value.control.setting.label), 1)
|
|
@@ -2053,16 +2053,16 @@ const St = {
|
|
|
2053
2053
|
]),
|
|
2054
2054
|
_: 2
|
|
2055
2055
|
}, [
|
|
2056
|
-
R(r.$slots, (
|
|
2056
|
+
R(r.$slots, (q, ne, z) => ({
|
|
2057
2057
|
name: ne,
|
|
2058
|
-
fn: c((
|
|
2058
|
+
fn: c((W) => [
|
|
2059
2059
|
g(r.$slots, ne, { model: e.value }, void 0, !0)
|
|
2060
2060
|
])
|
|
2061
2061
|
}))
|
|
2062
2062
|
]), 1032, ["modelValue"])
|
|
2063
2063
|
], !0)
|
|
2064
2064
|
]),
|
|
2065
|
-
A(H, V({ class: "g-table-container" }, { ...r.$attrs, ...o(ge)(e.value.table, (
|
|
2065
|
+
A(H, V({ class: "g-table-container" }, { ...r.$attrs, ...o(ge)(e.value.table, (q) => !["dblclickType", "page"].includes(q)) }), {
|
|
2066
2066
|
append: c(() => [
|
|
2067
2067
|
g(r.$slots, "append", {}, void 0, !0)
|
|
2068
2068
|
]),
|
|
@@ -2071,15 +2071,15 @@ const St = {
|
|
|
2071
2071
|
]),
|
|
2072
2072
|
default: c(() => [
|
|
2073
2073
|
g(r.$slots, "default", {}, () => [
|
|
2074
|
-
(_(!0), te(pe, null, R(le.value, (
|
|
2074
|
+
(_(!0), te(pe, null, R(le.value, (q, ne) => (_(), I(k, V({
|
|
2075
2075
|
prop: ne,
|
|
2076
2076
|
key: ne,
|
|
2077
2077
|
ref_for: !0
|
|
2078
|
-
}, { ...e.value.tableColumns, ...o(ge)(
|
|
2079
|
-
header: c(({ column: z, $index:
|
|
2078
|
+
}, { ...e.value.tableColumns, ...o(ge)(q, (z) => T.includes(z)) }, { "header-align": "center" }), Z({
|
|
2079
|
+
header: c(({ column: z, $index: W }) => [
|
|
2080
2080
|
g(r.$slots, `${ne}-header`, {
|
|
2081
2081
|
column: z,
|
|
2082
|
-
$index:
|
|
2082
|
+
$index: W
|
|
2083
2083
|
}, void 0, !0)
|
|
2084
2084
|
]),
|
|
2085
2085
|
"filter-icon": c((z) => [
|
|
@@ -2087,61 +2087,61 @@ const St = {
|
|
|
2087
2087
|
]),
|
|
2088
2088
|
_: 2
|
|
2089
2089
|
}, [
|
|
2090
|
-
|
|
2090
|
+
q.type != "selection" && q.type != "index" && q.type != "expand" ? {
|
|
2091
2091
|
name: "default",
|
|
2092
|
-
fn: c(({ row: z, column:
|
|
2092
|
+
fn: c(({ row: z, column: W, $index: oe }) => [
|
|
2093
2093
|
g(r.$slots, `${ne}`, {
|
|
2094
2094
|
row: z,
|
|
2095
|
-
column:
|
|
2095
|
+
column: W,
|
|
2096
2096
|
$index: oe
|
|
2097
2097
|
}, () => [
|
|
2098
2098
|
j("div", {
|
|
2099
|
-
innerHTML: q
|
|
2099
|
+
innerHTML: S(q, W.formatter(z, W, z[ne], oe))
|
|
2100
2100
|
}, null, 8, zt)
|
|
2101
2101
|
], !0)
|
|
2102
2102
|
]),
|
|
2103
2103
|
key: "0"
|
|
2104
2104
|
} : void 0,
|
|
2105
|
-
|
|
2105
|
+
q.type === "image" ? {
|
|
2106
2106
|
name: "default",
|
|
2107
|
-
fn: c(({ row: z, column:
|
|
2107
|
+
fn: c(({ row: z, column: W, $index: oe }) => [
|
|
2108
2108
|
g(r.$slots, `${ne}`, {
|
|
2109
2109
|
row: z,
|
|
2110
|
-
column:
|
|
2110
|
+
column: W,
|
|
2111
2111
|
$index: oe
|
|
2112
2112
|
}, () => [
|
|
2113
2113
|
j("img", V({
|
|
2114
2114
|
style: { width: "80px", height: "80px", "object-fit": "cover", "border-radius": "3px" },
|
|
2115
|
-
src:
|
|
2115
|
+
src: q.value,
|
|
2116
2116
|
ref_for: !0
|
|
2117
|
-
},
|
|
2117
|
+
}, q), null, 16, Ht)
|
|
2118
2118
|
], !0)
|
|
2119
2119
|
]),
|
|
2120
2120
|
key: "1"
|
|
2121
2121
|
} : void 0,
|
|
2122
|
-
|
|
2122
|
+
q.type == "control" ? {
|
|
2123
2123
|
name: "default",
|
|
2124
|
-
fn: c(({ row: z, column:
|
|
2124
|
+
fn: c(({ row: z, column: W, $index: oe }) => {
|
|
2125
2125
|
var Le, Pe;
|
|
2126
2126
|
return [
|
|
2127
2127
|
j("div", {
|
|
2128
|
-
class:
|
|
2128
|
+
class: We(["control", (Le = e.value.control) == null ? void 0 : Le.class]),
|
|
2129
2129
|
style: Re((Pe = e.value.control) == null ? void 0 : Pe.style)
|
|
2130
2130
|
}, [
|
|
2131
2131
|
g(r.$slots, "control", {}, () => [
|
|
2132
2132
|
g(r.$slots, "control-left", {
|
|
2133
2133
|
row: z,
|
|
2134
|
-
column:
|
|
2134
|
+
column: W,
|
|
2135
2135
|
$index: oe
|
|
2136
2136
|
}, void 0, !0),
|
|
2137
|
-
e.value.control.view.auth(z,
|
|
2137
|
+
e.value.control.view.auth(z, W, oe) ? g(r.$slots, "control-view", {
|
|
2138
2138
|
key: 0,
|
|
2139
2139
|
row: z,
|
|
2140
|
-
column:
|
|
2140
|
+
column: W,
|
|
2141
2141
|
$index: oe
|
|
2142
2142
|
}, () => [
|
|
2143
2143
|
A(n, V({ ref_for: !0 }, e.value.control.view, {
|
|
2144
|
-
onClick: (ze) => re(z,
|
|
2144
|
+
onClick: (ze) => re(z, W, oe, e.value)
|
|
2145
2145
|
}), {
|
|
2146
2146
|
default: c(() => [
|
|
2147
2147
|
ue(K(e.value.control.view.label), 1)
|
|
@@ -2151,17 +2151,17 @@ const St = {
|
|
|
2151
2151
|
], !0) : de("", !0),
|
|
2152
2152
|
g(r.$slots, "control-edit-left", {
|
|
2153
2153
|
row: z,
|
|
2154
|
-
column:
|
|
2154
|
+
column: W,
|
|
2155
2155
|
$index: oe
|
|
2156
2156
|
}, void 0, !0),
|
|
2157
|
-
e.value.control.edit.auth(z,
|
|
2157
|
+
e.value.control.edit.auth(z, W, oe) ? g(r.$slots, "control-edit", {
|
|
2158
2158
|
key: 1,
|
|
2159
2159
|
row: z,
|
|
2160
|
-
column:
|
|
2160
|
+
column: W,
|
|
2161
2161
|
$index: oe
|
|
2162
2162
|
}, () => [
|
|
2163
2163
|
A(n, V({ ref_for: !0 }, e.value.control.edit, {
|
|
2164
|
-
onClick: (ze) => B(z,
|
|
2164
|
+
onClick: (ze) => B(z, W, oe, e.value)
|
|
2165
2165
|
}), {
|
|
2166
2166
|
default: c(() => [
|
|
2167
2167
|
ue(K(e.value.control.edit.label), 1)
|
|
@@ -2171,17 +2171,17 @@ const St = {
|
|
|
2171
2171
|
], !0) : de("", !0),
|
|
2172
2172
|
g(r.$slots, "control-edit-right", {
|
|
2173
2173
|
row: z,
|
|
2174
|
-
column:
|
|
2174
|
+
column: W,
|
|
2175
2175
|
$index: oe
|
|
2176
2176
|
}, void 0, !0),
|
|
2177
|
-
e.value.control.delete.auth(z,
|
|
2177
|
+
e.value.control.delete.auth(z, W, oe) ? g(r.$slots, "control-delete", {
|
|
2178
2178
|
key: 2,
|
|
2179
2179
|
row: z,
|
|
2180
|
-
column:
|
|
2180
|
+
column: W,
|
|
2181
2181
|
$index: oe
|
|
2182
2182
|
}, () => [
|
|
2183
2183
|
A(n, V({ ref_for: !0 }, e.value.control.delete, {
|
|
2184
|
-
onClick: (ze) =>
|
|
2184
|
+
onClick: (ze) => N(z, W, oe, e.value)
|
|
2185
2185
|
}), {
|
|
2186
2186
|
default: c(() => [
|
|
2187
2187
|
ue(K(e.value.control.delete.label), 1)
|
|
@@ -2191,7 +2191,7 @@ const St = {
|
|
|
2191
2191
|
], !0) : de("", !0),
|
|
2192
2192
|
g(r.$slots, "control-right", {
|
|
2193
2193
|
row: z,
|
|
2194
|
-
column:
|
|
2194
|
+
column: W,
|
|
2195
2195
|
$index: oe
|
|
2196
2196
|
}, void 0, !0)
|
|
2197
2197
|
], !0)
|
|
@@ -2206,11 +2206,11 @@ const St = {
|
|
|
2206
2206
|
_: 3
|
|
2207
2207
|
}, 16),
|
|
2208
2208
|
e.value.table.page.hidden ? de("", !0) : g(r.$slots, "page", { key: 0 }, () => [
|
|
2209
|
-
A(
|
|
2209
|
+
A(Q, V({
|
|
2210
2210
|
"page-size": e.value.table.page.pageSize,
|
|
2211
|
-
"onUpdate:pageSize": t[4] || (t[4] = (
|
|
2211
|
+
"onUpdate:pageSize": t[4] || (t[4] = (q) => e.value.table.page.pageSize = q),
|
|
2212
2212
|
"current-page": e.value.table.page.currentPage,
|
|
2213
|
-
"onUpdate:currentPage": t[5] || (t[5] = (
|
|
2213
|
+
"onUpdate:currentPage": t[5] || (t[5] = (q) => e.value.table.page.currentPage = q)
|
|
2214
2214
|
}, e.value.table.page), {
|
|
2215
2215
|
default: c(() => [
|
|
2216
2216
|
g(r.$slots, "table-page", {}, void 0, !0)
|
|
@@ -2221,21 +2221,21 @@ const St = {
|
|
|
2221
2221
|
Oe(j("div", null, [
|
|
2222
2222
|
A(he, V({
|
|
2223
2223
|
modelValue: m.value,
|
|
2224
|
-
"onUpdate:modelValue": t[9] || (t[9] = (
|
|
2224
|
+
"onUpdate:modelValue": t[9] || (t[9] = (q) => m.value = q),
|
|
2225
2225
|
fullscreen: e.value.dialog.fullScreen
|
|
2226
|
-
}, o(ge)(e.value.dialog, (
|
|
2227
|
-
width: o(
|
|
2226
|
+
}, o(ge)(e.value.dialog, (q) => !["size"].includes(q)), {
|
|
2227
|
+
width: o(Qe)(e.value.dialog.width) + 35
|
|
2228
2228
|
}), {
|
|
2229
2229
|
header: c(() => {
|
|
2230
|
-
var
|
|
2230
|
+
var q, ne, z, W;
|
|
2231
2231
|
return [
|
|
2232
|
-
j("div",
|
|
2233
|
-
j("div",
|
|
2232
|
+
j("div", Wt, [
|
|
2233
|
+
j("div", Nt, [
|
|
2234
2234
|
g(r.$slots, "f-header", {}, () => [
|
|
2235
2235
|
j("div", null, K(e.value.dialog.title), 1)
|
|
2236
2236
|
], !0)
|
|
2237
2237
|
]),
|
|
2238
|
-
((ne = (
|
|
2238
|
+
((ne = (q = e.value) == null ? void 0 : q.dialog) == null ? void 0 : ne.fullScreen) === !1 ? (_(), te("div", {
|
|
2239
2239
|
key: 0,
|
|
2240
2240
|
onClick: t[6] || (t[6] = (oe) => {
|
|
2241
2241
|
e.value.dialog.fullScreen = !0;
|
|
@@ -2249,7 +2249,7 @@ const St = {
|
|
|
2249
2249
|
_: 1
|
|
2250
2250
|
})
|
|
2251
2251
|
])) : de("", !0),
|
|
2252
|
-
((
|
|
2252
|
+
((W = (z = e.value) == null ? void 0 : z.dialog) == null ? void 0 : W.fullScreen) === !0 ? (_(), te("div", {
|
|
2253
2253
|
key: 1,
|
|
2254
2254
|
onClick: t[7] || (t[7] = (oe) => {
|
|
2255
2255
|
e.value.dialog.fullScreen = !1;
|
|
@@ -2268,16 +2268,16 @@ const St = {
|
|
|
2268
2268
|
}),
|
|
2269
2269
|
default: c(() => [
|
|
2270
2270
|
j("div", Yt, [
|
|
2271
|
-
A(
|
|
2271
|
+
A(qe, {
|
|
2272
2272
|
modelValue: e.value,
|
|
2273
|
-
"onUpdate:modelValue": t[8] || (t[8] = (
|
|
2273
|
+
"onUpdate:modelValue": t[8] || (t[8] = (q) => e.value = q),
|
|
2274
2274
|
onSubmit: fe,
|
|
2275
2275
|
onReset: L
|
|
2276
2276
|
}, Z({ _: 2 }, [
|
|
2277
|
-
R(r.$slots, (
|
|
2277
|
+
R(r.$slots, (q, ne, z) => ({
|
|
2278
2278
|
name: ne,
|
|
2279
|
-
fn: c((
|
|
2280
|
-
g(r.$slots, ne, { model:
|
|
2279
|
+
fn: c((W) => [
|
|
2280
|
+
g(r.$slots, ne, { model: W }, void 0, !0)
|
|
2281
2281
|
])
|
|
2282
2282
|
}))
|
|
2283
2283
|
]), 1032, ["modelValue"])
|
|
@@ -2291,11 +2291,11 @@ const St = {
|
|
|
2291
2291
|
Oe(j("div", null, [
|
|
2292
2292
|
A($e, V({
|
|
2293
2293
|
modelValue: m.value,
|
|
2294
|
-
"onUpdate:modelValue": t[11] || (t[11] = (
|
|
2295
|
-
}, 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))), {
|
|
2296
2296
|
header: c(() => [
|
|
2297
2297
|
j("div", Gt, [
|
|
2298
|
-
j("div",
|
|
2298
|
+
j("div", Xt, [
|
|
2299
2299
|
g(r.$slots, "f-header", {}, () => [
|
|
2300
2300
|
j("div", null, K(e.value.dialog.title), 1)
|
|
2301
2301
|
], !0)
|
|
@@ -2303,16 +2303,16 @@ const St = {
|
|
|
2303
2303
|
])
|
|
2304
2304
|
]),
|
|
2305
2305
|
default: c(() => [
|
|
2306
|
-
A(
|
|
2306
|
+
A(qe, {
|
|
2307
2307
|
modelValue: e.value,
|
|
2308
|
-
"onUpdate:modelValue": t[10] || (t[10] = (
|
|
2308
|
+
"onUpdate:modelValue": t[10] || (t[10] = (q) => e.value = q),
|
|
2309
2309
|
onSubmit: fe,
|
|
2310
2310
|
onReset: L
|
|
2311
2311
|
}, Z({ _: 2 }, [
|
|
2312
|
-
R(r.$slots, (
|
|
2312
|
+
R(r.$slots, (q, ne, z) => ({
|
|
2313
2313
|
name: ne,
|
|
2314
|
-
fn: c((
|
|
2315
|
-
g(r.$slots, ne, { model:
|
|
2314
|
+
fn: c((W) => [
|
|
2315
|
+
g(r.$slots, ne, { model: W }, void 0, !0)
|
|
2316
2316
|
])
|
|
2317
2317
|
}))
|
|
2318
2318
|
]), 1032, ["modelValue"])
|
|
@@ -2325,14 +2325,14 @@ const St = {
|
|
|
2325
2325
|
], 64);
|
|
2326
2326
|
};
|
|
2327
2327
|
}
|
|
2328
|
-
}), Jt = /* @__PURE__ */ Fe(
|
|
2328
|
+
}), Jt = /* @__PURE__ */ Fe(Qt, [["__scopeId", "data-v-adebf1ad"]]), Zt = Object.freeze({}), Xe = [
|
|
2329
2329
|
Jt,
|
|
2330
|
-
|
|
2330
|
+
qe
|
|
2331
2331
|
];
|
|
2332
2332
|
let Be = {};
|
|
2333
2333
|
const ul = {
|
|
2334
2334
|
install: (s, u = {}) => {
|
|
2335
|
-
Be = Object.freeze({ ...Zt, ...u }),
|
|
2335
|
+
Be = Object.freeze({ ...Zt, ...u }), Xe.forEach((l) => {
|
|
2336
2336
|
s.component(l.name, l);
|
|
2337
2337
|
}), s.provide("options", Be), s.config.globalProperties.$openModal = Ue;
|
|
2338
2338
|
}
|
|
@@ -2353,7 +2353,7 @@ const ul = {
|
|
|
2353
2353
|
}, 300);
|
|
2354
2354
|
}, () => {
|
|
2355
2355
|
var T, E, h;
|
|
2356
|
-
return
|
|
2356
|
+
return Se(a, {
|
|
2357
2357
|
modelValue: i.value,
|
|
2358
2358
|
"onUpdate:modelValue": (p) => i.value = p,
|
|
2359
2359
|
...s,
|
|
@@ -2367,11 +2367,11 @@ const ul = {
|
|
|
2367
2367
|
};
|
|
2368
2368
|
}
|
|
2369
2369
|
});
|
|
2370
|
-
return
|
|
2370
|
+
return Xe.forEach((T) => {
|
|
2371
2371
|
m.component(T.name, T);
|
|
2372
2372
|
}), m.provide("options", Be), m.use(Je, { locale: ct }), document.body.appendChild(l), m.mount(l), e;
|
|
2373
2373
|
};
|
|
2374
|
-
function
|
|
2374
|
+
function Qe(s, u = window.innerWidth) {
|
|
2375
2375
|
if (typeof s == "number")
|
|
2376
2376
|
return s;
|
|
2377
2377
|
if (s.endsWith("px"))
|
|
@@ -2393,7 +2393,7 @@ function Xe(s, u = window.innerWidth) {
|
|
|
2393
2393
|
throw new Error("Invalid calc expression");
|
|
2394
2394
|
};
|
|
2395
2395
|
const a = s.slice(5, -1).trim();
|
|
2396
|
-
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)));
|
|
2397
2397
|
}
|
|
2398
2398
|
throw new Error("Unsupported unit in value: " + s);
|
|
2399
2399
|
}
|
|
@@ -2467,11 +2467,16 @@ const J = {
|
|
|
2467
2467
|
AUTOCOMPLETE: "autocomplete",
|
|
2468
2468
|
INPUTNUMBER: "input-number",
|
|
2469
2469
|
MONEY: "money",
|
|
2470
|
-
NUMBER: "number"
|
|
2470
|
+
NUMBER: "number",
|
|
2471
|
+
URL: "url",
|
|
2472
|
+
EMAIL: "email",
|
|
2473
|
+
PASSWORD: "password",
|
|
2474
|
+
TEXTAREA: "textarea",
|
|
2475
|
+
TEL: "tel"
|
|
2471
2476
|
};
|
|
2472
2477
|
export {
|
|
2473
2478
|
J as CT,
|
|
2474
|
-
|
|
2479
|
+
Qe as convertToPx,
|
|
2475
2480
|
ul as default,
|
|
2476
2481
|
ge as filterObject,
|
|
2477
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,15 +1,11 @@
|
|
|
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
7
|
"module": "dist/index.es.js",
|
|
8
|
-
"types": "dist/
|
|
9
|
-
"author": {
|
|
10
|
-
"name": "guoyuanchao",
|
|
11
|
-
"email": "xg816620@163.com"
|
|
12
|
-
},
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
13
9
|
"files": [
|
|
14
10
|
"dist"
|
|
15
11
|
],
|
|
@@ -28,9 +24,11 @@
|
|
|
28
24
|
"license": "MIT",
|
|
29
25
|
"devDependencies": {
|
|
30
26
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
27
|
+
"@types/node": "^22.13.5",
|
|
31
28
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
32
29
|
"@vitejs/plugin-vue-jsx": "^4.0.0",
|
|
33
30
|
"@vue/compiler-sfc": "^3.4.29",
|
|
31
|
+
"@vue/runtime-core": "^3.5.13",
|
|
34
32
|
"vite": "^5.3.1",
|
|
35
33
|
"vite-plugin-dts": "^4.5.0",
|
|
36
34
|
"vite-plugin-vue-devtools": "^7.7.2"
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
import { ElDialog, ElDrawer } from 'element-plus';
|
|
3
|
-
import dayjs from 'dayjs';
|
|
4
|
-
|
|
5
|
-
// 定义全局选项类型
|
|
6
|
-
type GlobalOptions = Readonly<Record<string, unknown>>;
|
|
7
|
-
|
|
8
|
-
// 定义模态框属性类型
|
|
9
|
-
interface ModalProps {
|
|
10
|
-
slots?: {
|
|
11
|
-
default?: () => any;
|
|
12
|
-
header?: () => any;
|
|
13
|
-
footer?: () => any;
|
|
14
|
-
};
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// 定义插件安装函数类型
|
|
19
|
-
type InstallFunction = (app: App, options?: GlobalOptions) => void;
|
|
20
|
-
|
|
21
|
-
// 定义默认导出的插件类型
|
|
22
|
-
interface Plugin {
|
|
23
|
-
install: InstallFunction;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// 导出默认插件
|
|
27
|
-
export default Plugin;
|
|
28
|
-
|
|
29
|
-
// 定义创建动态组件函数的类型
|
|
30
|
-
export declare function createDynamicComponent(mode: string): typeof ElDialog | typeof ElDrawer | null;
|
|
31
|
-
|
|
32
|
-
// 定义打开模态框函数的类型
|
|
33
|
-
export declare function openModal(modalProps?: ModalProps, mode?: 'dialog' | 'drawer'): () => void;
|
|
34
|
-
|
|
35
|
-
// 定义转换为像素函数的类型
|
|
36
|
-
export declare function convertToPx(value: string | number, referenceSize?: number): number;
|
|
37
|
-
|
|
38
|
-
// 定义合并对象函数的类型
|
|
39
|
-
export declare function mergeObjects(...objects: Record<string, unknown>[]): Record<string, unknown>;
|
|
40
|
-
|
|
41
|
-
// 定义过滤对象函数的类型
|
|
42
|
-
export declare function filterObject(
|
|
43
|
-
obj: Record<string, unknown>,
|
|
44
|
-
filter?: (key: string, value: unknown) => boolean
|
|
45
|
-
): Record<string, unknown>;
|
|
46
|
-
|
|
47
|
-
// 定义在树形结构中查找标签函数的类型
|
|
48
|
-
export declare function findTreeLabelByValue(
|
|
49
|
-
treeData: Array<Record<string, unknown>>,
|
|
50
|
-
value: unknown,
|
|
51
|
-
valueKey?: string,
|
|
52
|
-
labelKey?: string,
|
|
53
|
-
childrenKey?: string
|
|
54
|
-
): string | null;
|
|
55
|
-
|
|
56
|
-
// 定义金额转中文大写函数的类型
|
|
57
|
-
export declare function moneyToChinese(money: number): string;
|
|
58
|
-
|
|
59
|
-
// 定义格式化金额函数的类型
|
|
60
|
-
export declare function formatAmount(amount: number): string;
|
|
61
|
-
|
|
62
|
-
// 定义 CT 常量类型
|
|
63
|
-
export declare const CT: {
|
|
64
|
-
RADIO: 'radio';
|
|
65
|
-
RADIOBUTTON: 'radio-button';
|
|
66
|
-
CHECKBOX: 'checkbox';
|
|
67
|
-
CHECKBOXGROUP: 'checkbox-group';
|
|
68
|
-
CHECKBOXGROUPBUTTON: 'checkbox-group-button';
|
|
69
|
-
SELECT: 'select';
|
|
70
|
-
TREESELECT: 'tree-select';
|
|
71
|
-
TIME: 'time';
|
|
72
|
-
TIMESELECT: 'time-select';
|
|
73
|
-
DATE: 'date';
|
|
74
|
-
DATETIME: 'datetime';
|
|
75
|
-
COLOR: 'color';
|
|
76
|
-
RATE: 'rate';
|
|
77
|
-
SLIDER: 'slider';
|
|
78
|
-
SWITCH: 'switch';
|
|
79
|
-
TRANSFER: 'transfer';
|
|
80
|
-
CASCADER: 'cascader';
|
|
81
|
-
IMAGE: 'image';
|
|
82
|
-
AUTOCOMPLETE: 'autocomplete';
|
|
83
|
-
INPUTNUMBER: 'input-number';
|
|
84
|
-
MONEY: 'money';
|
|
85
|
-
NUMBER: 'number';
|
|
86
|
-
};
|