vue-2024-ui 0.2.10 → 0.2.11
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 +72 -65
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Qt, { ElForm as
|
|
1
|
+
import Qt, { ElForm as pt, ElButtonGroup as mt, ElButton as Be, ElPopover as $t, ElMessage as Ge, ElMessageBox as qt, ElDialog as Zt, ElDrawer as Jt } from "element-plus";
|
|
2
2
|
import { h as ke, mergeModels as Xe, useModel as Qe, ref as oe, nextTick as at, onMounted as ut, computed as Je, resolveComponent as H, openBlock as p, createElementBlock as I, Fragment as J, createElementVNode as Q, createBlock as B, createCommentVNode as ge, unref as P, mergeProps as O, withCtx as D, renderSlot as M, renderList as N, createTextVNode as Ie, toDisplayString as De, createSlots as ye, createVNode as K, normalizeStyle as qe, normalizeProps as Et, useSlots as At, inject as Mt, useAttrs as Tt, onUnmounted as Kt, withModifiers as yt, resolveDynamicComponent as We, guardReactiveProps as el, Transition as tl, withDirectives as ll, vShow as rl, onBeforeUnmount as al, normalizeClass as Bt, watchEffect as ol, onBeforeMount as nl, watch as ul, createApp as sl } from "vue";
|
|
3
|
-
import { CircleCheck as Ot, Refresh as It, Plus as il, ZoomIn as dl, Delete as Ut, More as cl, Search as fl, Download as Yt, DocumentCopy as
|
|
3
|
+
import { CircleCheck as Ot, Refresh as It, Plus as il, ZoomIn as dl, Delete as Ut, More as cl, Search as fl, Download as Yt, DocumentCopy as vl, View as pl, Edit as ml, CirclePlus as hl, Setting as yl, FullScreen as gl, CopyDocument as bl } from "@element-plus/icons-vue";
|
|
4
4
|
import Rt from "sortablejs";
|
|
5
5
|
import { Dexie as $l } from "dexie";
|
|
6
6
|
var wl = {
|
|
@@ -279,14 +279,14 @@ var Ht = { exports: {} };
|
|
|
279
279
|
return k ? Ee : Ee.endOf(f);
|
|
280
280
|
}, G = function($e, we) {
|
|
281
281
|
return re.w(C.toDate()[$e].apply(C.toDate("s"), (k ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(we)), C);
|
|
282
|
-
},
|
|
282
|
+
}, pe = this.$W, w = this.$M, y = this.$D, ae = "set" + (this.$u ? "UTC" : "");
|
|
283
283
|
switch (U) {
|
|
284
284
|
case _:
|
|
285
285
|
return k ? Z(1, 0) : Z(31, 11);
|
|
286
286
|
case s:
|
|
287
287
|
return k ? Z(1, w) : Z(0, w + 1);
|
|
288
288
|
case i:
|
|
289
|
-
var he = this.$locale().weekStart || 0, be = (
|
|
289
|
+
var he = this.$locale().weekStart || 0, be = (pe < he ? pe + 7 : pe) - he;
|
|
290
290
|
return Z(k ? y - be : y + (6 - be), w);
|
|
291
291
|
case f:
|
|
292
292
|
case V:
|
|
@@ -305,8 +305,8 @@ var Ht = { exports: {} };
|
|
|
305
305
|
}, g.$set = function(u, q) {
|
|
306
306
|
var C, k = re.p(u), U = "set" + (this.$u ? "UTC" : ""), Z = (C = {}, C[f] = U + "Date", C[V] = U + "Date", C[s] = U + "Month", C[_] = U + "FullYear", C[F] = U + "Hours", C[v] = U + "Minutes", C[E] = U + "Seconds", C[o] = U + "Milliseconds", C)[k], G = k === f ? this.$D + (q - this.$W) : q;
|
|
307
307
|
if (k === s || k === _) {
|
|
308
|
-
var
|
|
309
|
-
|
|
308
|
+
var pe = this.clone().set(V, 1);
|
|
309
|
+
pe.$d[Z](G), pe.init(), this.$d = pe.set(V, Math.min(this.$D, pe.daysInMonth())).$d;
|
|
310
310
|
} else Z && this.$d[Z](G);
|
|
311
311
|
return this.init(), this;
|
|
312
312
|
}, g.set = function(u, q) {
|
|
@@ -324,14 +324,14 @@ var Ht = { exports: {} };
|
|
|
324
324
|
if (U === _) return this.set(_, this.$y + u);
|
|
325
325
|
if (U === f) return Z(1);
|
|
326
326
|
if (U === i) return Z(7);
|
|
327
|
-
var G = (C = {}, C[v] = t, C[F] = e, C[E] = r, C)[U] || 1,
|
|
328
|
-
return re.w(
|
|
327
|
+
var G = (C = {}, C[v] = t, C[F] = e, C[E] = r, C)[U] || 1, pe = this.$d.getTime() + u * G;
|
|
328
|
+
return re.w(pe, this);
|
|
329
329
|
}, g.subtract = function(u, q) {
|
|
330
330
|
return this.add(-1 * u, q);
|
|
331
331
|
}, g.format = function(u) {
|
|
332
332
|
var q = this, C = this.$locale();
|
|
333
333
|
if (!this.isValid()) return C.invalidDate || j;
|
|
334
|
-
var k = u || "YYYY-MM-DDTHH:mm:ssZ", U = re.z(this), Z = this.$H, G = this.$m,
|
|
334
|
+
var k = u || "YYYY-MM-DDTHH:mm:ssZ", U = re.z(this), Z = this.$H, G = this.$m, pe = this.$M, w = C.weekdays, y = C.months, ae = C.meridiem, he = function(we, Ee, Me, xe) {
|
|
335
335
|
return we && (we[Ee] || we(q, k)) || Me[Ee].slice(0, xe);
|
|
336
336
|
}, be = function(we) {
|
|
337
337
|
return re.s(Z % 12 || 12, we, "0");
|
|
@@ -347,13 +347,13 @@ var Ht = { exports: {} };
|
|
|
347
347
|
case "YYYY":
|
|
348
348
|
return re.s(q.$y, 4, "0");
|
|
349
349
|
case "M":
|
|
350
|
-
return
|
|
350
|
+
return pe + 1;
|
|
351
351
|
case "MM":
|
|
352
|
-
return re.s(
|
|
352
|
+
return re.s(pe + 1, 2, "0");
|
|
353
353
|
case "MMM":
|
|
354
|
-
return he(C.monthsShort,
|
|
354
|
+
return he(C.monthsShort, pe, y, 3);
|
|
355
355
|
case "MMMM":
|
|
356
|
-
return he(y,
|
|
356
|
+
return he(y, pe);
|
|
357
357
|
case "D":
|
|
358
358
|
return q.$D;
|
|
359
359
|
case "DD":
|
|
@@ -397,7 +397,7 @@ var Ht = { exports: {} };
|
|
|
397
397
|
}, g.utcOffset = function() {
|
|
398
398
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
399
399
|
}, g.diff = function(u, q, C) {
|
|
400
|
-
var k, U = this, Z = re.p(q), G = ne(u),
|
|
400
|
+
var k, U = this, Z = re.p(q), G = ne(u), pe = (G.utcOffset() - this.utcOffset()) * t, w = this - G, y = function() {
|
|
401
401
|
return re.m(U, G);
|
|
402
402
|
};
|
|
403
403
|
switch (Z) {
|
|
@@ -411,10 +411,10 @@ var Ht = { exports: {} };
|
|
|
411
411
|
k = y() / 3;
|
|
412
412
|
break;
|
|
413
413
|
case i:
|
|
414
|
-
k = (w -
|
|
414
|
+
k = (w - pe) / 6048e5;
|
|
415
415
|
break;
|
|
416
416
|
case f:
|
|
417
|
-
k = (w -
|
|
417
|
+
k = (w - pe) / 864e5;
|
|
418
418
|
break;
|
|
419
419
|
case F:
|
|
420
420
|
k = w / e;
|
|
@@ -521,7 +521,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
521
521
|
}),
|
|
522
522
|
emits: ["update:modelValue"],
|
|
523
523
|
setup(a) {
|
|
524
|
-
var Oe, T, $, g, u, q, C, k, U, Z, G,
|
|
524
|
+
var Oe, T, $, g, u, q, C, k, U, Z, G, pe;
|
|
525
525
|
const n = Qe(a, "modelValue"), r = a, t = oe(r.item || {}), e = oe(r.ctrlKey), o = oe(r.ctrlType), E = oe(r.model), v = oe([]), F = oe([]), f = oe(!1), i = oe(!1);
|
|
526
526
|
!((Oe = o.value) != null && Oe.startsWith("text")) && !((T = o.value) != null && T.startsWith("link")) && !(($ = o.value) != null && $.startsWith("tag")) && !((g = o.value) != null && g.startsWith("div")) && !((u = o.value) != null && u.startsWith("span")) && !((q = o.value) != null && q.startsWith("avatar")) && ((C = t.value) != null && C.style || (t.value.style = { width: ((U = (k = t.value) == null ? void 0 : k.style) == null ? void 0 : U.width) || "100%" }));
|
|
527
527
|
const s = oe({ display: "flex", flex: 1 }), c = r.t === "t" ? "center" : "flex-start", _ = ((Z = t.value) == null ? void 0 : Z.style) || {};
|
|
@@ -533,7 +533,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
533
533
|
multiple: !1,
|
|
534
534
|
"show-file-list": !1,
|
|
535
535
|
"file-list": [],
|
|
536
|
-
showDel: (G = t.value) != null && G.showDel ? (
|
|
536
|
+
showDel: (G = t.value) != null && G.showDel ? (pe = t.value) == null ? void 0 : pe.showDel : r.t !== "t"
|
|
537
537
|
}), R = oe(t.value.innerHtml), L = (w) => [
|
|
538
538
|
"year",
|
|
539
539
|
"years",
|
|
@@ -646,7 +646,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
646
646
|
});
|
|
647
647
|
return (w, y) => {
|
|
648
648
|
var nt, z, se, x, X, ee, je, Ne, ze, Pe;
|
|
649
|
-
const ae = H("el-image-viewer"), he = H("el-radio"), be = H("el-radio-group"), $e = H("el-radio-button"), we = H("el-checkbox"), Ee = H("el-checkbox-group"), Me = H("el-checkbox-button"), xe = H("g-select-option"), Ye = H("el-option"), st = H("el-select"), it = H("el-tree-select"), dt = H("el-time-picker"), ct = H("el-time-select"), ft = H("el-date-picker"),
|
|
649
|
+
const ae = H("el-image-viewer"), he = H("el-radio"), be = H("el-radio-group"), $e = H("el-radio-button"), we = H("el-checkbox"), Ee = H("el-checkbox-group"), Me = H("el-checkbox-button"), xe = H("g-select-option"), Ye = H("el-option"), st = H("el-select"), it = H("el-tree-select"), dt = H("el-time-picker"), ct = H("el-time-select"), ft = H("el-date-picker"), vt = H("el-color-picker"), l = H("el-rate"), d = H("el-slider"), m = H("el-switch"), b = H("el-transfer"), A = H("el-cascader"), Y = H("el-icon"), W = H("el-image"), fe = H("el-tooltip"), _e = H("el-upload"), Fe = H("el-autocomplete"), Re = H("el-input-number"), Le = H("el-input"), He = H("el-link"), et = H("el-text"), ot = H("el-avatar"), tt = H("el-tag");
|
|
650
650
|
return p(), I(J, null, [
|
|
651
651
|
Q("div", null, [
|
|
652
652
|
f.value ? (p(), B(ae, {
|
|
@@ -773,7 +773,8 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
773
773
|
fn: D((rt) => [
|
|
774
774
|
M(w.$slots, lt, {
|
|
775
775
|
option: h,
|
|
776
|
-
data: rt
|
|
776
|
+
data: rt,
|
|
777
|
+
form: a.formInfo
|
|
777
778
|
}, void 0, !0)
|
|
778
779
|
])
|
|
779
780
|
}))
|
|
@@ -812,7 +813,8 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
812
813
|
fn: D((Xt) => [
|
|
813
814
|
M(w.$slots, rt, {
|
|
814
815
|
option: S,
|
|
815
|
-
data: Xt
|
|
816
|
+
data: Xt,
|
|
817
|
+
form: a.formInfo
|
|
816
818
|
}, void 0, !0)
|
|
817
819
|
])
|
|
818
820
|
}))
|
|
@@ -852,7 +854,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
852
854
|
N(V(), (h) => ({
|
|
853
855
|
name: h,
|
|
854
856
|
fn: D((S) => [
|
|
855
|
-
M(w.$slots, `${r.t}-${e.value}-${h}`, {
|
|
857
|
+
M(w.$slots, `${r.t}-${e.value}-${h}`, { form: a.formInfo }, void 0, !0)
|
|
856
858
|
])
|
|
857
859
|
}))
|
|
858
860
|
]), 1040, ["modelValue", "placeholder"])) : o.value == P(Se).TREESELECT ? (p(), B(it, O({
|
|
@@ -896,7 +898,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
896
898
|
M(w.$slots, `${r.t}-${e.value}-${h}`, { data: S }, void 0, !0)
|
|
897
899
|
])
|
|
898
900
|
}))
|
|
899
|
-
]), 1040, ["modelValue", "type", "placeholder", "value-format"])) : o.value == P(Se).COLOR ? (p(), B(
|
|
901
|
+
]), 1040, ["modelValue", "type", "placeholder", "value-format"])) : o.value == P(Se).COLOR ? (p(), B(vt, O({
|
|
900
902
|
key: 10,
|
|
901
903
|
modelValue: n.value,
|
|
902
904
|
"onUpdate:modelValue": y[12] || (y[12] = (h) => n.value = h)
|
|
@@ -1195,7 +1197,10 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1195
1197
|
N(V(), (h, S) => ({
|
|
1196
1198
|
name: h,
|
|
1197
1199
|
fn: D((ue) => [
|
|
1198
|
-
M(w.$slots, `${r.t}-${e.value}-${h}`, {
|
|
1200
|
+
M(w.$slots, `${r.t}-${e.value}-${h}`, {
|
|
1201
|
+
data: ue,
|
|
1202
|
+
form: a.formInfo
|
|
1203
|
+
}, void 0, !0)
|
|
1199
1204
|
])
|
|
1200
1205
|
}))
|
|
1201
1206
|
]), 1040, ["modelValue", "placeholder", "maxlength"]))
|
|
@@ -1203,7 +1208,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1203
1208
|
], 64);
|
|
1204
1209
|
};
|
|
1205
1210
|
}
|
|
1206
|
-
}), bt = /* @__PURE__ */ Ze(Al, [["__scopeId", "data-v-
|
|
1211
|
+
}), bt = /* @__PURE__ */ Ze(Al, [["__scopeId", "data-v-5ca81db3"]]), Bl = { class: "g-form-container" }, Ol = /* @__PURE__ */ Object.assign({
|
|
1207
1212
|
name: "g-form",
|
|
1208
1213
|
inheritAttrs: !1
|
|
1209
1214
|
}, {
|
|
@@ -1424,7 +1429,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1424
1429
|
reset: s,
|
|
1425
1430
|
formData: v
|
|
1426
1431
|
}), (T, $) => {
|
|
1427
|
-
var Z, G,
|
|
1432
|
+
var Z, G, pe;
|
|
1428
1433
|
const g = H("el-form-item"), u = H("el-col"), q = H("el-tab-pane"), C = H("el-tabs"), k = H("el-form"), U = H("el-button");
|
|
1429
1434
|
return p(), I("div", Bl, [
|
|
1430
1435
|
K(k, O(
|
|
@@ -1478,7 +1483,8 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1478
1483
|
M(T.$slots, "f-" + y.key, {
|
|
1479
1484
|
item: y == null ? void 0 : y.item,
|
|
1480
1485
|
formInfo: v.value,
|
|
1481
|
-
model: t.value
|
|
1486
|
+
model: t.value,
|
|
1487
|
+
form: v.value
|
|
1482
1488
|
}, () => [
|
|
1483
1489
|
(p(), B(bt, {
|
|
1484
1490
|
modelValue: v.value[y.key],
|
|
@@ -1544,7 +1550,8 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1544
1550
|
M(T.$slots, "f-" + y, {
|
|
1545
1551
|
item: w,
|
|
1546
1552
|
formInfo: v.value,
|
|
1547
|
-
model: t.value
|
|
1553
|
+
model: t.value,
|
|
1554
|
+
form: v.value
|
|
1548
1555
|
}, () => [
|
|
1549
1556
|
(p(), B(bt, {
|
|
1550
1557
|
modelValue: v.value[y],
|
|
@@ -1581,7 +1588,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1581
1588
|
]),
|
|
1582
1589
|
_: 3
|
|
1583
1590
|
}, 16, ["model"]),
|
|
1584
|
-
(
|
|
1591
|
+
(pe = (G = (Z = t.value) == null ? void 0 : Z.form) == null ? void 0 : G.footer) != null && pe.hidden ? ge("", !0) : M(T.$slots, "f-footer", { key: 0 }, () => [
|
|
1585
1592
|
Q("div", {
|
|
1586
1593
|
style: qe(t.value.form.footer.style)
|
|
1587
1594
|
}, [
|
|
@@ -1606,7 +1613,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1606
1613
|
]);
|
|
1607
1614
|
};
|
|
1608
1615
|
}
|
|
1609
|
-
}), _t = /* @__PURE__ */ Ze(Ol, [["__scopeId", "data-v-
|
|
1616
|
+
}), _t = /* @__PURE__ */ Ze(Ol, [["__scopeId", "data-v-d68f3861"]]), Ft = {
|
|
1610
1617
|
__name: "g-query-item",
|
|
1611
1618
|
props: /* @__PURE__ */ Xe(["more"], {
|
|
1612
1619
|
modelValue: { required: !0 },
|
|
@@ -1819,7 +1826,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1819
1826
|
},
|
|
1820
1827
|
label: r.value.query.more.label,
|
|
1821
1828
|
sort: r.value.query.more.sort || 0,
|
|
1822
|
-
content: r.value.query.more.mode === 3 ? () => ke(
|
|
1829
|
+
content: r.value.query.more.mode === 3 ? () => ke(pt, {
|
|
1823
1830
|
class: "query-form",
|
|
1824
1831
|
...Ue(r.value.query, (le) => !["query", "more", "reset"].includes(le))
|
|
1825
1832
|
}, () => i({ slots: s }, !0)) : null
|
|
@@ -1841,7 +1848,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1841
1848
|
class: "g-query-container",
|
|
1842
1849
|
style: qe({ ..._.value, ...((me = (te = r.value.query) == null ? void 0 : te.container) == null ? void 0 : me.style) || {} })
|
|
1843
1850
|
}, [
|
|
1844
|
-
K(P(
|
|
1851
|
+
K(P(pt), O({
|
|
1845
1852
|
onSubmit: j[0] || (j[0] = yt(() => {
|
|
1846
1853
|
}, ["prevent"]))
|
|
1847
1854
|
}, P(Ue)(r.value.query, (k) => !["query", "more", "reset", "btns"].includes(k))), {
|
|
@@ -1851,7 +1858,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1851
1858
|
(p(), B(We(i({ slots: V.$slots }, void 0)))),
|
|
1852
1859
|
((U = (k = r.value.query) == null ? void 0 : k.container) == null ? void 0 : U.inline) === !0 ? (p(), B(R, { key: 0 }, {
|
|
1853
1860
|
default: D(() => {
|
|
1854
|
-
var Z, G,
|
|
1861
|
+
var Z, G, pe, w, y;
|
|
1855
1862
|
return [
|
|
1856
1863
|
Q("div", {
|
|
1857
1864
|
style: qe((G = (Z = r.value.query) == null ? void 0 : Z.btns) == null ? void 0 : G.style)
|
|
@@ -1865,7 +1872,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1865
1872
|
]),
|
|
1866
1873
|
_: 3
|
|
1867
1874
|
})) : (p(), I(J, { key: 1 }, [
|
|
1868
|
-
(y = (w = (
|
|
1875
|
+
(y = (w = (pe = r.value) == null ? void 0 : pe.query) == null ? void 0 : w.btns) != null && y.group ? (p(), B(P(mt), { key: 0 }, {
|
|
1869
1876
|
default: D(() => [
|
|
1870
1877
|
(p(!0), I(J, null, N(c(), (ae) => M(V.$slots, ae.props.slot, {}, () => [
|
|
1871
1878
|
(p(), B(We(ae)))
|
|
@@ -1921,7 +1928,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1921
1928
|
"show-close": !1
|
|
1922
1929
|
}, r.value.query.more.dialog), ye({
|
|
1923
1930
|
default: D(() => [
|
|
1924
|
-
K(P(
|
|
1931
|
+
K(P(pt), O({
|
|
1925
1932
|
onSubmit: j[3] || (j[3] = yt(() => {
|
|
1926
1933
|
}, ["prevent"]))
|
|
1927
1934
|
}, P(Ue)(r.value.query, (k) => !["query", "more", "reset"].includes(k)), { style: { width: "98%" } }), {
|
|
@@ -1981,7 +1988,7 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
1981
1988
|
return [
|
|
1982
1989
|
o.value && !((Z = (U = (k = r.value) == null ? void 0 : k.query) == null ? void 0 : U.more) != null && Z.hidden) && r.value.query.more.mode == 1 ? (p(), I("div", Il, [
|
|
1983
1990
|
Q("div", Ul, [
|
|
1984
|
-
r.value.query.more.mode == 1 ? ll((p(), B(P(
|
|
1991
|
+
r.value.query.more.mode == 1 ? ll((p(), B(P(pt), O({
|
|
1985
1992
|
key: 0,
|
|
1986
1993
|
onSubmit: j[7] || (j[7] = yt(() => {
|
|
1987
1994
|
}, ["prevent"]))
|
|
@@ -2104,8 +2111,8 @@ const wt = /* @__PURE__ */ Lt(_l), zt = {
|
|
|
2104
2111
|
]);
|
|
2105
2112
|
};
|
|
2106
2113
|
}
|
|
2107
|
-
}, Gl = /* @__PURE__ */ Ze(Wl, [["__scopeId", "data-v-630c4ced"]]), Xl = "vue-gyc-ui", Ql = 1,
|
|
2108
|
-
|
|
2114
|
+
}, Gl = /* @__PURE__ */ Ze(Wl, [["__scopeId", "data-v-630c4ced"]]), Xl = "vue-gyc-ui", Ql = 1, ve = new $l(Xl);
|
|
2115
|
+
ve.version(Ql).stores({
|
|
2109
2116
|
// 记录表格项设置信息
|
|
2110
2117
|
tableWidths: "++id, [page+key], page, key,width",
|
|
2111
2118
|
// 记录表格分页条数
|
|
@@ -2121,8 +2128,8 @@ const Ke = (a, n) => {
|
|
|
2121
2128
|
};
|
|
2122
2129
|
async function ht(a, n, r) {
|
|
2123
2130
|
try {
|
|
2124
|
-
const t = await
|
|
2125
|
-
t ? r === "add" ? t.keys.includes(n) || (t.keys.push(n), await
|
|
2131
|
+
const t = await ve.tableColsState.where({ page: a }).first();
|
|
2132
|
+
t ? r === "add" ? t.keys.includes(n) || (t.keys.push(n), await ve.tableColsState.put(t)) : r === "del" ? (t.keys = t.keys.filter((e) => e !== n), await ve.tableColsState.put(t)) : r === "delAll" ? (t.keys = n, await ve.tableColsState.put(t)) : r === "selectAll" && await ve.tableColsState.where({ page: a }).delete() : r === "add" ? await ve.tableColsState.add({ page: a, keys: [n] }) : r === "delAll" && await ve.tableColsState.add({ page: a, keys: n });
|
|
2126
2133
|
} catch (t) {
|
|
2127
2134
|
throw console.error(`处理表格列状态时出错 (page: ${a}, key: ${n}, state: ${r}):`, t), t;
|
|
2128
2135
|
}
|
|
@@ -2130,8 +2137,8 @@ async function ht(a, n, r) {
|
|
|
2130
2137
|
async function Zl(a, n, r) {
|
|
2131
2138
|
Ke(a);
|
|
2132
2139
|
try {
|
|
2133
|
-
const t = await
|
|
2134
|
-
return t ? (await
|
|
2140
|
+
const t = await ve.tableWidths.where({ page: a, key: n }).first();
|
|
2141
|
+
return t ? (await ve.tableWidths.put({ ...t, width: r }), "update success") : (await ve.tableWidths.add({ page: a, key: n, width: r }), "add success");
|
|
2135
2142
|
} catch (t) {
|
|
2136
2143
|
throw console.error(`保存表格项设置信息时出错 (page: ${a}, key: ${n}):`, t), t;
|
|
2137
2144
|
}
|
|
@@ -2139,7 +2146,7 @@ async function Zl(a, n, r) {
|
|
|
2139
2146
|
async function Jl(a) {
|
|
2140
2147
|
Ke(a);
|
|
2141
2148
|
try {
|
|
2142
|
-
return await
|
|
2149
|
+
return await ve.tableWidths.where({ page: a }).toArray();
|
|
2143
2150
|
} catch (n) {
|
|
2144
2151
|
throw console.error(`获取表格项设置信息时出错 (page: ${a}):`, n), n;
|
|
2145
2152
|
}
|
|
@@ -2147,7 +2154,7 @@ async function Jl(a) {
|
|
|
2147
2154
|
async function Kl(a) {
|
|
2148
2155
|
Ke(a);
|
|
2149
2156
|
try {
|
|
2150
|
-
const n = await
|
|
2157
|
+
const n = await ve.tableColsState.where({ page: a }).toArray();
|
|
2151
2158
|
return !n || n.length === 0 ? [] : n[0].keys;
|
|
2152
2159
|
} catch (n) {
|
|
2153
2160
|
throw console.error(`获取表格列状态时出错 (page: ${a}):`, n), n;
|
|
@@ -2156,12 +2163,12 @@ async function Kl(a) {
|
|
|
2156
2163
|
async function er(a) {
|
|
2157
2164
|
Ke(a);
|
|
2158
2165
|
try {
|
|
2159
|
-
return await
|
|
2166
|
+
return await ve.transaction("rw", ve.tableWidths, ve.pageInfo, ve.sorts, ve.tableColsState, async () => {
|
|
2160
2167
|
await Promise.all([
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2168
|
+
ve.tableWidths.where({ page: a }).delete(),
|
|
2169
|
+
ve.pageInfo.where({ page: a }).delete(),
|
|
2170
|
+
ve.sorts.where({ page: a }).delete(),
|
|
2171
|
+
ve.tableColsState.where({ page: a }).delete()
|
|
2165
2172
|
]);
|
|
2166
2173
|
});
|
|
2167
2174
|
} catch (n) {
|
|
@@ -2171,8 +2178,8 @@ async function er(a) {
|
|
|
2171
2178
|
async function tr({ page: a, size: n }) {
|
|
2172
2179
|
Ke(a);
|
|
2173
2180
|
try {
|
|
2174
|
-
const r = await
|
|
2175
|
-
return r ? (await
|
|
2181
|
+
const r = await ve.pageInfo.where({ page: a }).first();
|
|
2182
|
+
return r ? (await ve.pageInfo.put({ ...r, size: n }), "update success") : (await ve.pageInfo.add({ page: a, size: n }), "add success");
|
|
2176
2183
|
} catch (r) {
|
|
2177
2184
|
throw console.error(`保存分页条数时出错 (page: ${a}):`, r), r;
|
|
2178
2185
|
}
|
|
@@ -2180,7 +2187,7 @@ async function tr({ page: a, size: n }) {
|
|
|
2180
2187
|
async function lr(a) {
|
|
2181
2188
|
Ke(a);
|
|
2182
2189
|
try {
|
|
2183
|
-
const n = await
|
|
2190
|
+
const n = await ve.pageInfo.where({ page: a }).first();
|
|
2184
2191
|
return (n == null ? void 0 : n.size) || 20;
|
|
2185
2192
|
} catch (n) {
|
|
2186
2193
|
throw console.error(`获取分页条数时出错 (page: ${a}):`, n), n;
|
|
@@ -2189,8 +2196,8 @@ async function lr(a) {
|
|
|
2189
2196
|
async function rr(a, n) {
|
|
2190
2197
|
Ke(a);
|
|
2191
2198
|
try {
|
|
2192
|
-
const r = await
|
|
2193
|
-
return r ? (await
|
|
2199
|
+
const r = await ve.sorts.where({ page: a }).first();
|
|
2200
|
+
return r ? (await ve.sorts.put({ ...r, keys: n }), "update success") : (await ve.sorts.add({ page: a, keys: n }), "add success");
|
|
2194
2201
|
} catch (r) {
|
|
2195
2202
|
throw console.error(`保存表格字段顺序时出错 (page: ${a}):`, r), r;
|
|
2196
2203
|
}
|
|
@@ -2198,7 +2205,7 @@ async function rr(a, n) {
|
|
|
2198
2205
|
async function ar(a) {
|
|
2199
2206
|
Ke(a);
|
|
2200
2207
|
try {
|
|
2201
|
-
const n = await
|
|
2208
|
+
const n = await ve.sorts.where({ page: a }).first();
|
|
2202
2209
|
return (n == null ? void 0 : n.keys) || [];
|
|
2203
2210
|
} catch (n) {
|
|
2204
2211
|
throw console.error(`获取表格字段顺序时出错 (page: ${a}):`, n), n;
|
|
@@ -2370,13 +2377,13 @@ const or = {
|
|
|
2370
2377
|
onClick: r,
|
|
2371
2378
|
title: "复制内容"
|
|
2372
2379
|
}, [
|
|
2373
|
-
K(P(
|
|
2380
|
+
K(P(vl))
|
|
2374
2381
|
])
|
|
2375
2382
|
]),
|
|
2376
2383
|
Q("div", cr, De(n.content), 1)
|
|
2377
2384
|
], 4));
|
|
2378
2385
|
}
|
|
2379
|
-
},
|
|
2386
|
+
}, vr = /* @__PURE__ */ Ze(fr, [["__scopeId", "data-v-f28912da"]]);
|
|
2380
2387
|
var Pt = { exports: {} }, jt = { exports: {} };
|
|
2381
2388
|
(function() {
|
|
2382
2389
|
var a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = {
|
|
@@ -2443,7 +2450,7 @@ var Pt = { exports: {} }, jt = { exports: {} };
|
|
|
2443
2450
|
};
|
|
2444
2451
|
jt.exports = n;
|
|
2445
2452
|
})();
|
|
2446
|
-
var
|
|
2453
|
+
var pr = jt.exports, kt = {
|
|
2447
2454
|
// UTF-8 encoding
|
|
2448
2455
|
utf8: {
|
|
2449
2456
|
// Convert a string to a byte array
|
|
@@ -2487,7 +2494,7 @@ function hr(a) {
|
|
|
2487
2494
|
return typeof a.readFloatLE == "function" && typeof a.slice == "function" && Nt(a.slice(0, 0));
|
|
2488
2495
|
}
|
|
2489
2496
|
(function() {
|
|
2490
|
-
var a =
|
|
2497
|
+
var a = pr, n = xt.utf8, r = mr, t = xt.bin, e = function(o, E) {
|
|
2491
2498
|
o.constructor == String ? E && E.encoding === "binary" ? o = t.stringToBytes(o) : o = n.stringToBytes(o) : r(o) ? o = Array.prototype.slice.call(o, 0) : !Array.isArray(o) && o.constructor !== Uint8Array && (o = o.toString());
|
|
2492
2499
|
for (var v = a.bytesToWords(o), F = o.length * 8, f = 1732584193, i = -271733879, s = -1732584194, c = 271733878, _ = 0; _ < v.length; _++)
|
|
2493
2500
|
v[_] = (v[_] << 8 | v[_] >>> 24) & 16711935 | (v[_] << 24 | v[_] >>> 8) & 4278255360;
|
|
@@ -2543,7 +2550,7 @@ const gr = /* @__PURE__ */ Lt(yr), br = { key: 0 }, $r = { style: { display: "fl
|
|
|
2543
2550
|
"row-save"
|
|
2544
2551
|
], ["update:modelValue"]),
|
|
2545
2552
|
setup(a, { expose: n, emit: r }) {
|
|
2546
|
-
var Ye, st, it, dt, ct, ft,
|
|
2553
|
+
var Ye, st, it, dt, ct, ft, vt;
|
|
2547
2554
|
const t = r, e = Qe(a, "modelValue"), o = Mt("options"), E = oe({}), v = oe(null), F = oe(null), f = Object.entries(e.value).filter(([l, d]) => (d == null ? void 0 : d.search) !== void 0).map(([l, d]) => [l, d.value]);
|
|
2548
2555
|
E.value = Object.fromEntries(f);
|
|
2549
2556
|
const i = oe(!1), s = [
|
|
@@ -2663,7 +2670,7 @@ const gr = /* @__PURE__ */ Lt(yr), br = { key: 0 }, $r = { style: { display: "fl
|
|
|
2663
2670
|
text: !0,
|
|
2664
2671
|
type: "success",
|
|
2665
2672
|
mode: "dialog",
|
|
2666
|
-
icon: () => ke(
|
|
2673
|
+
icon: () => ke(pl),
|
|
2667
2674
|
auth: () => {
|
|
2668
2675
|
var A;
|
|
2669
2676
|
return !(((A = b == null ? void 0 : b.control) == null ? void 0 : A.add(b).inline) === !0 && m === 0);
|
|
@@ -2782,7 +2789,7 @@ const gr = /* @__PURE__ */ Lt(yr), br = { key: 0 }, $r = { style: { display: "fl
|
|
|
2782
2789
|
"min-width": 100,
|
|
2783
2790
|
align: "center",
|
|
2784
2791
|
formatter: (l, d, m, b) => m,
|
|
2785
|
-
"tooltip-formatter": ({ row: l, column: d, cellValue: m }) => ke(
|
|
2792
|
+
"tooltip-formatter": ({ row: l, column: d, cellValue: m }) => ke(vr, { content: m, column: d })
|
|
2786
2793
|
};
|
|
2787
2794
|
e.value.tableColumns = Ve(
|
|
2788
2795
|
Ce,
|
|
@@ -2829,7 +2836,7 @@ const gr = /* @__PURE__ */ Lt(yr), br = { key: 0 }, $r = { style: { display: "fl
|
|
|
2829
2836
|
e.value.dialog = Ve(
|
|
2830
2837
|
le,
|
|
2831
2838
|
o == null ? void 0 : o.dialog,
|
|
2832
|
-
(
|
|
2839
|
+
(vt = e.value) == null ? void 0 : vt.dialog
|
|
2833
2840
|
);
|
|
2834
2841
|
const ne = (l, d) => {
|
|
2835
2842
|
let m = d;
|
|
@@ -2978,7 +2985,7 @@ const gr = /* @__PURE__ */ Lt(yr), br = { key: 0 }, $r = { style: { display: "fl
|
|
|
2978
2985
|
},
|
|
2979
2986
|
l.control.setting(l).mode
|
|
2980
2987
|
);
|
|
2981
|
-
}, G = e.value.control,
|
|
2988
|
+
}, G = e.value.control, pe = [
|
|
2982
2989
|
{ type: "add", func: T },
|
|
2983
2990
|
{ type: "download", func: U },
|
|
2984
2991
|
{ type: "setting", func: Z },
|
|
@@ -2986,7 +2993,7 @@ const gr = /* @__PURE__ */ Lt(yr), br = { key: 0 }, $r = { style: { display: "fl
|
|
|
2986
2993
|
{ type: "edit", func: $ },
|
|
2987
2994
|
{ type: "delete", func: g },
|
|
2988
2995
|
{ type: "save", func: q }
|
|
2989
|
-
], w = (l, d, m, b, A) =>
|
|
2996
|
+
], w = (l, d, m, b, A) => pe.filter((Y) => l.includes(Y.type)).map(({ type: Y, func: W }) => {
|
|
2990
2997
|
var fe, _e, Fe;
|
|
2991
2998
|
return {
|
|
2992
2999
|
name: `control-${Y}`,
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.custom-upload[data-v-
|
|
1
|
+
.custom-upload[data-v-5ca81db3]{--up-width: 100px;--up-height: 100px;--up-font-size: 18px}[data-v-5ca81db3] .custom-upload img{width:100%;height:100%}[data-v-5ca81db3] .custom-upload .el-upload--picture-card,[data-v-5ca81db3] .custom-upload .el-upload-dragger,[data-v-5ca81db3] .custom-upload .el-upload-list__item{width:var(--up-width);height:var(--up-height);line-height:var(--up-height);box-sizing:border-box}[data-v-5ca81db3] .custom-upload .el-upload-dragger{display:flex;align-items:center;justify-content:center;border:1px dashed var(--el-border-color);border-radius:6px;background-color:var(--el-fill-color-light);transition:border-color .3s}[data-v-5ca81db3] .custom-upload .el-upload-dragger:hover{border-color:var(--el-color-primary)}[data-v-5ca81db3] .custom-upload .el-icon{font-size:var(--up-font-size)}.up-view[data-v-5ca81db3]:hover{background-color:#0003}.g-form-container[data-v-d68f3861]{width:100%;display:flex;flex-direction:column}.g-query-container[data-v-3f2b77d6]{position:relative;display:flex;flex:1;flex-direction:column;padding:10px;box-sizing:border-box}.outer[data-v-3f2b77d6]{min-height:100px;border-radius:4px;background-color:var(--el-bg-color);top:60px;padding-top:10px;width:100%;box-sizing:border-box}.inner[data-v-3f2b77d6]{border-radius:4px;min-height:100px;border:1px solid var(--el-border-color);padding:18px 18px 0;box-sizing:border-box;width:100%;background-color:var(--el-bg-color)}.nested-enter-active[data-v-3f2b77d6],.nested-leave-active[data-v-3f2b77d6]{transition:all .3s ease-in-out}.nested-leave-active[data-v-3f2b77d6]{transition-delay:.25s}.nested-enter-from[data-v-3f2b77d6],.nested-leave-to[data-v-3f2b77d6]{transform:translateY(-100px);opacity:0}.nested-enter-active .inner[data-v-3f2b77d6],.nested-leave-active .inner[data-v-3f2b77d6]{transition:all .3s ease-in-out}.nested-enter-active .inner[data-v-3f2b77d6]{transition-delay:.25s}.nested-enter-from .inner[data-v-3f2b77d6],.nested-leave-to .inner[data-v-3f2b77d6]{transform:translateY(-100px);opacity:.001}.query-form[data-v-3f2b77d6]{padding:20px;background-color:var(--el-bg-color);border:1px solid var(--el-border-color);margin:5px;border-radius:4px}.check-box-hover[data-v-630c4ced]:hover,.check-box-hover[data-v-adb08f30]:hover{background:var(--el-border-color)}.allcheck a[data-v-adb08f30]{cursor:pointer}.filtered[data-v-adb08f30]{pointer-events:none}.g-cell-toopTip[data-v-f28912da]{max-height:400px;border-radius:var(--el-border-radius-base);padding:12px;transition:all .3s ease}.g-cell-toopTip .title[data-v-f28912da]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;height:24px;border-bottom:1px solid var(--el-border-color)}.g-cell-toopTip .title .title-text[data-v-f28912da]{font-weight:700;line-height:24px}.g-cell-toopTip .content[data-v-f28912da]{max-height:300px;overflow-y:auto;line-height:1.5;padding:4px 0}.copy-btn[data-v-f28912da]{width:16px;height:16px;cursor:pointer}.copy-btn[data-v-f28912da]:hover{color:var(--el-color-success)}.control .el-button[data-v-de570478]{padding:0 3px;margin:0 3px}.g-table-container[data-v-de570478]{margin:0;padding:0;width:100%;height:100%}.table-query-container[data-v-de570478]{background-color:var(--el-bg-color);margin-bottom:10px;border:1px solid var(--el-border-color-lighter)}.table-container[data-v-de570478]{box-sizing:border-box;background-color:var(--el-bg-color)}.max[data-v-de570478]{cursor:pointer;color:var(--el-text-color)}.max[data-v-de570478]:hover{color:var(--el-color-primary)}.btns[data-v-de570478]{display:flex}[data-v-de570478] .drag-dialog{resize:both;overflow:auto}[data-v-de570478] .el-dialog__header,[data-v-de570478] .el-dialog__body{pointer-events:auto!important}.g-tree-table[data-v-c888e4fc]{width:100%;display:flex;box-sizing:border-box}.g-tree-container[data-v-c888e4fc]{display:flex;width:100%;box-sizing:border-box;border-radius:4px;overflow:auto;height:100%;border:1px solid var(--el-border-color-lighter)}.g-tree-table-container[data-v-c888e4fc]{display:flex;flex:1;overflow:auto}.g-tree-left[data-v-c888e4fc]{display:flex;flex-direction:column;box-sizing:border-box;margin-right:10px;overflow:auto}.op-group[data-v-c0ac6b77]{display:flex;justify-content:space-between;align-items:center;font-weight:700;color:#fff;padding:5px 25px;box-sizing:border-box;background-color:var(--el-color-primary-light-3)}.op-items[data-v-c0ac6b77]{display:flex;justify-content:space-between;align-items:center;color:#666;margin-left:12px}.op-items span[data-v-c0ac6b77]{background-color:var(--el-color-primary-light-7);border-radius:3px;margin:2px 2px 0 0;display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
|