@bscjc/webui 1.2.1 → 1.2.2
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/es/index.mjs +68 -68
- package/dist/lib/index.cjs +1 -1
- package/package.json +2 -2
package/dist/es/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nextTick as G, pushScopeId as Ar, popScopeId as wr, withScopeId as Sr, createBlock as X, openBlock as P, markRaw as $r, shallowReactive as Cr, resolveComponent as Ce, resolveDirective as xr, withDirectives as Oe, createElementBlock as J, normalizeClass as Ht, createCommentVNode as ue, createVNode as F, renderSlot as le, resolveDynamicComponent as qt, normalizeStyle as xt, withCtx as I, Fragment as
|
|
1
|
+
import { nextTick as G, pushScopeId as Ar, popScopeId as wr, withScopeId as Sr, createBlock as X, openBlock as P, markRaw as $r, shallowReactive as Cr, resolveComponent as Ce, resolveDirective as xr, withDirectives as Oe, createElementBlock as J, normalizeClass as Ht, createCommentVNode as ue, createVNode as F, renderSlot as le, resolveDynamicComponent as qt, normalizeStyle as xt, withCtx as I, Fragment as Re, renderList as ke, mergeProps as fe, toHandlers as Tr, getCurrentInstance as Mn, hasInjectionContext as Er, inject as Ir, provide as Or, reactive as be, defineComponent as _e, ref as M, watch as Z, onMounted as me, onUnmounted as jn, unref as T, createSlots as Fn, createElementVNode as B, vModelText as Mr, createTextVNode as Y, toDisplayString as ce, withModifiers as zn, vShow as qe, computed as ut } from "vue";
|
|
2
2
|
import { Search as Tt, CirclePlus as jr, Close as Ln, Grid as Fr, Delete as zr, Operation as Lr } from "@element-plus/icons-vue";
|
|
3
3
|
import { ElSelect as Et, ElOption as It, ElCheckbox as Gt, ElCheckboxGroup as Pr, ElButton as oe, ElInput as ct, ElIcon as Me, ElPopover as Pn, ElMessage as Bn, ElTag as Br, ElTooltip as Dr, ElCard as Qt } from "element-plus";
|
|
4
4
|
import "element-plus/es/components/select/style/index";
|
|
@@ -13,9 +13,9 @@ import "element-plus/es/components/message/style/index";
|
|
|
13
13
|
import "element-plus/es/components/tag/style/index";
|
|
14
14
|
import "element-plus/es/components/tooltip/style/index";
|
|
15
15
|
import "element-plus/es/components/card/style/index";
|
|
16
|
-
var Dn = typeof global == "object" && global && global.Object === Object && global,
|
|
16
|
+
var Dn = typeof global == "object" && global && global.Object === Object && global, Rr = typeof self == "object" && self && self.Object === Object && self, ae = Dn || Rr || Function("return this")(), se = ae.Symbol, Rn = Object.prototype, kr = Rn.hasOwnProperty, Nr = Rn.toString, ze = se ? se.toStringTag : void 0;
|
|
17
17
|
function Vr(e) {
|
|
18
|
-
var t =
|
|
18
|
+
var t = kr.call(e, ze), n = e[ze];
|
|
19
19
|
try {
|
|
20
20
|
e[ze] = void 0;
|
|
21
21
|
var r = !0;
|
|
@@ -39,7 +39,7 @@ var Qr = "[object Symbol]";
|
|
|
39
39
|
function Ye(e) {
|
|
40
40
|
return typeof e == "symbol" || de(e) && Te(e) == Qr;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function kn(e, t) {
|
|
43
43
|
for (var n = -1, r = e == null ? 0 : e.length, i = Array(r); ++n < r; )
|
|
44
44
|
i[n] = t(e[n], n, e);
|
|
45
45
|
return i;
|
|
@@ -49,7 +49,7 @@ function Nn(e) {
|
|
|
49
49
|
if (typeof e == "string")
|
|
50
50
|
return e;
|
|
51
51
|
if (Q(e))
|
|
52
|
-
return
|
|
52
|
+
return kn(e, Nn) + "";
|
|
53
53
|
if (Ye(e))
|
|
54
54
|
return Yt ? Yt.call(e) : "";
|
|
55
55
|
var t = e + "";
|
|
@@ -230,10 +230,10 @@ var Di = "[object Arguments]";
|
|
|
230
230
|
function rn(e) {
|
|
231
231
|
return de(e) && Te(e) == Di;
|
|
232
232
|
}
|
|
233
|
-
var Hn = Object.prototype,
|
|
233
|
+
var Hn = Object.prototype, Ri = Hn.hasOwnProperty, ki = Hn.propertyIsEnumerable, Ft = rn(/* @__PURE__ */ function() {
|
|
234
234
|
return arguments;
|
|
235
235
|
}()) ? rn : function(e) {
|
|
236
|
-
return de(e) &&
|
|
236
|
+
return de(e) && Ri.call(e, "callee") && !ki.call(e, "callee");
|
|
237
237
|
};
|
|
238
238
|
function Ni() {
|
|
239
239
|
return !1;
|
|
@@ -346,11 +346,11 @@ function Ds(e) {
|
|
|
346
346
|
var r = t.length - 1;
|
|
347
347
|
return n == r ? t.pop() : Bs.call(t, n, 1), --this.size, !0;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function Rs(e) {
|
|
350
350
|
var t = this.__data__, n = et(t, e);
|
|
351
351
|
return n < 0 ? void 0 : t[n][1];
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function ks(e) {
|
|
354
354
|
return et(this.__data__, e) > -1;
|
|
355
355
|
}
|
|
356
356
|
function Ns(e, t) {
|
|
@@ -366,8 +366,8 @@ function ve(e) {
|
|
|
366
366
|
}
|
|
367
367
|
ve.prototype.clear = Ls;
|
|
368
368
|
ve.prototype.delete = Ds;
|
|
369
|
-
ve.prototype.get =
|
|
370
|
-
ve.prototype.has =
|
|
369
|
+
ve.prototype.get = Rs;
|
|
370
|
+
ve.prototype.has = ks;
|
|
371
371
|
ve.prototype.set = Ns;
|
|
372
372
|
var De = Ie(ae, "Map");
|
|
373
373
|
function Vs() {
|
|
@@ -571,16 +571,16 @@ function Oa(e, t) {
|
|
|
571
571
|
var n = Dt(e.buffer);
|
|
572
572
|
return new e.constructor(n, e.byteOffset, e.length);
|
|
573
573
|
}
|
|
574
|
-
var Ma = "[object Boolean]", ja = "[object Date]", Fa = "[object Map]", za = "[object Number]", La = "[object RegExp]", Pa = "[object Set]", Ba = "[object String]", Da = "[object Symbol]",
|
|
574
|
+
var Ma = "[object Boolean]", ja = "[object Date]", Fa = "[object Map]", za = "[object Number]", La = "[object RegExp]", Pa = "[object Set]", Ba = "[object String]", Da = "[object Symbol]", Ra = "[object ArrayBuffer]", ka = "[object DataView]", Na = "[object Float32Array]", Va = "[object Float64Array]", Ua = "[object Int8Array]", Ka = "[object Int16Array]", Ha = "[object Int32Array]", qa = "[object Uint8Array]", Ga = "[object Uint8ClampedArray]", Qa = "[object Uint16Array]", Wa = "[object Uint32Array]";
|
|
575
575
|
function Ja(e, t, n) {
|
|
576
576
|
var r = e.constructor;
|
|
577
577
|
switch (t) {
|
|
578
|
-
case
|
|
578
|
+
case Ra:
|
|
579
579
|
return Dt(e);
|
|
580
580
|
case Ma:
|
|
581
581
|
case ja:
|
|
582
582
|
return new r(+e);
|
|
583
|
-
case
|
|
583
|
+
case ka:
|
|
584
584
|
return xa(e);
|
|
585
585
|
case Na:
|
|
586
586
|
case Va:
|
|
@@ -616,9 +616,9 @@ var mn = Fe && Fe.isMap, el = mn ? zt(mn) : Za, tl = "[object Set]";
|
|
|
616
616
|
function nl(e) {
|
|
617
617
|
return de(e) && ne(e) == tl;
|
|
618
618
|
}
|
|
619
|
-
var bn = Fe && Fe.isSet, rl = bn ? zt(bn) : nl, er = "[object Arguments]", il = "[object Array]", sl = "[object Boolean]", al = "[object Date]", ll = "[object Error]", tr = "[object Function]", ol = "[object GeneratorFunction]", ul = "[object Map]", cl = "[object Number]", nr = "[object Object]", fl = "[object RegExp]", dl = "[object Set]", hl = "[object String]", pl = "[object Symbol]", vl = "[object WeakMap]", gl = "[object ArrayBuffer]", yl = "[object DataView]", ml = "[object Float32Array]", bl = "[object Float64Array]", _l = "[object Int8Array]", Al = "[object Int16Array]", wl = "[object Int32Array]", Sl = "[object Uint8Array]", $l = "[object Uint8ClampedArray]", Cl = "[object Uint16Array]", xl = "[object Uint32Array]",
|
|
620
|
-
|
|
621
|
-
|
|
619
|
+
var bn = Fe && Fe.isSet, rl = bn ? zt(bn) : nl, er = "[object Arguments]", il = "[object Array]", sl = "[object Boolean]", al = "[object Date]", ll = "[object Error]", tr = "[object Function]", ol = "[object GeneratorFunction]", ul = "[object Map]", cl = "[object Number]", nr = "[object Object]", fl = "[object RegExp]", dl = "[object Set]", hl = "[object String]", pl = "[object Symbol]", vl = "[object WeakMap]", gl = "[object ArrayBuffer]", yl = "[object DataView]", ml = "[object Float32Array]", bl = "[object Float64Array]", _l = "[object Int8Array]", Al = "[object Int16Array]", wl = "[object Int32Array]", Sl = "[object Uint8Array]", $l = "[object Uint8ClampedArray]", Cl = "[object Uint16Array]", xl = "[object Uint32Array]", k = {};
|
|
620
|
+
k[er] = k[il] = k[gl] = k[yl] = k[sl] = k[al] = k[ml] = k[bl] = k[_l] = k[Al] = k[wl] = k[ul] = k[cl] = k[nr] = k[fl] = k[dl] = k[hl] = k[pl] = k[Sl] = k[$l] = k[Cl] = k[xl] = !0;
|
|
621
|
+
k[ll] = k[tr] = k[vl] = !1;
|
|
622
622
|
function Ue(e, t, n, r, i, s) {
|
|
623
623
|
var a;
|
|
624
624
|
if (a !== void 0)
|
|
@@ -635,7 +635,7 @@ function Ue(e, t, n, r, i, s) {
|
|
|
635
635
|
if (o == nr || o == er || u && !i)
|
|
636
636
|
a = u ? {} : Ya(e);
|
|
637
637
|
else {
|
|
638
|
-
if (!
|
|
638
|
+
if (!k[o])
|
|
639
639
|
return i ? e : {};
|
|
640
640
|
a = Ja(e, o);
|
|
641
641
|
}
|
|
@@ -727,7 +727,7 @@ function Bl(e) {
|
|
|
727
727
|
n[++t] = r;
|
|
728
728
|
}), n;
|
|
729
729
|
}
|
|
730
|
-
var Dl = 1,
|
|
730
|
+
var Dl = 1, Rl = 2, kl = "[object Boolean]", Nl = "[object Date]", Vl = "[object Error]", Ul = "[object Map]", Kl = "[object Number]", Hl = "[object RegExp]", ql = "[object Set]", Gl = "[object String]", Ql = "[object Symbol]", Wl = "[object ArrayBuffer]", Jl = "[object DataView]", _n = se ? se.prototype : void 0, at = _n ? _n.valueOf : void 0;
|
|
731
731
|
function Yl(e, t, n, r, i, s, a) {
|
|
732
732
|
switch (n) {
|
|
733
733
|
case Jl:
|
|
@@ -736,7 +736,7 @@ function Yl(e, t, n, r, i, s, a) {
|
|
|
736
736
|
e = e.buffer, t = t.buffer;
|
|
737
737
|
case Wl:
|
|
738
738
|
return !(e.byteLength != t.byteLength || !s(new Ge(e), new Ge(t)));
|
|
739
|
-
case
|
|
739
|
+
case kl:
|
|
740
740
|
case Nl:
|
|
741
741
|
case Kl:
|
|
742
742
|
return Ot(+e, +t);
|
|
@@ -754,7 +754,7 @@ function Yl(e, t, n, r, i, s, a) {
|
|
|
754
754
|
var u = a.get(e);
|
|
755
755
|
if (u)
|
|
756
756
|
return u == t;
|
|
757
|
-
r |=
|
|
757
|
+
r |= Rl, a.set(e, t);
|
|
758
758
|
var c = ir(l(e), l(t), r, i, s, a);
|
|
759
759
|
return a.delete(e), c;
|
|
760
760
|
case Ql:
|
|
@@ -816,8 +816,8 @@ function io(e, t, n, r, i, s) {
|
|
|
816
816
|
}
|
|
817
817
|
return f ? (s || (s = new ie()), to(e, t, n, r, i, s)) : !1;
|
|
818
818
|
}
|
|
819
|
-
function
|
|
820
|
-
return e === t ? !0 : e == null || t == null || !de(e) && !de(t) ? e !== e && t !== t : io(e, t, n, r,
|
|
819
|
+
function Rt(e, t, n, r, i) {
|
|
820
|
+
return e === t ? !0 : e == null || t == null || !de(e) && !de(t) ? e !== e && t !== t : io(e, t, n, r, Rt, i);
|
|
821
821
|
}
|
|
822
822
|
var so = 1, ao = 2;
|
|
823
823
|
function lo(e, t, n, r) {
|
|
@@ -837,7 +837,7 @@ function lo(e, t, n, r) {
|
|
|
837
837
|
return !1;
|
|
838
838
|
} else {
|
|
839
839
|
var c = new ie(), d;
|
|
840
|
-
if (!(d === void 0 ?
|
|
840
|
+
if (!(d === void 0 ? Rt(u, o, so | ao, r, c) : d))
|
|
841
841
|
return !1;
|
|
842
842
|
}
|
|
843
843
|
}
|
|
@@ -884,7 +884,7 @@ var po = 1, vo = 2;
|
|
|
884
884
|
function go(e, t) {
|
|
885
885
|
return Pt(e) && sr(t) ? ar(nt(e), t) : function(n) {
|
|
886
886
|
var r = ta(n, e);
|
|
887
|
-
return r === void 0 && r === t ? ho(n, e) :
|
|
887
|
+
return r === void 0 && r === t ? ho(n, e) : Rt(t, r, po | vo);
|
|
888
888
|
};
|
|
889
889
|
}
|
|
890
890
|
function yo(e) {
|
|
@@ -951,7 +951,7 @@ function Io(e) {
|
|
|
951
951
|
return typeof e == "string" || !Q(e) && de(e) && Te(e) == Eo;
|
|
952
952
|
}
|
|
953
953
|
function Oo(e, t) {
|
|
954
|
-
return
|
|
954
|
+
return kn(t, function(n) {
|
|
955
955
|
return e[n];
|
|
956
956
|
});
|
|
957
957
|
}
|
|
@@ -1043,14 +1043,14 @@ var rt = {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
}
|
|
1045
1045
|
};
|
|
1046
|
-
const
|
|
1046
|
+
const Ro = /* @__PURE__ */ Sr("data-v-b329ee4c");
|
|
1047
1047
|
Ar("data-v-b329ee4c");
|
|
1048
|
-
const
|
|
1048
|
+
const ko = {
|
|
1049
1049
|
class: "resize-observer",
|
|
1050
1050
|
tabindex: "-1"
|
|
1051
1051
|
};
|
|
1052
1052
|
wr();
|
|
1053
|
-
const No = /* @__PURE__ */
|
|
1053
|
+
const No = /* @__PURE__ */ Ro((e, t, n, r, i, s) => (P(), X("div", ko)));
|
|
1054
1054
|
rt.render = No;
|
|
1055
1055
|
rt.__scopeId = "data-v-b329ee4c";
|
|
1056
1056
|
rt.__file = "src/components/ResizeObserver.vue";
|
|
@@ -1283,7 +1283,7 @@ if (typeof window < "u") {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
1285
|
let lu = 0;
|
|
1286
|
-
var
|
|
1286
|
+
var kt = {
|
|
1287
1287
|
name: "RecycleScroller",
|
|
1288
1288
|
components: {
|
|
1289
1289
|
ResizeObserver: rt
|
|
@@ -1490,8 +1490,8 @@ var Rt = {
|
|
|
1490
1490
|
};
|
|
1491
1491
|
}
|
|
1492
1492
|
this.$_lastUpdateScrollPosition = $.start;
|
|
1493
|
-
const
|
|
1494
|
-
$.start -=
|
|
1493
|
+
const R = this.buffer;
|
|
1494
|
+
$.start -= R, $.end += R;
|
|
1495
1495
|
let L = 0;
|
|
1496
1496
|
if (this.$refs.before && (L = this.$refs.before.scrollHeight, $.start -= L), this.$refs.after) {
|
|
1497
1497
|
const U = this.$refs.after.scrollHeight;
|
|
@@ -1515,23 +1515,23 @@ var Rt = {
|
|
|
1515
1515
|
let y;
|
|
1516
1516
|
const _ = m <= this.$_endIndex && g >= this.$_startIndex;
|
|
1517
1517
|
if (_)
|
|
1518
|
-
for (let $ = 0,
|
|
1518
|
+
for (let $ = 0, R = h.length; $ < R; $++)
|
|
1519
1519
|
y = h[$], y.nr.used && (e && (y.nr.index = A[y.item[l]]), (y.nr.index == null || y.nr.index < m || y.nr.index >= g) && this.unuseView(y));
|
|
1520
1520
|
const j = _ ? null : /* @__PURE__ */ new Map();
|
|
1521
1521
|
let x, z, N;
|
|
1522
1522
|
for (let $ = m; $ < g; $++) {
|
|
1523
1523
|
x = o[$];
|
|
1524
|
-
const
|
|
1525
|
-
if (
|
|
1526
|
-
throw new Error(`Key is ${
|
|
1527
|
-
if (y = d.get(
|
|
1524
|
+
const R = l ? x[l] : x;
|
|
1525
|
+
if (R == null)
|
|
1526
|
+
throw new Error(`Key is ${R} on item (keyField is '${l}')`);
|
|
1527
|
+
if (y = d.get(R), !n && !c[$].size) {
|
|
1528
1528
|
y && this.unuseView(y);
|
|
1529
1529
|
continue;
|
|
1530
1530
|
}
|
|
1531
1531
|
z = x[a];
|
|
1532
1532
|
let L = f.get(z), U = !1;
|
|
1533
1533
|
if (!y)
|
|
1534
|
-
_ ? L && L.length ? y = L.pop() : y = this.addView(h, $, x,
|
|
1534
|
+
_ ? L && L.length ? y = L.pop() : y = this.addView(h, $, x, R, z) : (N = j.get(z) || 0, (!L || N >= L.length) && (y = this.addView(h, $, x, R, z), this.unuseView(y, !0), L = f.get(z)), y = L[N], j.set(z, N + 1)), d.delete(y.nr.key), y.nr.used = !0, y.nr.index = $, y.nr.key = R, y.nr.type = z, d.set(R, y), U = !0;
|
|
1535
1535
|
else if (!y.nr.used && (y.nr.used = !0, U = !0, L)) {
|
|
1536
1536
|
const K = L.indexOf(y);
|
|
1537
1537
|
K !== -1 && L.splice(K, 1);
|
|
@@ -1639,9 +1639,9 @@ function cu(e, t, n, r, i, s) {
|
|
|
1639
1639
|
}, {
|
|
1640
1640
|
default: I(() => [
|
|
1641
1641
|
(P(!0), J(
|
|
1642
|
-
|
|
1642
|
+
Re,
|
|
1643
1643
|
null,
|
|
1644
|
-
|
|
1644
|
+
ke(i.pool, (o) => (P(), X(qt(n.itemTag), fe({
|
|
1645
1645
|
key: o.nr.id,
|
|
1646
1646
|
style: i.ready ? {
|
|
1647
1647
|
transform: `translate${e.direction === "vertical" ? "Y" : "X"}(${o.position}px) translate${e.direction === "vertical" ? "X" : "Y"}(${o.offset}px)`,
|
|
@@ -1697,8 +1697,8 @@ function cu(e, t, n, r, i, s) {
|
|
|
1697
1697
|
[l, s.handleVisibilityChange]
|
|
1698
1698
|
]);
|
|
1699
1699
|
}
|
|
1700
|
-
|
|
1701
|
-
|
|
1700
|
+
kt.render = cu;
|
|
1701
|
+
kt.__file = "src/components/RecycleScroller.vue";
|
|
1702
1702
|
function pe(e) {
|
|
1703
1703
|
return Array.isArray ? Array.isArray(e) : pr(e) === "[object Array]";
|
|
1704
1704
|
}
|
|
@@ -2041,9 +2041,9 @@ function Ou(e, t, n, {
|
|
|
2041
2041
|
ignoreLocation: u
|
|
2042
2042
|
}) <= h ? z = N : y = N, N = Math.floor((y - z) / 2 + z);
|
|
2043
2043
|
y = N;
|
|
2044
|
-
let $ = Math.max(1, f - N + 1),
|
|
2045
|
-
L[
|
|
2046
|
-
for (let K =
|
|
2044
|
+
let $ = Math.max(1, f - N + 1), R = a ? d : Math.min(f + N, d) + c, L = Array(R + 2);
|
|
2045
|
+
L[R + 1] = (1 << x) - 1;
|
|
2046
|
+
for (let K = R; K >= $; K -= 1) {
|
|
2047
2047
|
let w = K - 1, S = n[e.charAt(w)];
|
|
2048
2048
|
if (m && (g[w] = +!!S), L[K] = (L[K + 1] << 1 | 1) & S, x && (L[K] |= (p[K + 1] | p[K]) << 1 | 1 | p[K + 1]), L[K] & _ && (b = Ve(t, {
|
|
2049
2049
|
errors: x,
|
|
@@ -2388,9 +2388,9 @@ const At = [
|
|
|
2388
2388
|
Pu,
|
|
2389
2389
|
Fu,
|
|
2390
2390
|
mr
|
|
2391
|
-
], In = At.length, Du = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,
|
|
2392
|
-
function
|
|
2393
|
-
return e.split(
|
|
2391
|
+
], In = At.length, Du = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Ru = "|";
|
|
2392
|
+
function ku(e, t = {}) {
|
|
2393
|
+
return e.split(Ru).map((n) => {
|
|
2394
2394
|
let r = n.trim().split(Du).filter((s) => s && !!s.trim()), i = [];
|
|
2395
2395
|
for (let s = 0, a = r.length; s < a; s += 1) {
|
|
2396
2396
|
const l = r[s];
|
|
@@ -2436,7 +2436,7 @@ class Vu {
|
|
|
2436
2436
|
location: o,
|
|
2437
2437
|
threshold: u,
|
|
2438
2438
|
distance: c
|
|
2439
|
-
}, t = n ? t : t.toLowerCase(), t = r ? We(t) : t, this.pattern = t, this.query =
|
|
2439
|
+
}, t = n ? t : t.toLowerCase(), t = r ? We(t) : t, this.pattern = t, this.query = ku(this.pattern, this.options);
|
|
2440
2440
|
}
|
|
2441
2441
|
static condition(t, n) {
|
|
2442
2442
|
return n.useExtendedSearch;
|
|
@@ -2901,7 +2901,7 @@ const we = (e) => {
|
|
|
2901
2901
|
}
|
|
2902
2902
|
}
|
|
2903
2903
|
n.isNeedFooter || (i.value = c.value, g(n.field, i.value));
|
|
2904
|
-
},
|
|
2904
|
+
}, R = (w) => {
|
|
2905
2905
|
!p && !c.value.includes(w) && (v = o.value.findIndex((S) => S.value === w.value));
|
|
2906
2906
|
}, L = (w) => {
|
|
2907
2907
|
c.value = [w], K();
|
|
@@ -3019,7 +3019,7 @@ const we = (e) => {
|
|
|
3019
3019
|
size: e.size
|
|
3020
3020
|
}, {
|
|
3021
3021
|
default: I(() => [
|
|
3022
|
-
F(T(
|
|
3022
|
+
F(T(kt), {
|
|
3023
3023
|
class: "recycle-scroller",
|
|
3024
3024
|
items: u.value,
|
|
3025
3025
|
"item-size": 30,
|
|
@@ -3036,7 +3036,7 @@ const we = (e) => {
|
|
|
3036
3036
|
value: C,
|
|
3037
3037
|
label: C,
|
|
3038
3038
|
disabled: C.disabled,
|
|
3039
|
-
onClick: (O) =>
|
|
3039
|
+
onClick: (O) => R(C)
|
|
3040
3040
|
}, {
|
|
3041
3041
|
default: I(() => [
|
|
3042
3042
|
le(w.$slots, "default", { scope: C }, () => [
|
|
@@ -3244,7 +3244,7 @@ const we = (e) => {
|
|
|
3244
3244
|
e.isNeedOnlySelect ? (P(), J("span", {
|
|
3245
3245
|
key: 0,
|
|
3246
3246
|
class: "select-tag",
|
|
3247
|
-
onClick: zn((
|
|
3247
|
+
onClick: zn((R) => y($), ["stop"])
|
|
3248
3248
|
}, j[3] || (j[3] = [
|
|
3249
3249
|
B("span", null, "仅筛选此项", -1)
|
|
3250
3250
|
]), 8, dc)) : ue("", !0)
|
|
@@ -3394,7 +3394,7 @@ const we = (e) => {
|
|
|
3394
3394
|
Y(ce((e.fieldList.find((x) => x.value === l.value) || {}).label), 1)
|
|
3395
3395
|
]),
|
|
3396
3396
|
default: I(() => [
|
|
3397
|
-
(P(!0), J(
|
|
3397
|
+
(P(!0), J(Re, null, ke(e.fieldList, (x) => (P(), X(y, {
|
|
3398
3398
|
key: x.value,
|
|
3399
3399
|
label: x.label,
|
|
3400
3400
|
value: x.value
|
|
@@ -3493,8 +3493,8 @@ const we = (e) => {
|
|
|
3493
3493
|
);
|
|
3494
3494
|
const v = M(), p = be({});
|
|
3495
3495
|
return me(() => {
|
|
3496
|
-
var b, y, _, j, x, z, N, $,
|
|
3497
|
-
v.value && (p.blur = (b = v.value) == null ? void 0 : b.blur, p.clear = (y = v.value) == null ? void 0 : y.clear, p.focus = (_ = v.value) == null ? void 0 : _.focus, p.input = (j = v.value) == null ? void 0 : j.input, p.ref = (x = v.value) == null ? void 0 : x.ref, p.resizeTextarea = (z = v.value) == null ? void 0 : z.resizeTextarea, p.select = (N = v.value) == null ? void 0 : N.select, p.textarea = ($ = v.value) == null ? void 0 : $.textarea, p.textareaStyle = (
|
|
3496
|
+
var b, y, _, j, x, z, N, $, R, L;
|
|
3497
|
+
v.value && (p.blur = (b = v.value) == null ? void 0 : b.blur, p.clear = (y = v.value) == null ? void 0 : y.clear, p.focus = (_ = v.value) == null ? void 0 : _.focus, p.input = (j = v.value) == null ? void 0 : j.input, p.ref = (x = v.value) == null ? void 0 : x.ref, p.resizeTextarea = (z = v.value) == null ? void 0 : z.resizeTextarea, p.select = (N = v.value) == null ? void 0 : N.select, p.textarea = ($ = v.value) == null ? void 0 : $.textarea, p.textareaStyle = (R = v.value) == null ? void 0 : R.textareaStyle, p.isComposing = (L = v.value) == null ? void 0 : L.isComposing);
|
|
3498
3498
|
}), t(p), (b, y) => (P(), X(T(ct), fe({
|
|
3499
3499
|
ref_key: "inputRef",
|
|
3500
3500
|
ref: v,
|
|
@@ -3519,7 +3519,7 @@ const we = (e) => {
|
|
|
3519
3519
|
Y(ce((e.fieldList.find((_) => _.value === l.value) || {}).label), 1)
|
|
3520
3520
|
]),
|
|
3521
3521
|
default: I(() => [
|
|
3522
|
-
(P(!0), J(
|
|
3522
|
+
(P(!0), J(Re, null, ke(e.fieldList, (_) => (P(), X(T(It), {
|
|
3523
3523
|
key: _.value,
|
|
3524
3524
|
label: _.label,
|
|
3525
3525
|
value: _.value
|
|
@@ -3634,13 +3634,13 @@ const we = (e) => {
|
|
|
3634
3634
|
});
|
|
3635
3635
|
} else
|
|
3636
3636
|
g(c.value, void 0), p({ key: c.value });
|
|
3637
|
-
|
|
3637
|
+
R(), G(() => {
|
|
3638
3638
|
h.value = !1;
|
|
3639
3639
|
});
|
|
3640
|
-
},
|
|
3640
|
+
}, R = () => {
|
|
3641
3641
|
u.value = !1;
|
|
3642
3642
|
}, L = () => {
|
|
3643
|
-
s.value = "", f.value = "", a.value = "",
|
|
3643
|
+
s.value = "", f.value = "", a.value = "", R();
|
|
3644
3644
|
}, U = (C) => {
|
|
3645
3645
|
Object.keys(C).forEach((O) => {
|
|
3646
3646
|
l.value = O.replace("List", ""), f.value = C[O].join(`
|
|
@@ -3725,7 +3725,7 @@ const we = (e) => {
|
|
|
3725
3725
|
Y(ce((e.fieldList.find((D) => D.value === l.value) || {}).label), 1)
|
|
3726
3726
|
]),
|
|
3727
3727
|
default: I(() => [
|
|
3728
|
-
(P(!0), J(
|
|
3728
|
+
(P(!0), J(Re, null, ke(e.fieldList, (D) => (P(), X(T(It), {
|
|
3729
3729
|
key: D.value,
|
|
3730
3730
|
label: D.label,
|
|
3731
3731
|
value: D.value
|
|
@@ -3806,7 +3806,7 @@ const we = (e) => {
|
|
|
3806
3806
|
F(T(oe), {
|
|
3807
3807
|
size: e.size,
|
|
3808
3808
|
plain: "",
|
|
3809
|
-
onClick:
|
|
3809
|
+
onClick: R
|
|
3810
3810
|
}, {
|
|
3811
3811
|
default: I(() => O[7] || (O[7] = [
|
|
3812
3812
|
Y("关闭")
|
|
@@ -3852,7 +3852,7 @@ const we = (e) => {
|
|
|
3852
3852
|
setup(e) {
|
|
3853
3853
|
const t = e, { useQueryStore: n } = we(t.injectionKey), { state: r, reduceTag: i, reduceAllTag: s } = n();
|
|
3854
3854
|
return (a, l) => (P(), J("div", jc, [
|
|
3855
|
-
(P(!0), J(
|
|
3855
|
+
(P(!0), J(Re, null, ke(T(r).tags, (o, u) => (P(), X(T(Br), fe({ ref_for: !0 }, a.$attrs, {
|
|
3856
3856
|
key: o.label,
|
|
3857
3857
|
closable: "",
|
|
3858
3858
|
style: [{ height: "auto", "max-height": "28px", "white-space": "normal", "text-align": "left", "max-width": "1800px", overflow: "hidden", "word-break": "break-word", "text-overflow": "ellipsis" }, { marginLeft: u > 0 ? "4px" : "0px" }],
|
|
@@ -3895,7 +3895,7 @@ const we = (e) => {
|
|
|
3895
3895
|
}, Lc = /* @__PURE__ */ zc(Fc, [["__scopeId", "data-v-fddb24ed"]]), Pc = (e) => (e.install = (t) => {
|
|
3896
3896
|
const n = e.name;
|
|
3897
3897
|
t.component(n, e);
|
|
3898
|
-
}, e), Bc = Pc(Lc), Dc = { class: "popover-btn" },
|
|
3898
|
+
}, e), Bc = Pc(Lc), Dc = { class: "popover-btn" }, Rc = { class: "popover-btn-right" }, kc = /* @__PURE__ */ _e({
|
|
3899
3899
|
name: "JcMoreQueryContain",
|
|
3900
3900
|
__name: "index",
|
|
3901
3901
|
props: {
|
|
@@ -3935,7 +3935,7 @@ const we = (e) => {
|
|
|
3935
3935
|
});
|
|
3936
3936
|
}, h = (v, p) => {
|
|
3937
3937
|
var b;
|
|
3938
|
-
typeof r.value[v] == "string" || typeof r.value[v] == "number" ? o({
|
|
3938
|
+
typeof r.value[v] > "u" || (typeof r.value[v] == "string" || typeof r.value[v] == "number" ? o({
|
|
3939
3939
|
key: v,
|
|
3940
3940
|
label: p,
|
|
3941
3941
|
value: H(i.customTagObj[v]) ? r.value[v] : i.customTagObj[v]
|
|
@@ -3943,7 +3943,7 @@ const we = (e) => {
|
|
|
3943
3943
|
key: v,
|
|
3944
3944
|
label: p,
|
|
3945
3945
|
value: H(i.customTagObj[v]) ? (b = r.value[v]) == null ? void 0 : b.join(",") : i.customTagObj[v]
|
|
3946
|
-
});
|
|
3946
|
+
}));
|
|
3947
3947
|
}, A = () => {
|
|
3948
3948
|
c.value = !0;
|
|
3949
3949
|
for (const v in r.value) {
|
|
@@ -4007,7 +4007,7 @@ const we = (e) => {
|
|
|
4007
4007
|
_: 1,
|
|
4008
4008
|
__: [1]
|
|
4009
4009
|
}, 8, ["size"]),
|
|
4010
|
-
B("div",
|
|
4010
|
+
B("div", Rc, [
|
|
4011
4011
|
F(T(oe), {
|
|
4012
4012
|
size: e.size,
|
|
4013
4013
|
onClick: p[0] || (p[0] = (b) => n.value = !1),
|
|
@@ -4040,7 +4040,7 @@ const we = (e) => {
|
|
|
4040
4040
|
}), Nc = (e) => (e.install = (t) => {
|
|
4041
4041
|
const n = e.name;
|
|
4042
4042
|
t.component(n, e);
|
|
4043
|
-
}, e), Vc = Nc(
|
|
4043
|
+
}, e), Vc = Nc(kc), Uc = { class: "jc-list-layout" }, Kc = {
|
|
4044
4044
|
key: 1,
|
|
4045
4045
|
class: "bottom-header"
|
|
4046
4046
|
}, Hc = /* @__PURE__ */ _e({
|
package/dist/lib/index.cjs
CHANGED
|
@@ -5,4 +5,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
5
5
|
`)}`;M.ElMessage.warning(H)}d.value=I.join(`
|
|
6
6
|
`),B(),y(f.value,I),g({key:f.value,label:h.value,value:I})}else y(f.value,void 0),v({key:f.value});F(),r.nextTick(()=>{p.value=!1})},F=()=>{c.value=!1},k=()=>{o.value="",d.value="",a.value="",F()},L=E=>{Object.keys(E).forEach(I=>{l.value=I.replace("List",""),d.value=E[I].join(`
|
|
7
7
|
`),x()})},P=()=>{!D(o.value)&&(o.value!==a.value||l.value!==u.value)?(a.value=o.value,u.value=l.value,B(),y(f.value,void 0),v({key:f.value}),y(l.value,o.value.trim())):D(o.value)&&(a.value=o.value,y(l.value,void 0))};r.watch(()=>i.fieldList,E=>{(!D(E)&&D(l.value)||l.value&&!i.fieldList.map(I=>I.value).includes(l.value))&&(l.value=E[0].value,o.value="",d.value="")},{immediate:!0,deep:!0}),r.watch(()=>b.queryForm.resetCount,()=>{k()}),r.watch(i.fieldList.flatMap(E=>[()=>b.queryForm[E.value],()=>b.queryForm[E.value+"List"]]),E=>{if(!p.value){if(E.findIndex(U=>!D(U))===-1){k();return}let j=!1;i.fieldList.forEach(U=>{var H;const R=U.value+"List";if(d.value=((H=b.queryForm[R])==null?void 0:H.join(`
|
|
8
|
-
`))||"",q(b.queryForm[R])&&!D(b.queryForm[R])){g({key:R,label:U.label,value:b.queryForm[R]});return}else v({key:R});b.queryForm[U.value]?(j=!0,l.value=U.value,o.value=b.queryForm[U.value]||""):j||(o.value="")})}},{deep:!0});const S=r.ref(),A=r.reactive({});return r.onMounted(()=>{var E,I,j,U,R,H,ae,pt,vt,gt;S.value&&(A.blur=(E=S.value)==null?void 0:E.blur,A.clear=(I=S.value)==null?void 0:I.clear,A.focus=(j=S.value)==null?void 0:j.focus,A.input=(U=S.value)==null?void 0:U.input,A.ref=(R=S.value)==null?void 0:R.ref,A.resizeTextarea=(H=S.value)==null?void 0:H.resizeTextarea,A.select=(ae=S.value)==null?void 0:ae.select,A.textarea=(pt=S.value)==null?void 0:pt.textarea,A.textareaStyle=(vt=S.value)==null?void 0:vt.textareaStyle,A.isComposing=(gt=S.value)==null?void 0:gt.isComposing)}),A.setInputValueMult=L,A.setInputByOutside=P,t(A),(E,I)=>(r.openBlock(),r.createBlock(r.unref(M.ElInput),r.mergeProps({ref_key:"inputRef",ref:S,modelValue:o.value,"onUpdate:modelValue":I[5]||(I[5]=j=>o.value=j),modelModifiers:{trim:!0}},E.$attrs,{placeholder:"请输入内容",style:{width:e.width},class:"jc-input jc-input-complex search-input",size:e.size}),{prepend:r.withCtx(()=>[r.createVNode(r.unref(M.ElSelect),{ref:"selectRef",modelValue:l.value,"onUpdate:modelValue":I[0]||(I[0]=j=>l.value=j),size:e.size,class:"select-field",onChange:C},{prefix:r.withCtx(()=>[r.createTextVNode(r.toDisplayString((e.fieldList.find(j=>j.value===l.value)||{}).label),1)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.fieldList,j=>(r.openBlock(),r.createBlock(r.unref(M.ElOption),{key:j.value,label:j.label,value:j.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),suffix:r.withCtx(()=>[r.createElementVNode("div",Eu,[r.withDirectives(r.createVNode(r.unref(M.ElIcon),{class:"el-input__icon",onClick:$},{default:r.withCtx(()=>[r.createVNode(r.unref(X.Close))]),_:1},512),[[r.vShow,o.value]]),r.createVNode(r.unref(M.ElIcon),{class:"el-input__icon",onClick:N},{default:r.withCtx(()=>[r.createVNode(r.unref(X.Search))]),_:1}),r.createVNode(r.unref(M.ElPopover),{visible:c.value,"onUpdate:visible":I[4]||(I[4]=j=>c.value=j),placement:"bottom-end",width:"240","show-arrow":!1,"popper-class":"jc-input-pop",trigger:"click"},{reference:r.withCtx(()=>[r.createVNode(r.unref(M.ElIcon),{class:"el-input__icon",title:"多项搜索",style:{"background-color":"#f0f2f5"},onClick:O},{default:r.withCtx(()=>[r.createVNode(r.unref(X.Grid))]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",$u,[r.createVNode(r.unref(M.ElInput),r.mergeProps({modelValue:d.value,"onUpdate:modelValue":I[1]||(I[1]=j=>d.value=j),type:"textarea"},E.$attrs,{size:e.size,placeholder:"一行一项",class:"popover-textarea",wrap:"off"}),null,16,["modelValue","size"]),r.createElementVNode("div",Tu,[r.createVNode(r.unref(M.ElButton),{size:e.size,onClick:I[2]||(I[2]=j=>d.value=""),plain:""},{default:r.withCtx(()=>I[6]||(I[6]=[r.createTextVNode("清空")])),_:1,__:[6]},8,["size"]),r.createElementVNode("div",Iu,[r.createVNode(r.unref(M.ElButton),{size:e.size,plain:"",onClick:F},{default:r.withCtx(()=>I[7]||(I[7]=[r.createTextVNode("关闭")])),_:1,__:[7]},8,["size"]),r.createVNode(r.unref(M.ElButton),{type:"primary",plain:"",size:e.size,onClick:I[3]||(I[3]=j=>x())},{default:r.withCtx(()=>I[8]||(I[8]=[r.createTextVNode("搜索")])),_:1,__:[8]},8,["size"])])])])]),_:1},8,["visible"])])]),_:1},16,["modelValue","style","size"]))}}),Bu=e=>(e.install=t=>{const n=e.name;t.component(n,e)},e),Pn=Bu(Ou),Mu={style:{display:"flex","flex-wrap":"wrap",flex:"1","flex-basis":"calc(100% - 50px)","font-size":"12px","margin-top":"4px"}},ku=r.defineComponent({name:"JcTagQuery",__name:"index",props:{injectionKey:{type:String,default:"jc-query-injection-key"}},setup(e){const t=e,{useQueryStore:n}=oe(t.injectionKey),{state:i,reduceTag:s,reduceAllTag:o}=n();return(a,l)=>(r.openBlock(),r.createElementBlock("div",Mu,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).tags,(u,c)=>(r.openBlock(),r.createBlock(r.unref(M.ElTag),r.mergeProps({ref_for:!0},a.$attrs,{key:u.label,closable:"",style:[{height:"auto","max-height":"28px","white-space":"normal","text-align":"left","max-width":"1800px",overflow:"hidden","word-break":"break-word","text-overflow":"ellipsis"},{marginLeft:c>0?"4px":"0px"}],onClose:f=>r.unref(s)(u,c)}),{default:r.withCtx(()=>[r.createVNode(r.unref(M.ElTooltip),{content:u.value,placement:"bottom",effect:"light"},{default:r.withCtx(()=>[r.createElementVNode("span",null,r.toDisplayString(u.showStr),1)]),_:2},1032,["content"])]),_:2},1040,["style","onClose"]))),128)),r.unref(i).tags.length>1?(r.openBlock(),r.createElementBlock("span",{key:0,style:{"margin-left":"10px","margin-top":"2px",display:"block"},onClick:l[0]||(l[0]=(...u)=>r.unref(o)&&r.unref(o)(...u))},[r.createVNode(r.unref(M.ElIcon),null,{default:r.withCtx(()=>[r.createVNode(r.unref(X.Delete))]),_:1})])):r.createCommentVNode("",!0)]))}}),ju=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},Fu=ju(ku,[["__scopeId","data-v-fddb24ed"]]),zu=e=>(e.install=t=>{const n=e.name;t.component(n,e)},e),Dn=zu(Fu),Nu={class:"popover-btn"},Vu={class:"popover-btn-right"},Lu=r.defineComponent({name:"JcMoreQueryContain",__name:"index",props:{fieldList:{type:Array,require:!0,default:()=>[]},customTagObj:{type:Object,default:()=>({})},width:{type:Number,default:400},size:{type:String,default:"default",validator:e=>["small","default","large"].includes(e)},injectionKey:{type:String,default:"jc-query-injection-key"}},setup(e,{expose:t}){const n=r.ref(!1),i=r.ref({}),s=e,{useQueryStore:o}=oe(s.injectionKey),{state:a,setQuery:l,addTag:u,reduceTag:c}=o(),f=r.ref(!1),h=()=>{n.value=!n.value,n.value&&s.fieldList.forEach(g=>{i.value[g.value]=a.queryForm[g.value]||void 0})},d=()=>{f.value=!0,i.value={},s.fieldList.forEach(g=>{l(g.value,void 0),c({key:g.value})}),n.value=!1,r.nextTick(()=>{f.value=!1})},p=(g,v)=>{var w;typeof i.value[g]=="string"||typeof i.value[g]=="number"?u({key:g,label:v,value:D(s.customTagObj[g])?i.value[g]:s.customTagObj[g]}):u({key:g,label:v,value:D(s.customTagObj[g])?(w=i.value[g])==null?void 0:w.join(","):s.customTagObj[g]})},_=()=>{f.value=!0;for(const g in i.value){l(g,i.value[g]||void 0);const v=s.fieldList.find(w=>w.value===g);v===void 0&&M.ElMessage.warning("传入的fieldList和表单绑定的字段不匹配"),p(g,v.label)}n.value=!1,r.nextTick(()=>{f.value=!1})};r.watch(()=>a.queryForm.resetCount,()=>{d()}),r.watch(s.fieldList.map(g=>()=>a.queryForm[g.value]),()=>{f.value||s.fieldList.forEach(g=>{i.value[g.value]=a.queryForm[g.value],D(a.queryForm[g.value])?c({key:g.value}):p(g.value,g.label)})},{deep:!0});const b=r.ref(),y=r.reactive({});return r.onMounted(()=>{var g;b.value&&(y.hide=(g=b.value)==null?void 0:g.hide)}),t(y),(g,v)=>(r.openBlock(),r.createBlock(r.unref(M.ElPopover),r.mergeProps({ref_key:"popoverRef",ref:b},g.$attrs,{visible:n.value,placement:"bottom",width:e.width,"show-arrow":!1,"popper-class":"moreQuery-pop",trigger:"click"}),{reference:r.withCtx(()=>[r.createVNode(r.unref(M.ElButton),{size:e.size,icon:r.unref(X.Operation),onClick:h},null,8,["size","icon"])]),default:r.withCtx(()=>[r.renderSlot(g.$slots,"default",{scopeForm:i.value}),r.createElementVNode("div",Nu,[r.createVNode(r.unref(M.ElButton),{size:e.size,onClick:d,plain:""},{default:r.withCtx(()=>v[1]||(v[1]=[r.createTextVNode("清空")])),_:1,__:[1]},8,["size"]),r.createElementVNode("div",Vu,[r.createVNode(r.unref(M.ElButton),{size:e.size,onClick:v[0]||(v[0]=w=>n.value=!1),plain:""},{default:r.withCtx(()=>v[2]||(v[2]=[r.createTextVNode("关闭")])),_:1,__:[2]},8,["size"]),r.createVNode(r.unref(M.ElButton),{type:"primary",plain:"",size:e.size,onClick:_},{default:r.withCtx(()=>v[3]||(v[3]=[r.createTextVNode("搜索")])),_:1,__:[3]},8,["size"])])])]),_:3},16,["visible","width"]))}}),Pu=e=>(e.install=t=>{const n=e.name;t.component(n,e)},e),Rn=Pu(Lu),Du={class:"jc-list-layout"},Ru={key:1,class:"bottom-header"},qu=r.defineComponent({name:"JcListLayout",__name:"index",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",Du,[t.$slots["top-body"]?(r.openBlock(),r.createBlock(r.unref(M.ElCard),{key:0,class:"top-card",shadow:"never"},{default:r.withCtx(()=>[r.renderSlot(t.$slots,"top-body")]),_:3})):r.createCommentVNode("",!0),t.$slots["bottom-header"]?(r.openBlock(),r.createElementBlock("div",Ru,[r.renderSlot(t.$slots,"bottom-header")])):r.createCommentVNode("",!0),t.$slots["bottom-body"]?(r.openBlock(),r.createBlock(r.unref(M.ElCard),{key:2,class:"bottom-card",shadow:"never"},{default:r.withCtx(()=>[r.renderSlot(t.$slots,"bottom-body")]),_:3})):r.createCommentVNode("",!0)]))}}),Uu=e=>(e.install=t=>{const n=e.name;t.component(n,e)},e),qn=Uu(qu),Ku=Object.freeze(Object.defineProperty({__proto__:null,JcCascader:Nn,JcDatePicker:Vn,JcInputComplex:Pn,JcInputSwitch:Ln,JcListLayout:qn,JcMoreQueryContain:Rn,JcSelectQuery:zn,JcTagQuery:Dn},Symbol.toStringTag,{value:"Module"})),Hu=(e={},t="jc-query-injection-key")=>{e.resetCount=0;const n=mn(e),i=r.reactive({queryForm:n,tags:[]}),{useProvideQueryStore:s}=oe(t),{state:o,setQuery:a,addTag:l,reduceTag:u,reduceAllTag:c,clearQuery:f}=s(i),h=()=>{o.queryForm.resetCount++,f(e)};return{queryForm:o.queryForm,setQuery:a,addTag:l,reduceTag:u,reduceAllTag:c,clearQuery:h}},Qu={install:e=>{for(const t of Object.values(Ku))e.use(t)}};exports.JcCascader=Nn;exports.JcDatePicker=Vn;exports.JcInputComplex=Pn;exports.JcInputSwitch=Ln;exports.JcListLayout=qn;exports.JcMoreQueryContain=Rn;exports.JcSelectQuery=zn;exports.JcTagQuery=Dn;exports.default=Qu;exports.reactiveQuery=Hu;
|
|
8
|
+
`))||"",q(b.queryForm[R])&&!D(b.queryForm[R])){g({key:R,label:U.label,value:b.queryForm[R]});return}else v({key:R});b.queryForm[U.value]?(j=!0,l.value=U.value,o.value=b.queryForm[U.value]||""):j||(o.value="")})}},{deep:!0});const S=r.ref(),A=r.reactive({});return r.onMounted(()=>{var E,I,j,U,R,H,ae,pt,vt,gt;S.value&&(A.blur=(E=S.value)==null?void 0:E.blur,A.clear=(I=S.value)==null?void 0:I.clear,A.focus=(j=S.value)==null?void 0:j.focus,A.input=(U=S.value)==null?void 0:U.input,A.ref=(R=S.value)==null?void 0:R.ref,A.resizeTextarea=(H=S.value)==null?void 0:H.resizeTextarea,A.select=(ae=S.value)==null?void 0:ae.select,A.textarea=(pt=S.value)==null?void 0:pt.textarea,A.textareaStyle=(vt=S.value)==null?void 0:vt.textareaStyle,A.isComposing=(gt=S.value)==null?void 0:gt.isComposing)}),A.setInputValueMult=L,A.setInputByOutside=P,t(A),(E,I)=>(r.openBlock(),r.createBlock(r.unref(M.ElInput),r.mergeProps({ref_key:"inputRef",ref:S,modelValue:o.value,"onUpdate:modelValue":I[5]||(I[5]=j=>o.value=j),modelModifiers:{trim:!0}},E.$attrs,{placeholder:"请输入内容",style:{width:e.width},class:"jc-input jc-input-complex search-input",size:e.size}),{prepend:r.withCtx(()=>[r.createVNode(r.unref(M.ElSelect),{ref:"selectRef",modelValue:l.value,"onUpdate:modelValue":I[0]||(I[0]=j=>l.value=j),size:e.size,class:"select-field",onChange:C},{prefix:r.withCtx(()=>[r.createTextVNode(r.toDisplayString((e.fieldList.find(j=>j.value===l.value)||{}).label),1)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.fieldList,j=>(r.openBlock(),r.createBlock(r.unref(M.ElOption),{key:j.value,label:j.label,value:j.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),suffix:r.withCtx(()=>[r.createElementVNode("div",Eu,[r.withDirectives(r.createVNode(r.unref(M.ElIcon),{class:"el-input__icon",onClick:$},{default:r.withCtx(()=>[r.createVNode(r.unref(X.Close))]),_:1},512),[[r.vShow,o.value]]),r.createVNode(r.unref(M.ElIcon),{class:"el-input__icon",onClick:N},{default:r.withCtx(()=>[r.createVNode(r.unref(X.Search))]),_:1}),r.createVNode(r.unref(M.ElPopover),{visible:c.value,"onUpdate:visible":I[4]||(I[4]=j=>c.value=j),placement:"bottom-end",width:"240","show-arrow":!1,"popper-class":"jc-input-pop",trigger:"click"},{reference:r.withCtx(()=>[r.createVNode(r.unref(M.ElIcon),{class:"el-input__icon",title:"多项搜索",style:{"background-color":"#f0f2f5"},onClick:O},{default:r.withCtx(()=>[r.createVNode(r.unref(X.Grid))]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",$u,[r.createVNode(r.unref(M.ElInput),r.mergeProps({modelValue:d.value,"onUpdate:modelValue":I[1]||(I[1]=j=>d.value=j),type:"textarea"},E.$attrs,{size:e.size,placeholder:"一行一项",class:"popover-textarea",wrap:"off"}),null,16,["modelValue","size"]),r.createElementVNode("div",Tu,[r.createVNode(r.unref(M.ElButton),{size:e.size,onClick:I[2]||(I[2]=j=>d.value=""),plain:""},{default:r.withCtx(()=>I[6]||(I[6]=[r.createTextVNode("清空")])),_:1,__:[6]},8,["size"]),r.createElementVNode("div",Iu,[r.createVNode(r.unref(M.ElButton),{size:e.size,plain:"",onClick:F},{default:r.withCtx(()=>I[7]||(I[7]=[r.createTextVNode("关闭")])),_:1,__:[7]},8,["size"]),r.createVNode(r.unref(M.ElButton),{type:"primary",plain:"",size:e.size,onClick:I[3]||(I[3]=j=>x())},{default:r.withCtx(()=>I[8]||(I[8]=[r.createTextVNode("搜索")])),_:1,__:[8]},8,["size"])])])])]),_:1},8,["visible"])])]),_:1},16,["modelValue","style","size"]))}}),Bu=e=>(e.install=t=>{const n=e.name;t.component(n,e)},e),Pn=Bu(Ou),Mu={style:{display:"flex","flex-wrap":"wrap",flex:"1","flex-basis":"calc(100% - 50px)","font-size":"12px","margin-top":"4px"}},ku=r.defineComponent({name:"JcTagQuery",__name:"index",props:{injectionKey:{type:String,default:"jc-query-injection-key"}},setup(e){const t=e,{useQueryStore:n}=oe(t.injectionKey),{state:i,reduceTag:s,reduceAllTag:o}=n();return(a,l)=>(r.openBlock(),r.createElementBlock("div",Mu,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).tags,(u,c)=>(r.openBlock(),r.createBlock(r.unref(M.ElTag),r.mergeProps({ref_for:!0},a.$attrs,{key:u.label,closable:"",style:[{height:"auto","max-height":"28px","white-space":"normal","text-align":"left","max-width":"1800px",overflow:"hidden","word-break":"break-word","text-overflow":"ellipsis"},{marginLeft:c>0?"4px":"0px"}],onClose:f=>r.unref(s)(u,c)}),{default:r.withCtx(()=>[r.createVNode(r.unref(M.ElTooltip),{content:u.value,placement:"bottom",effect:"light"},{default:r.withCtx(()=>[r.createElementVNode("span",null,r.toDisplayString(u.showStr),1)]),_:2},1032,["content"])]),_:2},1040,["style","onClose"]))),128)),r.unref(i).tags.length>1?(r.openBlock(),r.createElementBlock("span",{key:0,style:{"margin-left":"10px","margin-top":"2px",display:"block"},onClick:l[0]||(l[0]=(...u)=>r.unref(o)&&r.unref(o)(...u))},[r.createVNode(r.unref(M.ElIcon),null,{default:r.withCtx(()=>[r.createVNode(r.unref(X.Delete))]),_:1})])):r.createCommentVNode("",!0)]))}}),ju=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},Fu=ju(ku,[["__scopeId","data-v-fddb24ed"]]),zu=e=>(e.install=t=>{const n=e.name;t.component(n,e)},e),Dn=zu(Fu),Nu={class:"popover-btn"},Vu={class:"popover-btn-right"},Lu=r.defineComponent({name:"JcMoreQueryContain",__name:"index",props:{fieldList:{type:Array,require:!0,default:()=>[]},customTagObj:{type:Object,default:()=>({})},width:{type:Number,default:400},size:{type:String,default:"default",validator:e=>["small","default","large"].includes(e)},injectionKey:{type:String,default:"jc-query-injection-key"}},setup(e,{expose:t}){const n=r.ref(!1),i=r.ref({}),s=e,{useQueryStore:o}=oe(s.injectionKey),{state:a,setQuery:l,addTag:u,reduceTag:c}=o(),f=r.ref(!1),h=()=>{n.value=!n.value,n.value&&s.fieldList.forEach(g=>{i.value[g.value]=a.queryForm[g.value]||void 0})},d=()=>{f.value=!0,i.value={},s.fieldList.forEach(g=>{l(g.value,void 0),c({key:g.value})}),n.value=!1,r.nextTick(()=>{f.value=!1})},p=(g,v)=>{var w;typeof i.value[g]>"u"||(typeof i.value[g]=="string"||typeof i.value[g]=="number"?u({key:g,label:v,value:D(s.customTagObj[g])?i.value[g]:s.customTagObj[g]}):u({key:g,label:v,value:D(s.customTagObj[g])?(w=i.value[g])==null?void 0:w.join(","):s.customTagObj[g]}))},_=()=>{f.value=!0;for(const g in i.value){l(g,i.value[g]||void 0);const v=s.fieldList.find(w=>w.value===g);v===void 0&&M.ElMessage.warning("传入的fieldList和表单绑定的字段不匹配"),p(g,v.label)}n.value=!1,r.nextTick(()=>{f.value=!1})};r.watch(()=>a.queryForm.resetCount,()=>{d()}),r.watch(s.fieldList.map(g=>()=>a.queryForm[g.value]),()=>{f.value||s.fieldList.forEach(g=>{i.value[g.value]=a.queryForm[g.value],D(a.queryForm[g.value])?c({key:g.value}):p(g.value,g.label)})},{deep:!0});const b=r.ref(),y=r.reactive({});return r.onMounted(()=>{var g;b.value&&(y.hide=(g=b.value)==null?void 0:g.hide)}),t(y),(g,v)=>(r.openBlock(),r.createBlock(r.unref(M.ElPopover),r.mergeProps({ref_key:"popoverRef",ref:b},g.$attrs,{visible:n.value,placement:"bottom",width:e.width,"show-arrow":!1,"popper-class":"moreQuery-pop",trigger:"click"}),{reference:r.withCtx(()=>[r.createVNode(r.unref(M.ElButton),{size:e.size,icon:r.unref(X.Operation),onClick:h},null,8,["size","icon"])]),default:r.withCtx(()=>[r.renderSlot(g.$slots,"default",{scopeForm:i.value}),r.createElementVNode("div",Nu,[r.createVNode(r.unref(M.ElButton),{size:e.size,onClick:d,plain:""},{default:r.withCtx(()=>v[1]||(v[1]=[r.createTextVNode("清空")])),_:1,__:[1]},8,["size"]),r.createElementVNode("div",Vu,[r.createVNode(r.unref(M.ElButton),{size:e.size,onClick:v[0]||(v[0]=w=>n.value=!1),plain:""},{default:r.withCtx(()=>v[2]||(v[2]=[r.createTextVNode("关闭")])),_:1,__:[2]},8,["size"]),r.createVNode(r.unref(M.ElButton),{type:"primary",plain:"",size:e.size,onClick:_},{default:r.withCtx(()=>v[3]||(v[3]=[r.createTextVNode("搜索")])),_:1,__:[3]},8,["size"])])])]),_:3},16,["visible","width"]))}}),Pu=e=>(e.install=t=>{const n=e.name;t.component(n,e)},e),Rn=Pu(Lu),Du={class:"jc-list-layout"},Ru={key:1,class:"bottom-header"},qu=r.defineComponent({name:"JcListLayout",__name:"index",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",Du,[t.$slots["top-body"]?(r.openBlock(),r.createBlock(r.unref(M.ElCard),{key:0,class:"top-card",shadow:"never"},{default:r.withCtx(()=>[r.renderSlot(t.$slots,"top-body")]),_:3})):r.createCommentVNode("",!0),t.$slots["bottom-header"]?(r.openBlock(),r.createElementBlock("div",Ru,[r.renderSlot(t.$slots,"bottom-header")])):r.createCommentVNode("",!0),t.$slots["bottom-body"]?(r.openBlock(),r.createBlock(r.unref(M.ElCard),{key:2,class:"bottom-card",shadow:"never"},{default:r.withCtx(()=>[r.renderSlot(t.$slots,"bottom-body")]),_:3})):r.createCommentVNode("",!0)]))}}),Uu=e=>(e.install=t=>{const n=e.name;t.component(n,e)},e),qn=Uu(qu),Ku=Object.freeze(Object.defineProperty({__proto__:null,JcCascader:Nn,JcDatePicker:Vn,JcInputComplex:Pn,JcInputSwitch:Ln,JcListLayout:qn,JcMoreQueryContain:Rn,JcSelectQuery:zn,JcTagQuery:Dn},Symbol.toStringTag,{value:"Module"})),Hu=(e={},t="jc-query-injection-key")=>{e.resetCount=0;const n=mn(e),i=r.reactive({queryForm:n,tags:[]}),{useProvideQueryStore:s}=oe(t),{state:o,setQuery:a,addTag:l,reduceTag:u,reduceAllTag:c,clearQuery:f}=s(i),h=()=>{o.queryForm.resetCount++,f(e)};return{queryForm:o.queryForm,setQuery:a,addTag:l,reduceTag:u,reduceAllTag:c,clearQuery:h}},Qu={install:e=>{for(const t of Object.values(Ku))e.use(t)}};exports.JcCascader=Nn;exports.JcDatePicker=Vn;exports.JcInputComplex=Pn;exports.JcInputSwitch=Ln;exports.JcListLayout=qn;exports.JcMoreQueryContain=Rn;exports.JcSelectQuery=zn;exports.JcTagQuery=Dn;exports.default=Qu;exports.reactiveQuery=Hu;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bscjc/webui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/lib/index.cjs",
|
|
7
7
|
"module": "./dist/es/index.mjs",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"cssnano": "^7.0.7",
|
|
53
53
|
"unplugin-element-plus": "^0.10.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "e9b9e17e81f13d3d0d00cb5bee482a523c78c441"
|
|
56
56
|
}
|