@bscjc/webui 1.4.0 → 1.4.1
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/components/JcColumnConfig/index.d.ts +15 -0
- package/dist/components/JcColumnConfig/index.vue.d.ts +9 -0
- package/dist/components/JcColumnConfig/types.d.ts +2 -0
- package/dist/components/JcColumnConfig/useColumnConfig.d.ts +2 -0
- package/dist/es/index.mjs +1462 -1427
- package/dist/index.css +2 -2
- package/dist/lib/index.cjs +8 -8
- package/dist/types/components/JcColumnConfig/index.d.ts +15 -0
- package/dist/types/components/JcColumnConfig/index.vue.d.ts +9 -0
- package/dist/types/components/JcColumnConfig/types.d.ts +2 -0
- package/dist/types/components/JcColumnConfig/useColumnConfig.d.ts +2 -0
- package/package.json +2 -2
package/dist/es/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { nextTick as Z, pushScopeId as
|
|
2
|
-
import { isEmpty as
|
|
3
|
-
import { createInjectionState as
|
|
4
|
-
import { Search as
|
|
5
|
-
import { ElSelect as
|
|
1
|
+
import { nextTick as Z, pushScopeId as Xt, popScopeId as Zt, withScopeId as es, createBlock as re, openBlock as j, markRaw as ts, shallowReactive as ss, resolveComponent as te, resolveDirective as is, withDirectives as Be, createElementBlock as G, normalizeClass as Te, createCommentVNode as me, createVNode as E, renderSlot as ye, resolveDynamicComponent as yt, normalizeStyle as Qe, withCtx as S, Fragment as xe, renderList as we, mergeProps as de, toHandlers as ls, reactive as Ae, defineComponent as he, ref as T, watch as oe, onMounted as ke, onUnmounted as $t, unref as I, createSlots as zt, createElementVNode as F, vModelText as ns, createTextVNode as J, toDisplayString as se, withModifiers as Mt, vShow as Ne, computed as ue, normalizeProps as os, guardReactiveProps as rs, toRef as Le } from "vue";
|
|
2
|
+
import { isEmpty as as, isNil as bt, isObject as Ct, isArray as De, cloneDeep as Pe, findIndex as us, filter as cs, includes as ds } from "lodash-es";
|
|
3
|
+
import { createInjectionState as fs } from "@vueuse/shared";
|
|
4
|
+
import { Search as He, CirclePlus as hs, Close as Lt, Grid as ps, Delete as vs, Operation as ms, InfoFilled as gs, Setting as ys } from "@element-plus/icons-vue";
|
|
5
|
+
import { ElSelect as ft, ElOption as ht, ElCheckbox as _t, ElCheckboxGroup as bs, ElButton as be, ElInput as Ze, ElIcon as Ve, ElPopover as Tt, ElMessage as ne, ElTag as Cs, ElTooltip as _s, ElCard as St, ElLoading as Bt, ElMessageBox as Ss } from "element-plus";
|
|
6
6
|
import "element-plus/es/components/select/style/index";
|
|
7
7
|
import "element-plus/es/components/option/style/index";
|
|
8
8
|
import "element-plus/es/components/checkbox-group/style/index";
|
|
@@ -17,38 +17,38 @@ import "element-plus/es/components/tooltip/style/index";
|
|
|
17
17
|
import "element-plus/es/components/card/style/index";
|
|
18
18
|
import "element-plus/es/components/loading/style/index";
|
|
19
19
|
import "element-plus/es/components/message-box/style/index";
|
|
20
|
-
import
|
|
21
|
-
function
|
|
20
|
+
import xs from "vuedraggable";
|
|
21
|
+
function ws(e) {
|
|
22
22
|
const t = /* @__PURE__ */ Object.create(null);
|
|
23
23
|
return function(i) {
|
|
24
24
|
return t[i] || (t[i] = e(i));
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
const
|
|
27
|
+
const Vt = ws(function(e) {
|
|
28
28
|
return e === null ? "" : e.replace(/(\s*)/g, "");
|
|
29
29
|
});
|
|
30
|
-
function
|
|
30
|
+
function ks(e) {
|
|
31
31
|
const t = Object.prototype.toString.call(e);
|
|
32
|
-
return
|
|
32
|
+
return Vt(t).replace(/(\[|object|\])/g, "");
|
|
33
33
|
}
|
|
34
34
|
function Y(e) {
|
|
35
|
-
const t =
|
|
35
|
+
const t = ks(e);
|
|
36
36
|
let s;
|
|
37
37
|
switch (t) {
|
|
38
38
|
case "String":
|
|
39
|
-
s = !
|
|
39
|
+
s = !Vt(e);
|
|
40
40
|
break;
|
|
41
41
|
case "Number":
|
|
42
|
-
s =
|
|
42
|
+
s = bt(e);
|
|
43
43
|
break;
|
|
44
44
|
case "Boolean":
|
|
45
|
-
s =
|
|
45
|
+
s = bt(e);
|
|
46
46
|
break;
|
|
47
47
|
case "Array":
|
|
48
48
|
case "Object":
|
|
49
49
|
case "Map":
|
|
50
50
|
case "Set":
|
|
51
|
-
s =
|
|
51
|
+
s = as(e);
|
|
52
52
|
break;
|
|
53
53
|
default:
|
|
54
54
|
s = !0;
|
|
@@ -56,7 +56,7 @@ function Y(e) {
|
|
|
56
56
|
}
|
|
57
57
|
return s;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function As() {
|
|
60
60
|
var e = window.navigator.userAgent, t = e.indexOf("MSIE ");
|
|
61
61
|
if (t > 0)
|
|
62
62
|
return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10);
|
|
@@ -65,14 +65,14 @@ function Ss() {
|
|
|
65
65
|
var i = e.indexOf("rv:");
|
|
66
66
|
return parseInt(e.substring(i + 3, e.indexOf(".", i)), 10);
|
|
67
67
|
}
|
|
68
|
-
var
|
|
69
|
-
return
|
|
68
|
+
var l = e.indexOf("Edge/");
|
|
69
|
+
return l > 0 ? parseInt(e.substring(l + 5, e.indexOf(".", l)), 10) : -1;
|
|
70
70
|
}
|
|
71
|
-
let
|
|
72
|
-
function
|
|
73
|
-
|
|
71
|
+
let je;
|
|
72
|
+
function et() {
|
|
73
|
+
et.init || (et.init = !0, je = As() !== -1);
|
|
74
74
|
}
|
|
75
|
-
var
|
|
75
|
+
var We = {
|
|
76
76
|
name: "ResizeObserver",
|
|
77
77
|
props: {
|
|
78
78
|
emitOnMount: {
|
|
@@ -92,11 +92,11 @@ var He = {
|
|
|
92
92
|
"notify"
|
|
93
93
|
],
|
|
94
94
|
mounted() {
|
|
95
|
-
|
|
95
|
+
et(), Z(() => {
|
|
96
96
|
this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.emitOnMount && this.emitSize();
|
|
97
97
|
});
|
|
98
98
|
const e = document.createElement("object");
|
|
99
|
-
this._resizeObject = e, e.setAttribute("aria-hidden", "true"), e.setAttribute("tabindex", -1), e.onload = this.addResizeHandlers, e.type = "text/html",
|
|
99
|
+
this._resizeObject = e, e.setAttribute("aria-hidden", "true"), e.setAttribute("tabindex", -1), e.onload = this.addResizeHandlers, e.type = "text/html", je && this.$el.appendChild(e), e.data = "about:blank", je || this.$el.appendChild(e);
|
|
100
100
|
},
|
|
101
101
|
beforeUnmount() {
|
|
102
102
|
this.removeResizeHandlers();
|
|
@@ -115,82 +115,82 @@ var He = {
|
|
|
115
115
|
this._resizeObject.contentDocument.defaultView.addEventListener("resize", this.compareAndNotify), this.compareAndNotify();
|
|
116
116
|
},
|
|
117
117
|
removeResizeHandlers() {
|
|
118
|
-
this._resizeObject && this._resizeObject.onload && (!
|
|
118
|
+
this._resizeObject && this._resizeObject.onload && (!je && this._resizeObject.contentDocument && this._resizeObject.contentDocument.defaultView.removeEventListener("resize", this.compareAndNotify), this.$el.removeChild(this._resizeObject), this._resizeObject.onload = null, this._resizeObject = null);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
const
|
|
122
|
+
const Fs = /* @__PURE__ */ es("data-v-b329ee4c");
|
|
123
|
+
Xt("data-v-b329ee4c");
|
|
124
|
+
const Es = {
|
|
125
125
|
class: "resize-observer",
|
|
126
126
|
tabindex: "-1"
|
|
127
127
|
};
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
function
|
|
128
|
+
Zt();
|
|
129
|
+
const Is = /* @__PURE__ */ Fs((e, t, s, i, l, n) => (j(), re("div", Es)));
|
|
130
|
+
We.render = Is;
|
|
131
|
+
We.__scopeId = "data-v-b329ee4c";
|
|
132
|
+
We.__file = "src/components/ResizeObserver.vue";
|
|
133
|
+
function Re(e) {
|
|
134
134
|
"@babel/helpers - typeof";
|
|
135
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
135
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Re = function(t) {
|
|
136
136
|
return typeof t;
|
|
137
|
-
} :
|
|
137
|
+
} : Re = function(t) {
|
|
138
138
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
139
|
-
},
|
|
139
|
+
}, Re(e);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function $s(e, t) {
|
|
142
142
|
if (!(e instanceof t))
|
|
143
143
|
throw new TypeError("Cannot call a class as a function");
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function zs(e, t) {
|
|
146
146
|
for (var s = 0; s < t.length; s++) {
|
|
147
147
|
var i = t[s];
|
|
148
148
|
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
return t &&
|
|
151
|
+
function Ms(e, t, s) {
|
|
152
|
+
return t && zs(e.prototype, t), e;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
return
|
|
154
|
+
function xt(e) {
|
|
155
|
+
return Ls(e) || Ts(e) || Bs(e) || Vs();
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
if (Array.isArray(e)) return
|
|
157
|
+
function Ls(e) {
|
|
158
|
+
if (Array.isArray(e)) return tt(e);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Ts(e) {
|
|
161
161
|
if (typeof Symbol < "u" && Symbol.iterator in Object(e)) return Array.from(e);
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Bs(e, t) {
|
|
164
164
|
if (e) {
|
|
165
|
-
if (typeof e == "string") return
|
|
165
|
+
if (typeof e == "string") return tt(e, t);
|
|
166
166
|
var s = Object.prototype.toString.call(e).slice(8, -1);
|
|
167
167
|
if (s === "Object" && e.constructor && (s = e.constructor.name), s === "Map" || s === "Set") return Array.from(e);
|
|
168
|
-
if (s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)) return
|
|
168
|
+
if (s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)) return tt(e, t);
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function tt(e, t) {
|
|
172
172
|
(t == null || t > e.length) && (t = e.length);
|
|
173
173
|
for (var s = 0, i = new Array(t); s < t; s++) i[s] = e[s];
|
|
174
174
|
return i;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Vs() {
|
|
177
177
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
178
178
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function Ds(e) {
|
|
181
181
|
var t;
|
|
182
182
|
return typeof e == "function" ? t = {
|
|
183
183
|
callback: e
|
|
184
184
|
} : t = e, t;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i,
|
|
188
|
-
for (var c = arguments.length,
|
|
189
|
-
|
|
190
|
-
if (
|
|
186
|
+
function Os(e, t) {
|
|
187
|
+
var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i, l, n, r = function(u) {
|
|
188
|
+
for (var c = arguments.length, a = new Array(c > 1 ? c - 1 : 0), v = 1; v < c; v++)
|
|
189
|
+
a[v - 1] = arguments[v];
|
|
190
|
+
if (n = a, !(i && u === l)) {
|
|
191
191
|
var d = s.leading;
|
|
192
|
-
typeof d == "function" && (d = d(
|
|
193
|
-
e.apply(void 0, [
|
|
192
|
+
typeof d == "function" && (d = d(u, l)), (!i || u !== l) && d && e.apply(void 0, [u].concat(xt(n))), l = u, clearTimeout(i), i = setTimeout(function() {
|
|
193
|
+
e.apply(void 0, [u].concat(xt(n))), i = 0;
|
|
194
194
|
}, t);
|
|
195
195
|
}
|
|
196
196
|
};
|
|
@@ -198,50 +198,50 @@ function Ts(e, t) {
|
|
|
198
198
|
clearTimeout(i), i = null;
|
|
199
199
|
}, r;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Dt(e, t) {
|
|
202
202
|
if (e === t) return !0;
|
|
203
|
-
if (
|
|
203
|
+
if (Re(e) === "object") {
|
|
204
204
|
for (var s in e)
|
|
205
|
-
if (!
|
|
205
|
+
if (!Dt(e[s], t[s]))
|
|
206
206
|
return !1;
|
|
207
207
|
return !0;
|
|
208
208
|
}
|
|
209
209
|
return !1;
|
|
210
210
|
}
|
|
211
|
-
var
|
|
211
|
+
var js = /* @__PURE__ */ function() {
|
|
212
212
|
function e(t, s, i) {
|
|
213
|
-
|
|
213
|
+
$s(this, e), this.el = t, this.observer = null, this.frozen = !1, this.createObserver(s, i);
|
|
214
214
|
}
|
|
215
|
-
return
|
|
215
|
+
return Ms(e, [{
|
|
216
216
|
key: "createObserver",
|
|
217
217
|
value: function(s, i) {
|
|
218
|
-
var
|
|
218
|
+
var l = this;
|
|
219
219
|
if (this.observer && this.destroyObserver(), !this.frozen) {
|
|
220
|
-
if (this.options =
|
|
221
|
-
|
|
220
|
+
if (this.options = Ds(s), this.callback = function(o, u) {
|
|
221
|
+
l.options.callback(o, u), o && l.options.once && (l.frozen = !0, l.destroyObserver());
|
|
222
222
|
}, this.callback && this.options.throttle) {
|
|
223
|
-
var
|
|
224
|
-
this.callback =
|
|
225
|
-
leading: function(
|
|
226
|
-
return r === "both" || r === "visible" &&
|
|
223
|
+
var n = this.options.throttleOptions || {}, r = n.leading;
|
|
224
|
+
this.callback = Os(this.callback, this.options.throttle, {
|
|
225
|
+
leading: function(u) {
|
|
226
|
+
return r === "both" || r === "visible" && u || r === "hidden" && !u;
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
230
|
this.oldResult = void 0, this.observer = new IntersectionObserver(function(o) {
|
|
231
|
-
var
|
|
231
|
+
var u = o[0];
|
|
232
232
|
if (o.length > 1) {
|
|
233
|
-
var c = o.find(function(
|
|
234
|
-
return
|
|
233
|
+
var c = o.find(function(v) {
|
|
234
|
+
return v.isIntersecting;
|
|
235
235
|
});
|
|
236
|
-
c && (
|
|
236
|
+
c && (u = c);
|
|
237
237
|
}
|
|
238
|
-
if (
|
|
239
|
-
var
|
|
240
|
-
if (
|
|
241
|
-
|
|
238
|
+
if (l.callback) {
|
|
239
|
+
var a = u.isIntersecting && u.intersectionRatio >= l.threshold;
|
|
240
|
+
if (a === l.oldResult) return;
|
|
241
|
+
l.oldResult = a, l.callback(a, u);
|
|
242
242
|
}
|
|
243
243
|
}, this.options.intersection), Z(function() {
|
|
244
|
-
|
|
244
|
+
l.observer && l.observer.observe(l.el);
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
}
|
|
@@ -257,67 +257,67 @@ var Bs = /* @__PURE__ */ function() {
|
|
|
257
257
|
}
|
|
258
258
|
}]), e;
|
|
259
259
|
}();
|
|
260
|
-
function
|
|
260
|
+
function Ot(e, t, s) {
|
|
261
261
|
var i = t.value;
|
|
262
262
|
if (i)
|
|
263
263
|
if (typeof IntersectionObserver > "u")
|
|
264
264
|
console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");
|
|
265
265
|
else {
|
|
266
|
-
var
|
|
267
|
-
e._vue_visibilityState =
|
|
266
|
+
var l = new js(e, i, s);
|
|
267
|
+
e._vue_visibilityState = l;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
var i = t.value,
|
|
272
|
-
if (!
|
|
273
|
-
var
|
|
270
|
+
function Rs(e, t, s) {
|
|
271
|
+
var i = t.value, l = t.oldValue;
|
|
272
|
+
if (!Dt(i, l)) {
|
|
273
|
+
var n = e._vue_visibilityState;
|
|
274
274
|
if (!i) {
|
|
275
|
-
|
|
275
|
+
jt(e);
|
|
276
276
|
return;
|
|
277
277
|
}
|
|
278
|
-
|
|
278
|
+
n ? n.createObserver(i, s) : Ot(e, {
|
|
279
279
|
value: i
|
|
280
280
|
}, s);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function jt(e) {
|
|
284
284
|
var t = e._vue_visibilityState;
|
|
285
285
|
t && (t.destroyObserver(), delete e._vue_visibilityState);
|
|
286
286
|
}
|
|
287
|
-
var
|
|
288
|
-
beforeMount:
|
|
289
|
-
updated:
|
|
290
|
-
unmounted:
|
|
291
|
-
},
|
|
287
|
+
var Ns = {
|
|
288
|
+
beforeMount: Ot,
|
|
289
|
+
updated: Rs,
|
|
290
|
+
unmounted: jt
|
|
291
|
+
}, Ps = {
|
|
292
292
|
itemsLimit: 1e3
|
|
293
|
-
},
|
|
294
|
-
function
|
|
295
|
-
return e.parentNode === null ? t :
|
|
293
|
+
}, qs = /(auto|scroll)/;
|
|
294
|
+
function Rt(e, t) {
|
|
295
|
+
return e.parentNode === null ? t : Rt(e.parentNode, t.concat([e]));
|
|
296
296
|
}
|
|
297
|
-
var
|
|
297
|
+
var Ye = function(t, s) {
|
|
298
298
|
return getComputedStyle(t, null).getPropertyValue(s);
|
|
299
|
-
},
|
|
300
|
-
return
|
|
301
|
-
},
|
|
302
|
-
return
|
|
299
|
+
}, Us = function(t) {
|
|
300
|
+
return Ye(t, "overflow") + Ye(t, "overflow-y") + Ye(t, "overflow-x");
|
|
301
|
+
}, Ks = function(t) {
|
|
302
|
+
return qs.test(Us(t));
|
|
303
303
|
};
|
|
304
|
-
function
|
|
304
|
+
function wt(e) {
|
|
305
305
|
if (e instanceof HTMLElement || e instanceof SVGElement) {
|
|
306
|
-
for (var t =
|
|
307
|
-
if (
|
|
306
|
+
for (var t = Rt(e.parentNode, []), s = 0; s < t.length; s += 1)
|
|
307
|
+
if (Ks(t[s]))
|
|
308
308
|
return t[s];
|
|
309
309
|
return document.scrollingElement || document.documentElement;
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function st(e) {
|
|
313
313
|
"@babel/helpers - typeof";
|
|
314
|
-
return
|
|
314
|
+
return st = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
315
315
|
return typeof t;
|
|
316
316
|
} : function(t) {
|
|
317
317
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
318
|
-
},
|
|
318
|
+
}, st(e);
|
|
319
319
|
}
|
|
320
|
-
var
|
|
320
|
+
var Qs = {
|
|
321
321
|
items: {
|
|
322
322
|
type: Array,
|
|
323
323
|
required: !0
|
|
@@ -342,33 +342,33 @@ var Ps = {
|
|
|
342
342
|
default: "div"
|
|
343
343
|
}
|
|
344
344
|
};
|
|
345
|
-
function
|
|
346
|
-
return this.items.length &&
|
|
345
|
+
function Hs() {
|
|
346
|
+
return this.items.length && st(this.items[0]) !== "object";
|
|
347
347
|
}
|
|
348
|
-
var
|
|
348
|
+
var it = !1;
|
|
349
349
|
if (typeof window < "u") {
|
|
350
|
-
|
|
350
|
+
it = !1;
|
|
351
351
|
try {
|
|
352
|
-
var
|
|
352
|
+
var Ws = Object.defineProperty({}, "passive", {
|
|
353
353
|
get: function() {
|
|
354
|
-
|
|
354
|
+
it = !0;
|
|
355
355
|
}
|
|
356
356
|
});
|
|
357
|
-
window.addEventListener("test", null,
|
|
357
|
+
window.addEventListener("test", null, Ws);
|
|
358
358
|
} catch {
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
let
|
|
362
|
-
var
|
|
361
|
+
let Gs = 0;
|
|
362
|
+
var pt = {
|
|
363
363
|
name: "RecycleScroller",
|
|
364
364
|
components: {
|
|
365
|
-
ResizeObserver:
|
|
365
|
+
ResizeObserver: We
|
|
366
366
|
},
|
|
367
367
|
directives: {
|
|
368
|
-
ObserveVisibility:
|
|
368
|
+
ObserveVisibility: Ns
|
|
369
369
|
},
|
|
370
370
|
props: {
|
|
371
|
-
...
|
|
371
|
+
...Qs,
|
|
372
372
|
itemSize: {
|
|
373
373
|
type: Number,
|
|
374
374
|
default: null
|
|
@@ -456,17 +456,17 @@ var dt = {
|
|
|
456
456
|
const e = {
|
|
457
457
|
"-1": { accumulator: 0 }
|
|
458
458
|
}, t = this.items, s = this.sizeField, i = this.minItemSize;
|
|
459
|
-
let
|
|
460
|
-
for (let o = 0,
|
|
461
|
-
r = t[o][s] || i, r <
|
|
462
|
-
return this.$_computedMinItemSize =
|
|
459
|
+
let l = 1e4, n = 0, r;
|
|
460
|
+
for (let o = 0, u = t.length; o < u; o++)
|
|
461
|
+
r = t[o][s] || i, r < l && (l = r), n += r, e[o] = { accumulator: n, size: r };
|
|
462
|
+
return this.$_computedMinItemSize = l, e;
|
|
463
463
|
}
|
|
464
464
|
return [];
|
|
465
465
|
},
|
|
466
|
-
simpleArray:
|
|
466
|
+
simpleArray: Hs,
|
|
467
467
|
itemIndexByKey() {
|
|
468
468
|
const { keyField: e, items: t } = this, s = {};
|
|
469
|
-
for (let i = 0,
|
|
469
|
+
for (let i = 0, l = t.length; i < l; i++)
|
|
470
470
|
s[t[i][e]] = i;
|
|
471
471
|
return s;
|
|
472
472
|
}
|
|
@@ -509,24 +509,24 @@ var dt = {
|
|
|
509
509
|
this.removeListeners();
|
|
510
510
|
},
|
|
511
511
|
methods: {
|
|
512
|
-
addView(e, t, s, i,
|
|
513
|
-
const
|
|
514
|
-
id:
|
|
512
|
+
addView(e, t, s, i, l) {
|
|
513
|
+
const n = ts({
|
|
514
|
+
id: Gs++,
|
|
515
515
|
index: t,
|
|
516
516
|
used: !0,
|
|
517
517
|
key: i,
|
|
518
|
-
type:
|
|
519
|
-
}), r =
|
|
518
|
+
type: l
|
|
519
|
+
}), r = ss({
|
|
520
520
|
item: s,
|
|
521
521
|
position: 0,
|
|
522
|
-
nr:
|
|
522
|
+
nr: n
|
|
523
523
|
});
|
|
524
524
|
return e.push(r), r;
|
|
525
525
|
},
|
|
526
526
|
unuseView(e, t = !1) {
|
|
527
527
|
const s = this.$_unusedViews, i = e.nr.type;
|
|
528
|
-
let
|
|
529
|
-
|
|
528
|
+
let l = s.get(i);
|
|
529
|
+
l || (l = [], s.set(i, l)), l.push(e), t || (e.nr.used = !1, e.position = -9999);
|
|
530
530
|
},
|
|
531
531
|
handleResize() {
|
|
532
532
|
this.$emit("resize"), this.ready && this.updateVisibleItems(!1);
|
|
@@ -550,85 +550,85 @@ var dt = {
|
|
|
550
550
|
})) : this.$emit("hidden"));
|
|
551
551
|
},
|
|
552
552
|
updateVisibleItems(e, t = !1) {
|
|
553
|
-
const s = this.itemSize, i = this.gridItems || 1,
|
|
554
|
-
let
|
|
553
|
+
const s = this.itemSize, i = this.gridItems || 1, l = this.itemSecondarySize || s, n = this.$_computedMinItemSize, r = this.typeField, o = this.simpleArray ? null : this.keyField, u = this.items, c = u.length, a = this.sizes, v = this.$_views, d = this.$_unusedViews, g = this.pool, M = this.itemIndexByKey;
|
|
554
|
+
let w, b, h, p, C;
|
|
555
555
|
if (!c)
|
|
556
|
-
|
|
556
|
+
w = b = p = C = h = 0;
|
|
557
557
|
else if (this.$_prerender)
|
|
558
|
-
|
|
558
|
+
w = p = 0, b = C = Math.min(this.prerender, u.length), h = null;
|
|
559
559
|
else {
|
|
560
560
|
const $ = this.getScroll();
|
|
561
561
|
if (t) {
|
|
562
|
-
let
|
|
563
|
-
if (
|
|
562
|
+
let W = $.start - this.$_lastUpdateScrollPosition;
|
|
563
|
+
if (W < 0 && (W = -W), s === null && W < n || W < s)
|
|
564
564
|
return {
|
|
565
565
|
continuous: !0
|
|
566
566
|
};
|
|
567
567
|
}
|
|
568
568
|
this.$_lastUpdateScrollPosition = $.start;
|
|
569
|
-
const
|
|
570
|
-
$.start -=
|
|
569
|
+
const N = this.buffer;
|
|
570
|
+
$.start -= N, $.end += N;
|
|
571
571
|
let R = 0;
|
|
572
572
|
if (this.$refs.before && (R = this.$refs.before.scrollHeight, $.start -= R), this.$refs.after) {
|
|
573
|
-
const
|
|
574
|
-
$.end +=
|
|
573
|
+
const W = this.$refs.after.scrollHeight;
|
|
574
|
+
$.end += W;
|
|
575
575
|
}
|
|
576
576
|
if (s === null) {
|
|
577
|
-
let
|
|
577
|
+
let W, B = 0, y = c - 1, A = ~~(c / 2), z;
|
|
578
578
|
do
|
|
579
|
-
z =
|
|
580
|
-
while (
|
|
581
|
-
for (
|
|
582
|
-
for (
|
|
583
|
-
for (
|
|
579
|
+
z = A, W = a[A].accumulator, W < $.start ? B = A : A < c - 1 && a[A + 1].accumulator > $.start && (y = A), A = ~~((B + y) / 2);
|
|
580
|
+
while (A !== z);
|
|
581
|
+
for (A < 0 && (A = 0), w = A, h = a[c - 1].accumulator, b = A; b < c && a[b].accumulator < $.end; b++) ;
|
|
582
|
+
for (b === -1 ? b = u.length - 1 : (b++, b > c && (b = c)), p = w; p < c && R + a[p].accumulator < $.start; p++) ;
|
|
583
|
+
for (C = p; C < c && R + a[C].accumulator < $.end; C++) ;
|
|
584
584
|
} else {
|
|
585
|
-
|
|
586
|
-
const
|
|
587
|
-
|
|
585
|
+
w = ~~($.start / s * i);
|
|
586
|
+
const W = w % i;
|
|
587
|
+
w -= W, b = Math.ceil($.end / s * i), p = Math.max(0, Math.floor(($.start - R) / s * i)), C = Math.floor(($.end - R) / s * i), w < 0 && (w = 0), b > c && (b = c), p < 0 && (p = 0), C > c && (C = c), h = Math.ceil(c / i) * s;
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
|
|
591
|
-
let
|
|
592
|
-
const
|
|
593
|
-
if (
|
|
594
|
-
for (let $ = 0,
|
|
595
|
-
|
|
596
|
-
const
|
|
597
|
-
let m,
|
|
598
|
-
for (let $ =
|
|
599
|
-
m =
|
|
600
|
-
const
|
|
601
|
-
if (
|
|
602
|
-
throw new Error(`Key is ${
|
|
603
|
-
if (
|
|
604
|
-
|
|
590
|
+
b - w > Ps.itemsLimit && this.itemsLimitError(), this.totalSize = h;
|
|
591
|
+
let _;
|
|
592
|
+
const x = w <= this.$_endIndex && b >= this.$_startIndex;
|
|
593
|
+
if (x)
|
|
594
|
+
for (let $ = 0, N = g.length; $ < N; $++)
|
|
595
|
+
_ = g[$], _.nr.used && (e && (_.nr.index = M[_.item[o]]), (_.nr.index == null || _.nr.index < w || _.nr.index >= b) && this.unuseView(_));
|
|
596
|
+
const k = x ? null : /* @__PURE__ */ new Map();
|
|
597
|
+
let m, V, P;
|
|
598
|
+
for (let $ = w; $ < b; $++) {
|
|
599
|
+
m = u[$];
|
|
600
|
+
const N = o ? m[o] : m;
|
|
601
|
+
if (N == null)
|
|
602
|
+
throw new Error(`Key is ${N} on item (keyField is '${o}')`);
|
|
603
|
+
if (_ = v.get(N), !s && !a[$].size) {
|
|
604
|
+
_ && this.unuseView(_);
|
|
605
605
|
continue;
|
|
606
606
|
}
|
|
607
|
-
|
|
608
|
-
let R = d.get(
|
|
609
|
-
if (!
|
|
610
|
-
|
|
611
|
-
else if (!
|
|
612
|
-
const
|
|
613
|
-
|
|
607
|
+
V = m[r];
|
|
608
|
+
let R = d.get(V), W = !1;
|
|
609
|
+
if (!_)
|
|
610
|
+
x ? R && R.length ? _ = R.pop() : _ = this.addView(g, $, m, N, V) : (P = k.get(V) || 0, (!R || P >= R.length) && (_ = this.addView(g, $, m, N, V), this.unuseView(_, !0), R = d.get(V)), _ = R[P], k.set(V, P + 1)), v.delete(_.nr.key), _.nr.used = !0, _.nr.index = $, _.nr.key = N, _.nr.type = V, v.set(N, _), W = !0;
|
|
611
|
+
else if (!_.nr.used && (_.nr.used = !0, W = !0, R)) {
|
|
612
|
+
const B = R.indexOf(_);
|
|
613
|
+
B !== -1 && R.splice(B, 1);
|
|
614
614
|
}
|
|
615
|
-
|
|
615
|
+
_.item = m, W && ($ === u.length - 1 && this.$emit("scroll-end"), $ === 0 && this.$emit("scroll-start")), s === null ? (_.position = a[$ - 1].accumulator, _.offset = 0) : (_.position = Math.floor($ / i) * s, _.offset = $ % i * l);
|
|
616
616
|
}
|
|
617
|
-
return this.$_startIndex =
|
|
618
|
-
continuous:
|
|
617
|
+
return this.$_startIndex = w, this.$_endIndex = b, this.emitUpdate && this.$emit("update", w, b, p, C), clearTimeout(this.$_sortTimer), this.$_sortTimer = setTimeout(this.sortViews, this.updateInterval + 300), {
|
|
618
|
+
continuous: x
|
|
619
619
|
};
|
|
620
620
|
},
|
|
621
621
|
getListenerTarget() {
|
|
622
|
-
let e =
|
|
622
|
+
let e = wt(this.$el);
|
|
623
623
|
return window.document && (e === window.document.documentElement || e === window.document.body) && (e = window), e;
|
|
624
624
|
},
|
|
625
625
|
getScroll() {
|
|
626
626
|
const { $el: e, direction: t } = this, s = t === "vertical";
|
|
627
627
|
let i;
|
|
628
628
|
if (this.pageMode) {
|
|
629
|
-
const
|
|
630
|
-
let r = -(s ?
|
|
631
|
-
r < 0 && (o += r, r = 0), r + o >
|
|
629
|
+
const l = e.getBoundingClientRect(), n = s ? l.height : l.width;
|
|
630
|
+
let r = -(s ? l.top : l.left), o = s ? window.innerHeight : window.innerWidth;
|
|
631
|
+
r < 0 && (o += r, r = 0), r + o > n && (o = n - r), i = {
|
|
632
632
|
start: r,
|
|
633
633
|
end: r + o
|
|
634
634
|
};
|
|
@@ -645,7 +645,7 @@ var dt = {
|
|
|
645
645
|
this.pageMode ? this.addListeners() : this.removeListeners();
|
|
646
646
|
},
|
|
647
647
|
addListeners() {
|
|
648
|
-
this.listenerTarget = this.getListenerTarget(), this.listenerTarget.addEventListener("scroll", this.handleScroll,
|
|
648
|
+
this.listenerTarget = this.getListenerTarget(), this.listenerTarget.addEventListener("scroll", this.handleScroll, it ? {
|
|
649
649
|
passive: !0
|
|
650
650
|
} : !1), this.listenerTarget.addEventListener("resize", this.handleResize);
|
|
651
651
|
},
|
|
@@ -659,13 +659,13 @@ var dt = {
|
|
|
659
659
|
},
|
|
660
660
|
scrollToPosition(e) {
|
|
661
661
|
const t = this.direction === "vertical" ? { scroll: "scrollTop", start: "top" } : { scroll: "scrollLeft", start: "left" };
|
|
662
|
-
let s, i,
|
|
662
|
+
let s, i, l;
|
|
663
663
|
if (this.pageMode) {
|
|
664
|
-
const
|
|
665
|
-
s =
|
|
664
|
+
const n = wt(this.$el), r = n.tagName === "HTML" ? 0 : n[t.scroll], o = n.getBoundingClientRect(), c = this.$el.getBoundingClientRect()[t.start] - o[t.start];
|
|
665
|
+
s = n, i = t.scroll, l = e + r + c;
|
|
666
666
|
} else
|
|
667
|
-
s = this.$el, i = t.scroll,
|
|
668
|
-
s[i] =
|
|
667
|
+
s = this.$el, i = t.scroll, l = e;
|
|
668
|
+
s[i] = l;
|
|
669
669
|
},
|
|
670
670
|
itemsLimitError() {
|
|
671
671
|
throw setTimeout(() => {
|
|
@@ -677,72 +677,72 @@ var dt = {
|
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
679
|
};
|
|
680
|
-
const
|
|
680
|
+
const Js = {
|
|
681
681
|
key: 0,
|
|
682
682
|
ref: "before",
|
|
683
683
|
class: "vue-recycle-scroller__slot"
|
|
684
|
-
},
|
|
684
|
+
}, Ys = {
|
|
685
685
|
key: 1,
|
|
686
686
|
ref: "after",
|
|
687
687
|
class: "vue-recycle-scroller__slot"
|
|
688
688
|
};
|
|
689
|
-
function
|
|
690
|
-
const r =
|
|
691
|
-
return
|
|
689
|
+
function Xs(e, t, s, i, l, n) {
|
|
690
|
+
const r = te("ResizeObserver"), o = is("observe-visibility");
|
|
691
|
+
return Be((j(), G(
|
|
692
692
|
"div",
|
|
693
693
|
{
|
|
694
|
-
class:
|
|
695
|
-
ready:
|
|
694
|
+
class: Te(["vue-recycle-scroller", {
|
|
695
|
+
ready: l.ready,
|
|
696
696
|
"page-mode": s.pageMode,
|
|
697
697
|
[`direction-${e.direction}`]: !0
|
|
698
698
|
}]),
|
|
699
|
-
onScrollPassive: t[0] || (t[0] = (...
|
|
699
|
+
onScrollPassive: t[0] || (t[0] = (...u) => n.handleScroll && n.handleScroll(...u))
|
|
700
700
|
},
|
|
701
701
|
[
|
|
702
|
-
e.$slots.before ? (j(),
|
|
702
|
+
e.$slots.before ? (j(), G(
|
|
703
703
|
"div",
|
|
704
|
-
|
|
704
|
+
Js,
|
|
705
705
|
[
|
|
706
706
|
ye(e.$slots, "before")
|
|
707
707
|
],
|
|
708
708
|
512
|
|
709
709
|
/* NEED_PATCH */
|
|
710
|
-
)) :
|
|
711
|
-
(j(),
|
|
710
|
+
)) : me("v-if", !0),
|
|
711
|
+
(j(), re(yt(s.listTag), {
|
|
712
712
|
ref: "wrapper",
|
|
713
|
-
style:
|
|
714
|
-
class:
|
|
713
|
+
style: Qe({ [e.direction === "vertical" ? "minHeight" : "minWidth"]: l.totalSize + "px" }),
|
|
714
|
+
class: Te(["vue-recycle-scroller__item-wrapper", s.listClass])
|
|
715
715
|
}, {
|
|
716
716
|
default: S(() => [
|
|
717
|
-
(j(!0),
|
|
718
|
-
|
|
717
|
+
(j(!0), G(
|
|
718
|
+
xe,
|
|
719
719
|
null,
|
|
720
|
-
|
|
721
|
-
key:
|
|
722
|
-
style:
|
|
723
|
-
transform: `translate${e.direction === "vertical" ? "Y" : "X"}(${
|
|
720
|
+
we(l.pool, (u) => (j(), re(yt(s.itemTag), de({
|
|
721
|
+
key: u.nr.id,
|
|
722
|
+
style: l.ready ? {
|
|
723
|
+
transform: `translate${e.direction === "vertical" ? "Y" : "X"}(${u.position}px) translate${e.direction === "vertical" ? "X" : "Y"}(${u.offset}px)`,
|
|
724
724
|
width: s.gridItems ? `${e.direction === "vertical" && s.itemSecondarySize || s.itemSize}px` : void 0,
|
|
725
725
|
height: s.gridItems ? `${e.direction === "horizontal" && s.itemSecondarySize || s.itemSize}px` : void 0
|
|
726
726
|
} : null,
|
|
727
727
|
class: ["vue-recycle-scroller__item-view", [
|
|
728
728
|
s.itemClass,
|
|
729
729
|
{
|
|
730
|
-
hover: !s.skipHover &&
|
|
730
|
+
hover: !s.skipHover && l.hoverKey === u.nr.key
|
|
731
731
|
}
|
|
732
732
|
]]
|
|
733
|
-
},
|
|
733
|
+
}, ls(s.skipHover ? {} : {
|
|
734
734
|
mouseenter: () => {
|
|
735
|
-
|
|
735
|
+
l.hoverKey = u.nr.key;
|
|
736
736
|
},
|
|
737
737
|
mouseleave: () => {
|
|
738
|
-
|
|
738
|
+
l.hoverKey = null;
|
|
739
739
|
}
|
|
740
740
|
})), {
|
|
741
741
|
default: S(() => [
|
|
742
742
|
ye(e.$slots, "default", {
|
|
743
|
-
item:
|
|
744
|
-
index:
|
|
745
|
-
active:
|
|
743
|
+
item: u.item,
|
|
744
|
+
index: u.nr.index,
|
|
745
|
+
active: u.nr.used
|
|
746
746
|
})
|
|
747
747
|
]),
|
|
748
748
|
_: 2
|
|
@@ -756,69 +756,69 @@ function Ws(e, t, s, i, n, l) {
|
|
|
756
756
|
_: 3
|
|
757
757
|
/* FORWARDED */
|
|
758
758
|
}, 8, ["style", "class"])),
|
|
759
|
-
e.$slots.after ? (j(),
|
|
759
|
+
e.$slots.after ? (j(), G(
|
|
760
760
|
"div",
|
|
761
|
-
|
|
761
|
+
Ys,
|
|
762
762
|
[
|
|
763
763
|
ye(e.$slots, "after")
|
|
764
764
|
],
|
|
765
765
|
512
|
|
766
766
|
/* NEED_PATCH */
|
|
767
|
-
)) :
|
|
768
|
-
|
|
767
|
+
)) : me("v-if", !0),
|
|
768
|
+
E(r, { onNotify: n.handleResize }, null, 8, ["onNotify"])
|
|
769
769
|
],
|
|
770
770
|
34
|
|
771
771
|
/* CLASS, HYDRATE_EVENTS */
|
|
772
772
|
)), [
|
|
773
|
-
[o,
|
|
773
|
+
[o, n.handleVisibilityChange]
|
|
774
774
|
]);
|
|
775
775
|
}
|
|
776
|
-
|
|
777
|
-
|
|
776
|
+
pt.render = Xs;
|
|
777
|
+
pt.__file = "src/components/RecycleScroller.vue";
|
|
778
778
|
function Ce(e) {
|
|
779
|
-
return Array.isArray ? Array.isArray(e) :
|
|
779
|
+
return Array.isArray ? Array.isArray(e) : qt(e) === "[object Array]";
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function Zs(e) {
|
|
782
782
|
if (typeof e == "string")
|
|
783
783
|
return e;
|
|
784
784
|
let t = e + "";
|
|
785
785
|
return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
|
|
786
786
|
}
|
|
787
|
-
function
|
|
788
|
-
return e == null ? "" :
|
|
787
|
+
function ei(e) {
|
|
788
|
+
return e == null ? "" : Zs(e);
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function ve(e) {
|
|
791
791
|
return typeof e == "string";
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function Nt(e) {
|
|
794
794
|
return typeof e == "number";
|
|
795
795
|
}
|
|
796
|
-
function
|
|
797
|
-
return e === !0 || e === !1 ||
|
|
796
|
+
function ti(e) {
|
|
797
|
+
return e === !0 || e === !1 || si(e) && qt(e) == "[object Boolean]";
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function Pt(e) {
|
|
800
800
|
return typeof e == "object";
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
return
|
|
802
|
+
function si(e) {
|
|
803
|
+
return Pt(e) && e !== null;
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function ce(e) {
|
|
806
806
|
return e != null;
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function Xe(e) {
|
|
809
809
|
return !e.trim().length;
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function qt(e) {
|
|
812
812
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
813
813
|
}
|
|
814
|
-
const
|
|
815
|
-
class
|
|
814
|
+
const ii = "Incorrect 'index' type", li = (e) => `Invalid value for key ${e}`, ni = (e) => `Pattern length exceeds max of ${e}.`, oi = (e) => `Missing ${e} property in key`, ri = (e) => `Property 'weight' in key '${e}' must be a positive integer`, kt = Object.prototype.hasOwnProperty;
|
|
815
|
+
class ai {
|
|
816
816
|
constructor(t) {
|
|
817
817
|
this._keys = [], this._keyMap = {};
|
|
818
818
|
let s = 0;
|
|
819
819
|
t.forEach((i) => {
|
|
820
|
-
let
|
|
821
|
-
this._keys.push(
|
|
820
|
+
let l = Ut(i);
|
|
821
|
+
this._keys.push(l), this._keyMap[l.id] = l, s += l.weight;
|
|
822
822
|
}), this._keys.forEach((i) => {
|
|
823
823
|
i.weight /= s;
|
|
824
824
|
});
|
|
@@ -833,49 +833,49 @@ class ni {
|
|
|
833
833
|
return JSON.stringify(this._keys);
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
|
-
function
|
|
837
|
-
let t = null, s = null, i = null,
|
|
838
|
-
if (
|
|
839
|
-
i = e, t =
|
|
836
|
+
function Ut(e) {
|
|
837
|
+
let t = null, s = null, i = null, l = 1, n = null;
|
|
838
|
+
if (ve(e) || Ce(e))
|
|
839
|
+
i = e, t = At(e), s = lt(e);
|
|
840
840
|
else {
|
|
841
|
-
if (!
|
|
842
|
-
throw new Error(
|
|
841
|
+
if (!kt.call(e, "name"))
|
|
842
|
+
throw new Error(oi("name"));
|
|
843
843
|
const r = e.name;
|
|
844
|
-
if (i = r,
|
|
845
|
-
throw new Error(
|
|
846
|
-
t =
|
|
844
|
+
if (i = r, kt.call(e, "weight") && (l = e.weight, l <= 0))
|
|
845
|
+
throw new Error(ri(r));
|
|
846
|
+
t = At(r), s = lt(r), n = e.getFn;
|
|
847
847
|
}
|
|
848
|
-
return { path: t, id: s, weight:
|
|
848
|
+
return { path: t, id: s, weight: l, src: i, getFn: n };
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function At(e) {
|
|
851
851
|
return Ce(e) ? e : e.split(".");
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function lt(e) {
|
|
854
854
|
return Ce(e) ? e.join(".") : e;
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function ui(e, t) {
|
|
857
857
|
let s = [], i = !1;
|
|
858
|
-
const
|
|
859
|
-
if (
|
|
858
|
+
const l = (n, r, o) => {
|
|
859
|
+
if (ce(n))
|
|
860
860
|
if (!r[o])
|
|
861
|
-
s.push(
|
|
861
|
+
s.push(n);
|
|
862
862
|
else {
|
|
863
|
-
let
|
|
864
|
-
const c =
|
|
865
|
-
if (!
|
|
863
|
+
let u = r[o];
|
|
864
|
+
const c = n[u];
|
|
865
|
+
if (!ce(c))
|
|
866
866
|
return;
|
|
867
|
-
if (o === r.length - 1 && (
|
|
868
|
-
s.push(
|
|
867
|
+
if (o === r.length - 1 && (ve(c) || Nt(c) || ti(c)))
|
|
868
|
+
s.push(ei(c));
|
|
869
869
|
else if (Ce(c)) {
|
|
870
870
|
i = !0;
|
|
871
|
-
for (let
|
|
872
|
-
|
|
873
|
-
} else r.length &&
|
|
871
|
+
for (let a = 0, v = c.length; a < v; a += 1)
|
|
872
|
+
l(c[a], r, o + 1);
|
|
873
|
+
} else r.length && l(c, r, o + 1);
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
|
-
return
|
|
876
|
+
return l(e, ve(t) ? t.split(".") : t, 0), i ? s : s[0];
|
|
877
877
|
}
|
|
878
|
-
const
|
|
878
|
+
const ci = {
|
|
879
879
|
// Whether the matches should be included in the result set. When `true`, each record in the result
|
|
880
880
|
// set will include the indices of the matched characters.
|
|
881
881
|
// These can consequently be used for highlighting purposes.
|
|
@@ -885,7 +885,7 @@ const oi = {
|
|
|
885
885
|
findAllMatches: !1,
|
|
886
886
|
// Minimum number of characters that must be matched before a result is considered a match
|
|
887
887
|
minMatchCharLength: 1
|
|
888
|
-
},
|
|
888
|
+
}, di = {
|
|
889
889
|
// When `true`, the algorithm continues searching to the end of the input even if a perfect
|
|
890
890
|
// match is found before the end of the same input.
|
|
891
891
|
isCaseSensitive: !1,
|
|
@@ -899,7 +899,7 @@ const oi = {
|
|
|
899
899
|
shouldSort: !0,
|
|
900
900
|
// Default sort function: sort by ascending score, ascending index
|
|
901
901
|
sortFn: (e, t) => e.score === t.score ? e.idx < t.idx ? -1 : 1 : e.score < t.score ? -1 : 1
|
|
902
|
-
},
|
|
902
|
+
}, fi = {
|
|
903
903
|
// Approximately where in the text is the pattern expected to be found?
|
|
904
904
|
location: 0,
|
|
905
905
|
// At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match
|
|
@@ -911,12 +911,12 @@ const oi = {
|
|
|
911
911
|
// the exact location specified, a threshold of '1000' would require a perfect match
|
|
912
912
|
// to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
|
|
913
913
|
distance: 100
|
|
914
|
-
},
|
|
914
|
+
}, hi = {
|
|
915
915
|
// When `true`, it enables the use of unix-like search commands
|
|
916
916
|
useExtendedSearch: !1,
|
|
917
917
|
// The get function to use when fetching an object's properties.
|
|
918
918
|
// The default will search nested paths *ie foo.bar.baz*
|
|
919
|
-
getFn:
|
|
919
|
+
getFn: ui,
|
|
920
920
|
// When `true`, search will ignore `location` and `distance`, so it won't matter
|
|
921
921
|
// where in the string the pattern appears.
|
|
922
922
|
// More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score
|
|
@@ -928,34 +928,34 @@ const oi = {
|
|
|
928
928
|
// The weight to determine how much field length norm effects scoring.
|
|
929
929
|
fieldNormWeight: 1
|
|
930
930
|
};
|
|
931
|
-
var
|
|
932
|
-
...
|
|
933
|
-
...
|
|
934
|
-
...
|
|
935
|
-
...
|
|
931
|
+
var D = {
|
|
932
|
+
...di,
|
|
933
|
+
...ci,
|
|
934
|
+
...fi,
|
|
935
|
+
...hi
|
|
936
936
|
};
|
|
937
|
-
const
|
|
938
|
-
function
|
|
937
|
+
const pi = /[^ ]+/g;
|
|
938
|
+
function vi(e = 1, t = 3) {
|
|
939
939
|
const s = /* @__PURE__ */ new Map(), i = Math.pow(10, t);
|
|
940
940
|
return {
|
|
941
|
-
get(
|
|
942
|
-
const
|
|
943
|
-
if (s.has(
|
|
944
|
-
return s.get(
|
|
945
|
-
const r = 1 / Math.pow(
|
|
946
|
-
return s.set(
|
|
941
|
+
get(l) {
|
|
942
|
+
const n = l.match(pi).length;
|
|
943
|
+
if (s.has(n))
|
|
944
|
+
return s.get(n);
|
|
945
|
+
const r = 1 / Math.pow(n, 0.5 * e), o = parseFloat(Math.round(r * i) / i);
|
|
946
|
+
return s.set(n, o), o;
|
|
947
947
|
},
|
|
948
948
|
clear() {
|
|
949
949
|
s.clear();
|
|
950
950
|
}
|
|
951
951
|
};
|
|
952
952
|
}
|
|
953
|
-
class
|
|
953
|
+
class vt {
|
|
954
954
|
constructor({
|
|
955
|
-
getFn: t =
|
|
956
|
-
fieldNormWeight: s =
|
|
955
|
+
getFn: t = D.getFn,
|
|
956
|
+
fieldNormWeight: s = D.fieldNormWeight
|
|
957
957
|
} = {}) {
|
|
958
|
-
this.norm =
|
|
958
|
+
this.norm = vi(s, 3), this.getFn = t, this.isCreated = !1, this.setIndexRecords();
|
|
959
959
|
}
|
|
960
960
|
setSources(t = []) {
|
|
961
961
|
this.docs = t;
|
|
@@ -969,7 +969,7 @@ class ft {
|
|
|
969
969
|
});
|
|
970
970
|
}
|
|
971
971
|
create() {
|
|
972
|
-
this.isCreated || !this.docs.length || (this.isCreated = !0,
|
|
972
|
+
this.isCreated || !this.docs.length || (this.isCreated = !0, ve(this.docs[0]) ? this.docs.forEach((t, s) => {
|
|
973
973
|
this._addString(t, s);
|
|
974
974
|
}) : this.docs.forEach((t, s) => {
|
|
975
975
|
this._addObject(t, s);
|
|
@@ -978,7 +978,7 @@ class ft {
|
|
|
978
978
|
// Adds a doc to the end of the index
|
|
979
979
|
add(t) {
|
|
980
980
|
const s = this.size();
|
|
981
|
-
|
|
981
|
+
ve(t) ? this._addString(t, s) : this._addObject(t, s);
|
|
982
982
|
}
|
|
983
983
|
// Removes the doc at the specified index of the index
|
|
984
984
|
removeAt(t) {
|
|
@@ -993,7 +993,7 @@ class ft {
|
|
|
993
993
|
return this.records.length;
|
|
994
994
|
}
|
|
995
995
|
_addString(t, s) {
|
|
996
|
-
if (!
|
|
996
|
+
if (!ce(t) || Xe(t))
|
|
997
997
|
return;
|
|
998
998
|
let i = {
|
|
999
999
|
v: t,
|
|
@@ -1004,36 +1004,36 @@ class ft {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
_addObject(t, s) {
|
|
1006
1006
|
let i = { i: s, $: {} };
|
|
1007
|
-
this.keys.forEach((
|
|
1008
|
-
let r =
|
|
1009
|
-
if (
|
|
1007
|
+
this.keys.forEach((l, n) => {
|
|
1008
|
+
let r = l.getFn ? l.getFn(t) : this.getFn(t, l.path);
|
|
1009
|
+
if (ce(r)) {
|
|
1010
1010
|
if (Ce(r)) {
|
|
1011
1011
|
let o = [];
|
|
1012
|
-
const
|
|
1013
|
-
for (;
|
|
1014
|
-
const { nestedArrIndex: c, value:
|
|
1015
|
-
if (
|
|
1016
|
-
if (
|
|
1017
|
-
let
|
|
1018
|
-
v:
|
|
1012
|
+
const u = [{ nestedArrIndex: -1, value: r }];
|
|
1013
|
+
for (; u.length; ) {
|
|
1014
|
+
const { nestedArrIndex: c, value: a } = u.pop();
|
|
1015
|
+
if (ce(a))
|
|
1016
|
+
if (ve(a) && !Xe(a)) {
|
|
1017
|
+
let v = {
|
|
1018
|
+
v: a,
|
|
1019
1019
|
i: c,
|
|
1020
|
-
n: this.norm.get(
|
|
1020
|
+
n: this.norm.get(a)
|
|
1021
1021
|
};
|
|
1022
|
-
o.push(
|
|
1023
|
-
} else Ce(
|
|
1024
|
-
|
|
1022
|
+
o.push(v);
|
|
1023
|
+
} else Ce(a) && a.forEach((v, d) => {
|
|
1024
|
+
u.push({
|
|
1025
1025
|
nestedArrIndex: d,
|
|
1026
|
-
value:
|
|
1026
|
+
value: v
|
|
1027
1027
|
});
|
|
1028
1028
|
});
|
|
1029
1029
|
}
|
|
1030
|
-
i.$[
|
|
1031
|
-
} else if (
|
|
1030
|
+
i.$[n] = o;
|
|
1031
|
+
} else if (ve(r) && !Xe(r)) {
|
|
1032
1032
|
let o = {
|
|
1033
1033
|
v: r,
|
|
1034
1034
|
n: this.norm.get(r)
|
|
1035
1035
|
};
|
|
1036
|
-
i.$[
|
|
1036
|
+
i.$[n] = o;
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
1039
|
}), this.records.push(i);
|
|
@@ -1045,202 +1045,202 @@ class ft {
|
|
|
1045
1045
|
};
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1049
|
-
const
|
|
1050
|
-
return
|
|
1048
|
+
function Kt(e, t, { getFn: s = D.getFn, fieldNormWeight: i = D.fieldNormWeight } = {}) {
|
|
1049
|
+
const l = new vt({ getFn: s, fieldNormWeight: i });
|
|
1050
|
+
return l.setKeys(e.map(Ut)), l.setSources(t), l.create(), l;
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1053
|
-
const { keys: i, records:
|
|
1054
|
-
return
|
|
1052
|
+
function mi(e, { getFn: t = D.getFn, fieldNormWeight: s = D.fieldNormWeight } = {}) {
|
|
1053
|
+
const { keys: i, records: l } = e, n = new vt({ getFn: t, fieldNormWeight: s });
|
|
1054
|
+
return n.setKeys(i), n.setIndexRecords(l), n;
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1056
|
+
function Oe(e, {
|
|
1057
1057
|
errors: t = 0,
|
|
1058
1058
|
currentLocation: s = 0,
|
|
1059
1059
|
expectedLocation: i = 0,
|
|
1060
|
-
distance:
|
|
1061
|
-
ignoreLocation:
|
|
1060
|
+
distance: l = D.distance,
|
|
1061
|
+
ignoreLocation: n = D.ignoreLocation
|
|
1062
1062
|
} = {}) {
|
|
1063
1063
|
const r = t / e.length;
|
|
1064
|
-
if (
|
|
1064
|
+
if (n)
|
|
1065
1065
|
return r;
|
|
1066
1066
|
const o = Math.abs(i - s);
|
|
1067
|
-
return
|
|
1068
|
-
}
|
|
1069
|
-
function
|
|
1070
|
-
let s = [], i = -1,
|
|
1071
|
-
for (let r = e.length;
|
|
1072
|
-
let o = e[
|
|
1073
|
-
o && i === -1 ? i =
|
|
1074
|
-
}
|
|
1075
|
-
return e[
|
|
1076
|
-
}
|
|
1077
|
-
const
|
|
1078
|
-
function
|
|
1079
|
-
location: i =
|
|
1080
|
-
distance:
|
|
1081
|
-
threshold:
|
|
1082
|
-
findAllMatches: r =
|
|
1083
|
-
minMatchCharLength: o =
|
|
1084
|
-
includeMatches:
|
|
1085
|
-
ignoreLocation: c =
|
|
1067
|
+
return l ? r + o / l : o ? 1 : r;
|
|
1068
|
+
}
|
|
1069
|
+
function gi(e = [], t = D.minMatchCharLength) {
|
|
1070
|
+
let s = [], i = -1, l = -1, n = 0;
|
|
1071
|
+
for (let r = e.length; n < r; n += 1) {
|
|
1072
|
+
let o = e[n];
|
|
1073
|
+
o && i === -1 ? i = n : !o && i !== -1 && (l = n - 1, l - i + 1 >= t && s.push([i, l]), i = -1);
|
|
1074
|
+
}
|
|
1075
|
+
return e[n - 1] && n - i >= t && s.push([i, n - 1]), s;
|
|
1076
|
+
}
|
|
1077
|
+
const ze = 32;
|
|
1078
|
+
function yi(e, t, s, {
|
|
1079
|
+
location: i = D.location,
|
|
1080
|
+
distance: l = D.distance,
|
|
1081
|
+
threshold: n = D.threshold,
|
|
1082
|
+
findAllMatches: r = D.findAllMatches,
|
|
1083
|
+
minMatchCharLength: o = D.minMatchCharLength,
|
|
1084
|
+
includeMatches: u = D.includeMatches,
|
|
1085
|
+
ignoreLocation: c = D.ignoreLocation
|
|
1086
1086
|
} = {}) {
|
|
1087
|
-
if (t.length >
|
|
1088
|
-
throw new Error(
|
|
1089
|
-
const
|
|
1090
|
-
let g =
|
|
1091
|
-
const
|
|
1087
|
+
if (t.length > ze)
|
|
1088
|
+
throw new Error(ni(ze));
|
|
1089
|
+
const a = t.length, v = e.length, d = Math.max(0, Math.min(i, v));
|
|
1090
|
+
let g = n, M = d;
|
|
1091
|
+
const w = o > 1 || u, b = w ? Array(v) : [];
|
|
1092
1092
|
let h;
|
|
1093
1093
|
for (; (h = e.indexOf(t, M)) > -1; ) {
|
|
1094
|
-
let m =
|
|
1094
|
+
let m = Oe(t, {
|
|
1095
1095
|
currentLocation: h,
|
|
1096
1096
|
expectedLocation: d,
|
|
1097
|
-
distance:
|
|
1097
|
+
distance: l,
|
|
1098
1098
|
ignoreLocation: c
|
|
1099
1099
|
});
|
|
1100
|
-
if (g = Math.min(m, g), M = h +
|
|
1101
|
-
let
|
|
1102
|
-
for (;
|
|
1103
|
-
|
|
1100
|
+
if (g = Math.min(m, g), M = h + a, w) {
|
|
1101
|
+
let V = 0;
|
|
1102
|
+
for (; V < a; )
|
|
1103
|
+
b[h + V] = 1, V += 1;
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
M = -1;
|
|
1107
|
-
let p = [],
|
|
1108
|
-
const
|
|
1109
|
-
for (let m = 0; m <
|
|
1110
|
-
let
|
|
1111
|
-
for (;
|
|
1112
|
-
|
|
1107
|
+
let p = [], C = 1, _ = a + v;
|
|
1108
|
+
const x = 1 << a - 1;
|
|
1109
|
+
for (let m = 0; m < a; m += 1) {
|
|
1110
|
+
let V = 0, P = _;
|
|
1111
|
+
for (; V < P; )
|
|
1112
|
+
Oe(t, {
|
|
1113
1113
|
errors: m,
|
|
1114
|
-
currentLocation: d +
|
|
1114
|
+
currentLocation: d + P,
|
|
1115
1115
|
expectedLocation: d,
|
|
1116
|
-
distance:
|
|
1116
|
+
distance: l,
|
|
1117
1117
|
ignoreLocation: c
|
|
1118
|
-
}) <= g ?
|
|
1119
|
-
|
|
1120
|
-
let $ = Math.max(1, d -
|
|
1121
|
-
R[
|
|
1122
|
-
for (let
|
|
1123
|
-
let y =
|
|
1124
|
-
if (
|
|
1118
|
+
}) <= g ? V = P : _ = P, P = Math.floor((_ - V) / 2 + V);
|
|
1119
|
+
_ = P;
|
|
1120
|
+
let $ = Math.max(1, d - P + 1), N = r ? v : Math.min(d + P, v) + a, R = Array(N + 2);
|
|
1121
|
+
R[N + 1] = (1 << m) - 1;
|
|
1122
|
+
for (let B = N; B >= $; B -= 1) {
|
|
1123
|
+
let y = B - 1, A = s[e.charAt(y)];
|
|
1124
|
+
if (w && (b[y] = +!!A), R[B] = (R[B + 1] << 1 | 1) & A, m && (R[B] |= (p[B + 1] | p[B]) << 1 | 1 | p[B + 1]), R[B] & x && (C = Oe(t, {
|
|
1125
1125
|
errors: m,
|
|
1126
1126
|
currentLocation: y,
|
|
1127
1127
|
expectedLocation: d,
|
|
1128
|
-
distance:
|
|
1128
|
+
distance: l,
|
|
1129
1129
|
ignoreLocation: c
|
|
1130
|
-
}),
|
|
1131
|
-
if (g =
|
|
1130
|
+
}), C <= g)) {
|
|
1131
|
+
if (g = C, M = y, M <= d)
|
|
1132
1132
|
break;
|
|
1133
1133
|
$ = Math.max(1, 2 * d - M);
|
|
1134
1134
|
}
|
|
1135
1135
|
}
|
|
1136
|
-
if (
|
|
1136
|
+
if (Oe(t, {
|
|
1137
1137
|
errors: m + 1,
|
|
1138
1138
|
currentLocation: d,
|
|
1139
1139
|
expectedLocation: d,
|
|
1140
|
-
distance:
|
|
1140
|
+
distance: l,
|
|
1141
1141
|
ignoreLocation: c
|
|
1142
1142
|
}) > g)
|
|
1143
1143
|
break;
|
|
1144
1144
|
p = R;
|
|
1145
1145
|
}
|
|
1146
|
-
const
|
|
1146
|
+
const k = {
|
|
1147
1147
|
isMatch: M >= 0,
|
|
1148
1148
|
// Count exact matches (those with a score of 0) to be "almost" exact
|
|
1149
|
-
score: Math.max(1e-3,
|
|
1149
|
+
score: Math.max(1e-3, C)
|
|
1150
1150
|
};
|
|
1151
|
-
if (
|
|
1152
|
-
const m =
|
|
1153
|
-
m.length ?
|
|
1151
|
+
if (w) {
|
|
1152
|
+
const m = gi(b, o);
|
|
1153
|
+
m.length ? u && (k.indices = m) : k.isMatch = !1;
|
|
1154
1154
|
}
|
|
1155
|
-
return
|
|
1155
|
+
return k;
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1157
|
+
function bi(e) {
|
|
1158
1158
|
let t = {};
|
|
1159
1159
|
for (let s = 0, i = e.length; s < i; s += 1) {
|
|
1160
|
-
const
|
|
1161
|
-
t[
|
|
1160
|
+
const l = e.charAt(s);
|
|
1161
|
+
t[l] = (t[l] || 0) | 1 << i - s - 1;
|
|
1162
1162
|
}
|
|
1163
1163
|
return t;
|
|
1164
1164
|
}
|
|
1165
|
-
const
|
|
1166
|
-
class
|
|
1165
|
+
const qe = String.prototype.normalize ? (e) => e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "") : (e) => e;
|
|
1166
|
+
class Qt {
|
|
1167
1167
|
constructor(t, {
|
|
1168
|
-
location: s =
|
|
1169
|
-
threshold: i =
|
|
1170
|
-
distance:
|
|
1171
|
-
includeMatches:
|
|
1172
|
-
findAllMatches: r =
|
|
1173
|
-
minMatchCharLength: o =
|
|
1174
|
-
isCaseSensitive:
|
|
1175
|
-
ignoreDiacritics: c =
|
|
1176
|
-
ignoreLocation:
|
|
1168
|
+
location: s = D.location,
|
|
1169
|
+
threshold: i = D.threshold,
|
|
1170
|
+
distance: l = D.distance,
|
|
1171
|
+
includeMatches: n = D.includeMatches,
|
|
1172
|
+
findAllMatches: r = D.findAllMatches,
|
|
1173
|
+
minMatchCharLength: o = D.minMatchCharLength,
|
|
1174
|
+
isCaseSensitive: u = D.isCaseSensitive,
|
|
1175
|
+
ignoreDiacritics: c = D.ignoreDiacritics,
|
|
1176
|
+
ignoreLocation: a = D.ignoreLocation
|
|
1177
1177
|
} = {}) {
|
|
1178
1178
|
if (this.options = {
|
|
1179
1179
|
location: s,
|
|
1180
1180
|
threshold: i,
|
|
1181
|
-
distance:
|
|
1182
|
-
includeMatches:
|
|
1181
|
+
distance: l,
|
|
1182
|
+
includeMatches: n,
|
|
1183
1183
|
findAllMatches: r,
|
|
1184
1184
|
minMatchCharLength: o,
|
|
1185
|
-
isCaseSensitive:
|
|
1185
|
+
isCaseSensitive: u,
|
|
1186
1186
|
ignoreDiacritics: c,
|
|
1187
|
-
ignoreLocation:
|
|
1188
|
-
}, t =
|
|
1187
|
+
ignoreLocation: a
|
|
1188
|
+
}, t = u ? t : t.toLowerCase(), t = c ? qe(t) : t, this.pattern = t, this.chunks = [], !this.pattern.length)
|
|
1189
1189
|
return;
|
|
1190
|
-
const
|
|
1190
|
+
const v = (g, M) => {
|
|
1191
1191
|
this.chunks.push({
|
|
1192
1192
|
pattern: g,
|
|
1193
|
-
alphabet:
|
|
1193
|
+
alphabet: bi(g),
|
|
1194
1194
|
startIndex: M
|
|
1195
1195
|
});
|
|
1196
1196
|
}, d = this.pattern.length;
|
|
1197
|
-
if (d >
|
|
1197
|
+
if (d > ze) {
|
|
1198
1198
|
let g = 0;
|
|
1199
|
-
const M = d %
|
|
1200
|
-
for (; g <
|
|
1201
|
-
|
|
1199
|
+
const M = d % ze, w = d - M;
|
|
1200
|
+
for (; g < w; )
|
|
1201
|
+
v(this.pattern.substr(g, ze), g), g += ze;
|
|
1202
1202
|
if (M) {
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1203
|
+
const b = d - ze;
|
|
1204
|
+
v(this.pattern.substr(b), b);
|
|
1205
1205
|
}
|
|
1206
1206
|
} else
|
|
1207
|
-
|
|
1207
|
+
v(this.pattern, 0);
|
|
1208
1208
|
}
|
|
1209
1209
|
searchIn(t) {
|
|
1210
|
-
const { isCaseSensitive: s, ignoreDiacritics: i, includeMatches:
|
|
1211
|
-
if (t = s ? t : t.toLowerCase(), t = i ?
|
|
1212
|
-
let
|
|
1210
|
+
const { isCaseSensitive: s, ignoreDiacritics: i, includeMatches: l } = this.options;
|
|
1211
|
+
if (t = s ? t : t.toLowerCase(), t = i ? qe(t) : t, this.pattern === t) {
|
|
1212
|
+
let w = {
|
|
1213
1213
|
isMatch: !0,
|
|
1214
1214
|
score: 0
|
|
1215
1215
|
};
|
|
1216
|
-
return
|
|
1216
|
+
return l && (w.indices = [[0, t.length - 1]]), w;
|
|
1217
1217
|
}
|
|
1218
1218
|
const {
|
|
1219
|
-
location:
|
|
1219
|
+
location: n,
|
|
1220
1220
|
distance: r,
|
|
1221
1221
|
threshold: o,
|
|
1222
|
-
findAllMatches:
|
|
1222
|
+
findAllMatches: u,
|
|
1223
1223
|
minMatchCharLength: c,
|
|
1224
|
-
ignoreLocation:
|
|
1224
|
+
ignoreLocation: a
|
|
1225
1225
|
} = this.options;
|
|
1226
|
-
let
|
|
1227
|
-
this.chunks.forEach(({ pattern:
|
|
1228
|
-
const { isMatch: p, score:
|
|
1229
|
-
location:
|
|
1226
|
+
let v = [], d = 0, g = !1;
|
|
1227
|
+
this.chunks.forEach(({ pattern: w, alphabet: b, startIndex: h }) => {
|
|
1228
|
+
const { isMatch: p, score: C, indices: _ } = yi(t, w, b, {
|
|
1229
|
+
location: n + h,
|
|
1230
1230
|
distance: r,
|
|
1231
1231
|
threshold: o,
|
|
1232
|
-
findAllMatches:
|
|
1232
|
+
findAllMatches: u,
|
|
1233
1233
|
minMatchCharLength: c,
|
|
1234
|
-
includeMatches:
|
|
1235
|
-
ignoreLocation:
|
|
1234
|
+
includeMatches: l,
|
|
1235
|
+
ignoreLocation: a
|
|
1236
1236
|
});
|
|
1237
|
-
p && (g = !0), d +=
|
|
1237
|
+
p && (g = !0), d += C, p && _ && (v = [...v, ..._]);
|
|
1238
1238
|
});
|
|
1239
1239
|
let M = {
|
|
1240
1240
|
isMatch: g,
|
|
1241
1241
|
score: g ? d / this.chunks.length : 1
|
|
1242
1242
|
};
|
|
1243
|
-
return g &&
|
|
1243
|
+
return g && l && (M.indices = v), M;
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
1246
|
class Fe {
|
|
@@ -1248,19 +1248,19 @@ class Fe {
|
|
|
1248
1248
|
this.pattern = t;
|
|
1249
1249
|
}
|
|
1250
1250
|
static isMultiMatch(t) {
|
|
1251
|
-
return
|
|
1251
|
+
return Ft(t, this.multiRegex);
|
|
1252
1252
|
}
|
|
1253
1253
|
static isSingleMatch(t) {
|
|
1254
|
-
return
|
|
1254
|
+
return Ft(t, this.singleRegex);
|
|
1255
1255
|
}
|
|
1256
1256
|
search() {
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
|
-
function
|
|
1259
|
+
function Ft(e, t) {
|
|
1260
1260
|
const s = e.match(t);
|
|
1261
1261
|
return s ? s[1] : null;
|
|
1262
1262
|
}
|
|
1263
|
-
class
|
|
1263
|
+
class Ci extends Fe {
|
|
1264
1264
|
constructor(t) {
|
|
1265
1265
|
super(t);
|
|
1266
1266
|
}
|
|
@@ -1282,7 +1282,7 @@ class mi extends Fe {
|
|
|
1282
1282
|
};
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
|
-
class
|
|
1285
|
+
class _i extends Fe {
|
|
1286
1286
|
constructor(t) {
|
|
1287
1287
|
super(t);
|
|
1288
1288
|
}
|
|
@@ -1304,7 +1304,7 @@ class gi extends Fe {
|
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
|
-
class
|
|
1307
|
+
class Si extends Fe {
|
|
1308
1308
|
constructor(t) {
|
|
1309
1309
|
super(t);
|
|
1310
1310
|
}
|
|
@@ -1326,7 +1326,7 @@ class yi extends Fe {
|
|
|
1326
1326
|
};
|
|
1327
1327
|
}
|
|
1328
1328
|
}
|
|
1329
|
-
class
|
|
1329
|
+
class xi extends Fe {
|
|
1330
1330
|
constructor(t) {
|
|
1331
1331
|
super(t);
|
|
1332
1332
|
}
|
|
@@ -1348,7 +1348,7 @@ class bi extends Fe {
|
|
|
1348
1348
|
};
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
|
-
class
|
|
1351
|
+
class wi extends Fe {
|
|
1352
1352
|
constructor(t) {
|
|
1353
1353
|
super(t);
|
|
1354
1354
|
}
|
|
@@ -1370,7 +1370,7 @@ class Ci extends Fe {
|
|
|
1370
1370
|
};
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
|
-
class
|
|
1373
|
+
class ki extends Fe {
|
|
1374
1374
|
constructor(t) {
|
|
1375
1375
|
super(t);
|
|
1376
1376
|
}
|
|
@@ -1392,28 +1392,28 @@ class _i extends Fe {
|
|
|
1392
1392
|
};
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
|
-
class
|
|
1395
|
+
class Ht extends Fe {
|
|
1396
1396
|
constructor(t, {
|
|
1397
|
-
location: s =
|
|
1398
|
-
threshold: i =
|
|
1399
|
-
distance:
|
|
1400
|
-
includeMatches:
|
|
1401
|
-
findAllMatches: r =
|
|
1402
|
-
minMatchCharLength: o =
|
|
1403
|
-
isCaseSensitive:
|
|
1404
|
-
ignoreDiacritics: c =
|
|
1405
|
-
ignoreLocation:
|
|
1397
|
+
location: s = D.location,
|
|
1398
|
+
threshold: i = D.threshold,
|
|
1399
|
+
distance: l = D.distance,
|
|
1400
|
+
includeMatches: n = D.includeMatches,
|
|
1401
|
+
findAllMatches: r = D.findAllMatches,
|
|
1402
|
+
minMatchCharLength: o = D.minMatchCharLength,
|
|
1403
|
+
isCaseSensitive: u = D.isCaseSensitive,
|
|
1404
|
+
ignoreDiacritics: c = D.ignoreDiacritics,
|
|
1405
|
+
ignoreLocation: a = D.ignoreLocation
|
|
1406
1406
|
} = {}) {
|
|
1407
|
-
super(t), this._bitapSearch = new
|
|
1407
|
+
super(t), this._bitapSearch = new Qt(t, {
|
|
1408
1408
|
location: s,
|
|
1409
1409
|
threshold: i,
|
|
1410
|
-
distance:
|
|
1411
|
-
includeMatches:
|
|
1410
|
+
distance: l,
|
|
1411
|
+
includeMatches: n,
|
|
1412
1412
|
findAllMatches: r,
|
|
1413
1413
|
minMatchCharLength: o,
|
|
1414
|
-
isCaseSensitive:
|
|
1414
|
+
isCaseSensitive: u,
|
|
1415
1415
|
ignoreDiacritics: c,
|
|
1416
|
-
ignoreLocation:
|
|
1416
|
+
ignoreLocation: a
|
|
1417
1417
|
});
|
|
1418
1418
|
}
|
|
1419
1419
|
static get type() {
|
|
@@ -1429,7 +1429,7 @@ class Ut extends Fe {
|
|
|
1429
1429
|
return this._bitapSearch.searchIn(t);
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
|
-
class
|
|
1432
|
+
class Wt extends Fe {
|
|
1433
1433
|
constructor(t) {
|
|
1434
1434
|
super(t);
|
|
1435
1435
|
}
|
|
@@ -1444,75 +1444,75 @@ class Kt extends Fe {
|
|
|
1444
1444
|
}
|
|
1445
1445
|
search(t) {
|
|
1446
1446
|
let s = 0, i;
|
|
1447
|
-
const
|
|
1447
|
+
const l = [], n = this.pattern.length;
|
|
1448
1448
|
for (; (i = t.indexOf(this.pattern, s)) > -1; )
|
|
1449
|
-
s = i +
|
|
1450
|
-
const r = !!
|
|
1449
|
+
s = i + n, l.push([i, s - 1]);
|
|
1450
|
+
const r = !!l.length;
|
|
1451
1451
|
return {
|
|
1452
1452
|
isMatch: r,
|
|
1453
1453
|
score: r ? 0 : 1,
|
|
1454
|
-
indices:
|
|
1454
|
+
indices: l
|
|
1455
1455
|
};
|
|
1456
1456
|
}
|
|
1457
1457
|
}
|
|
1458
|
-
const
|
|
1459
|
-
mi,
|
|
1460
|
-
Kt,
|
|
1461
|
-
yi,
|
|
1462
|
-
bi,
|
|
1463
|
-
_i,
|
|
1458
|
+
const nt = [
|
|
1464
1459
|
Ci,
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1460
|
+
Wt,
|
|
1461
|
+
Si,
|
|
1462
|
+
xi,
|
|
1463
|
+
ki,
|
|
1464
|
+
wi,
|
|
1465
|
+
_i,
|
|
1466
|
+
Ht
|
|
1467
|
+
], Et = nt.length, Ai = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Fi = "|";
|
|
1468
|
+
function Ei(e, t = {}) {
|
|
1469
|
+
return e.split(Fi).map((s) => {
|
|
1470
|
+
let i = s.trim().split(Ai).filter((n) => n && !!n.trim()), l = [];
|
|
1471
|
+
for (let n = 0, r = i.length; n < r; n += 1) {
|
|
1472
|
+
const o = i[n];
|
|
1473
|
+
let u = !1, c = -1;
|
|
1474
|
+
for (; !u && ++c < Et; ) {
|
|
1475
|
+
const a = nt[c];
|
|
1476
|
+
let v = a.isMultiMatch(o);
|
|
1477
|
+
v && (l.push(new a(v, t)), u = !0);
|
|
1478
1478
|
}
|
|
1479
|
-
if (!
|
|
1480
|
-
for (c = -1; ++c <
|
|
1481
|
-
const
|
|
1482
|
-
let
|
|
1483
|
-
if (
|
|
1484
|
-
|
|
1479
|
+
if (!u)
|
|
1480
|
+
for (c = -1; ++c < Et; ) {
|
|
1481
|
+
const a = nt[c];
|
|
1482
|
+
let v = a.isSingleMatch(o);
|
|
1483
|
+
if (v) {
|
|
1484
|
+
l.push(new a(v, t));
|
|
1485
1485
|
break;
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
|
-
return
|
|
1489
|
+
return l;
|
|
1490
1490
|
});
|
|
1491
1491
|
}
|
|
1492
|
-
const
|
|
1493
|
-
class
|
|
1492
|
+
const Ii = /* @__PURE__ */ new Set([Ht.type, Wt.type]);
|
|
1493
|
+
class $i {
|
|
1494
1494
|
constructor(t, {
|
|
1495
|
-
isCaseSensitive: s =
|
|
1496
|
-
ignoreDiacritics: i =
|
|
1497
|
-
includeMatches:
|
|
1498
|
-
minMatchCharLength:
|
|
1499
|
-
ignoreLocation: r =
|
|
1500
|
-
findAllMatches: o =
|
|
1501
|
-
location:
|
|
1502
|
-
threshold: c =
|
|
1503
|
-
distance:
|
|
1495
|
+
isCaseSensitive: s = D.isCaseSensitive,
|
|
1496
|
+
ignoreDiacritics: i = D.ignoreDiacritics,
|
|
1497
|
+
includeMatches: l = D.includeMatches,
|
|
1498
|
+
minMatchCharLength: n = D.minMatchCharLength,
|
|
1499
|
+
ignoreLocation: r = D.ignoreLocation,
|
|
1500
|
+
findAllMatches: o = D.findAllMatches,
|
|
1501
|
+
location: u = D.location,
|
|
1502
|
+
threshold: c = D.threshold,
|
|
1503
|
+
distance: a = D.distance
|
|
1504
1504
|
} = {}) {
|
|
1505
1505
|
this.query = null, this.options = {
|
|
1506
1506
|
isCaseSensitive: s,
|
|
1507
1507
|
ignoreDiacritics: i,
|
|
1508
|
-
includeMatches:
|
|
1509
|
-
minMatchCharLength:
|
|
1508
|
+
includeMatches: l,
|
|
1509
|
+
minMatchCharLength: n,
|
|
1510
1510
|
findAllMatches: o,
|
|
1511
1511
|
ignoreLocation: r,
|
|
1512
|
-
location:
|
|
1512
|
+
location: u,
|
|
1513
1513
|
threshold: c,
|
|
1514
|
-
distance:
|
|
1515
|
-
}, t = s ? t : t.toLowerCase(), t = i ?
|
|
1514
|
+
distance: a
|
|
1515
|
+
}, t = s ? t : t.toLowerCase(), t = i ? qe(t) : t, this.pattern = t, this.query = Ei(this.pattern, this.options);
|
|
1516
1516
|
}
|
|
1517
1517
|
static condition(t, s) {
|
|
1518
1518
|
return s.useExtendedSearch;
|
|
@@ -1524,28 +1524,28 @@ class Ai {
|
|
|
1524
1524
|
isMatch: !1,
|
|
1525
1525
|
score: 1
|
|
1526
1526
|
};
|
|
1527
|
-
const { includeMatches: i, isCaseSensitive:
|
|
1528
|
-
t =
|
|
1529
|
-
let r = 0, o = [],
|
|
1530
|
-
for (let c = 0,
|
|
1531
|
-
const
|
|
1527
|
+
const { includeMatches: i, isCaseSensitive: l, ignoreDiacritics: n } = this.options;
|
|
1528
|
+
t = l ? t : t.toLowerCase(), t = n ? qe(t) : t;
|
|
1529
|
+
let r = 0, o = [], u = 0;
|
|
1530
|
+
for (let c = 0, a = s.length; c < a; c += 1) {
|
|
1531
|
+
const v = s[c];
|
|
1532
1532
|
o.length = 0, r = 0;
|
|
1533
|
-
for (let d = 0, g =
|
|
1534
|
-
const M =
|
|
1535
|
-
if (
|
|
1536
|
-
if (r += 1,
|
|
1533
|
+
for (let d = 0, g = v.length; d < g; d += 1) {
|
|
1534
|
+
const M = v[d], { isMatch: w, indices: b, score: h } = M.search(t);
|
|
1535
|
+
if (w) {
|
|
1536
|
+
if (r += 1, u += h, i) {
|
|
1537
1537
|
const p = M.constructor.type;
|
|
1538
|
-
|
|
1538
|
+
Ii.has(p) ? o = [...o, ...b] : o.push(b);
|
|
1539
1539
|
}
|
|
1540
1540
|
} else {
|
|
1541
|
-
|
|
1541
|
+
u = 0, r = 0, o.length = 0;
|
|
1542
1542
|
break;
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
1545
|
if (r) {
|
|
1546
1546
|
let d = {
|
|
1547
1547
|
isMatch: !0,
|
|
1548
|
-
score:
|
|
1548
|
+
score: u / r
|
|
1549
1549
|
};
|
|
1550
1550
|
return i && (d.indices = o), d;
|
|
1551
1551
|
}
|
|
@@ -1556,121 +1556,121 @@ class Ai {
|
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
|
-
const
|
|
1560
|
-
function
|
|
1561
|
-
|
|
1559
|
+
const ot = [];
|
|
1560
|
+
function zi(...e) {
|
|
1561
|
+
ot.push(...e);
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1564
|
-
for (let s = 0, i =
|
|
1565
|
-
let
|
|
1566
|
-
if (
|
|
1567
|
-
return new
|
|
1563
|
+
function rt(e, t) {
|
|
1564
|
+
for (let s = 0, i = ot.length; s < i; s += 1) {
|
|
1565
|
+
let l = ot[s];
|
|
1566
|
+
if (l.condition(e, t))
|
|
1567
|
+
return new l(e, t);
|
|
1568
1568
|
}
|
|
1569
|
-
return new
|
|
1569
|
+
return new Qt(e, t);
|
|
1570
1570
|
}
|
|
1571
|
-
const
|
|
1571
|
+
const Ue = {
|
|
1572
1572
|
AND: "$and",
|
|
1573
1573
|
OR: "$or"
|
|
1574
|
-
},
|
|
1574
|
+
}, at = {
|
|
1575
1575
|
PATH: "$path",
|
|
1576
1576
|
PATTERN: "$val"
|
|
1577
|
-
},
|
|
1578
|
-
[
|
|
1577
|
+
}, ut = (e) => !!(e[Ue.AND] || e[Ue.OR]), Mi = (e) => !!e[at.PATH], Li = (e) => !Ce(e) && Pt(e) && !ut(e), It = (e) => ({
|
|
1578
|
+
[Ue.AND]: Object.keys(e).map((t) => ({
|
|
1579
1579
|
[t]: e[t]
|
|
1580
1580
|
}))
|
|
1581
1581
|
});
|
|
1582
|
-
function
|
|
1583
|
-
const i = (
|
|
1584
|
-
let
|
|
1585
|
-
const r =
|
|
1586
|
-
if (!r &&
|
|
1587
|
-
return i(
|
|
1588
|
-
if (
|
|
1589
|
-
const
|
|
1590
|
-
if (!
|
|
1591
|
-
throw new Error(
|
|
1592
|
-
const
|
|
1593
|
-
keyId:
|
|
1582
|
+
function Gt(e, t, { auto: s = !0 } = {}) {
|
|
1583
|
+
const i = (l) => {
|
|
1584
|
+
let n = Object.keys(l);
|
|
1585
|
+
const r = Mi(l);
|
|
1586
|
+
if (!r && n.length > 1 && !ut(l))
|
|
1587
|
+
return i(It(l));
|
|
1588
|
+
if (Li(l)) {
|
|
1589
|
+
const u = r ? l[at.PATH] : n[0], c = r ? l[at.PATTERN] : l[u];
|
|
1590
|
+
if (!ve(c))
|
|
1591
|
+
throw new Error(li(u));
|
|
1592
|
+
const a = {
|
|
1593
|
+
keyId: lt(u),
|
|
1594
1594
|
pattern: c
|
|
1595
1595
|
};
|
|
1596
|
-
return s && (
|
|
1596
|
+
return s && (a.searcher = rt(c, t)), a;
|
|
1597
1597
|
}
|
|
1598
1598
|
let o = {
|
|
1599
1599
|
children: [],
|
|
1600
|
-
operator:
|
|
1600
|
+
operator: n[0]
|
|
1601
1601
|
};
|
|
1602
|
-
return
|
|
1603
|
-
const c =
|
|
1604
|
-
Ce(c) && c.forEach((
|
|
1605
|
-
o.children.push(i(
|
|
1602
|
+
return n.forEach((u) => {
|
|
1603
|
+
const c = l[u];
|
|
1604
|
+
Ce(c) && c.forEach((a) => {
|
|
1605
|
+
o.children.push(i(a));
|
|
1606
1606
|
});
|
|
1607
1607
|
}), o;
|
|
1608
1608
|
};
|
|
1609
|
-
return
|
|
1609
|
+
return ut(e) || (e = It(e)), i(e);
|
|
1610
1610
|
}
|
|
1611
|
-
function
|
|
1611
|
+
function Ti(e, { ignoreFieldNorm: t = D.ignoreFieldNorm }) {
|
|
1612
1612
|
e.forEach((s) => {
|
|
1613
1613
|
let i = 1;
|
|
1614
|
-
s.matches.forEach(({ key:
|
|
1615
|
-
const o =
|
|
1614
|
+
s.matches.forEach(({ key: l, norm: n, score: r }) => {
|
|
1615
|
+
const o = l ? l.weight : null;
|
|
1616
1616
|
i *= Math.pow(
|
|
1617
1617
|
r === 0 && o ? Number.EPSILON : r,
|
|
1618
|
-
(o || 1) * (t ? 1 :
|
|
1618
|
+
(o || 1) * (t ? 1 : n)
|
|
1619
1619
|
);
|
|
1620
1620
|
}), s.score = i;
|
|
1621
1621
|
});
|
|
1622
1622
|
}
|
|
1623
|
-
function
|
|
1623
|
+
function Bi(e, t) {
|
|
1624
1624
|
const s = e.matches;
|
|
1625
|
-
t.matches = [],
|
|
1626
|
-
if (!
|
|
1625
|
+
t.matches = [], ce(s) && s.forEach((i) => {
|
|
1626
|
+
if (!ce(i.indices) || !i.indices.length)
|
|
1627
1627
|
return;
|
|
1628
|
-
const { indices:
|
|
1628
|
+
const { indices: l, value: n } = i;
|
|
1629
1629
|
let r = {
|
|
1630
|
-
indices:
|
|
1631
|
-
value:
|
|
1630
|
+
indices: l,
|
|
1631
|
+
value: n
|
|
1632
1632
|
};
|
|
1633
1633
|
i.key && (r.key = i.key.src), i.idx > -1 && (r.refIndex = i.idx), t.matches.push(r);
|
|
1634
1634
|
});
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1636
|
+
function Vi(e, t) {
|
|
1637
1637
|
t.score = e.score;
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1640
|
-
includeMatches: s =
|
|
1641
|
-
includeScore: i =
|
|
1639
|
+
function Di(e, t, {
|
|
1640
|
+
includeMatches: s = D.includeMatches,
|
|
1641
|
+
includeScore: i = D.includeScore
|
|
1642
1642
|
} = {}) {
|
|
1643
|
-
const
|
|
1644
|
-
return s &&
|
|
1645
|
-
const { idx: r } =
|
|
1643
|
+
const l = [];
|
|
1644
|
+
return s && l.push(Bi), i && l.push(Vi), e.map((n) => {
|
|
1645
|
+
const { idx: r } = n, o = {
|
|
1646
1646
|
item: t[r],
|
|
1647
1647
|
refIndex: r
|
|
1648
1648
|
};
|
|
1649
|
-
return
|
|
1650
|
-
|
|
1649
|
+
return l.length && l.forEach((u) => {
|
|
1650
|
+
u(n, o);
|
|
1651
1651
|
}), o;
|
|
1652
1652
|
});
|
|
1653
1653
|
}
|
|
1654
|
-
class
|
|
1654
|
+
class Se {
|
|
1655
1655
|
constructor(t, s = {}, i) {
|
|
1656
|
-
this.options = { ...
|
|
1656
|
+
this.options = { ...D, ...s }, this.options.useExtendedSearch, this._keyStore = new ai(this.options.keys), this.setCollection(t, i);
|
|
1657
1657
|
}
|
|
1658
1658
|
setCollection(t, s) {
|
|
1659
|
-
if (this._docs = t, s && !(s instanceof
|
|
1660
|
-
throw new Error(
|
|
1661
|
-
this._myIndex = s ||
|
|
1659
|
+
if (this._docs = t, s && !(s instanceof vt))
|
|
1660
|
+
throw new Error(ii);
|
|
1661
|
+
this._myIndex = s || Kt(this.options.keys, this._docs, {
|
|
1662
1662
|
getFn: this.options.getFn,
|
|
1663
1663
|
fieldNormWeight: this.options.fieldNormWeight
|
|
1664
1664
|
});
|
|
1665
1665
|
}
|
|
1666
1666
|
add(t) {
|
|
1667
|
-
|
|
1667
|
+
ce(t) && (this._docs.push(t), this._myIndex.add(t));
|
|
1668
1668
|
}
|
|
1669
1669
|
remove(t = () => !1) {
|
|
1670
1670
|
const s = [];
|
|
1671
|
-
for (let i = 0,
|
|
1672
|
-
const
|
|
1673
|
-
t(
|
|
1671
|
+
for (let i = 0, l = this._docs.length; i < l; i += 1) {
|
|
1672
|
+
const n = this._docs[i];
|
|
1673
|
+
t(n, i) && (this.removeAt(i), i -= 1, l -= 1, s.push(n));
|
|
1674
1674
|
}
|
|
1675
1675
|
return s;
|
|
1676
1676
|
}
|
|
@@ -1683,168 +1683,168 @@ class xe {
|
|
|
1683
1683
|
search(t, { limit: s = -1 } = {}) {
|
|
1684
1684
|
const {
|
|
1685
1685
|
includeMatches: i,
|
|
1686
|
-
includeScore:
|
|
1687
|
-
shouldSort:
|
|
1686
|
+
includeScore: l,
|
|
1687
|
+
shouldSort: n,
|
|
1688
1688
|
sortFn: r,
|
|
1689
1689
|
ignoreFieldNorm: o
|
|
1690
1690
|
} = this.options;
|
|
1691
|
-
let
|
|
1692
|
-
return
|
|
1691
|
+
let u = ve(t) ? ve(this._docs[0]) ? this._searchStringList(t) : this._searchObjectList(t) : this._searchLogical(t);
|
|
1692
|
+
return Ti(u, { ignoreFieldNorm: o }), n && u.sort(r), Nt(s) && s > -1 && (u = u.slice(0, s)), Di(u, this._docs, {
|
|
1693
1693
|
includeMatches: i,
|
|
1694
|
-
includeScore:
|
|
1694
|
+
includeScore: l
|
|
1695
1695
|
});
|
|
1696
1696
|
}
|
|
1697
1697
|
_searchStringList(t) {
|
|
1698
|
-
const s =
|
|
1699
|
-
return i.forEach(({ v:
|
|
1700
|
-
if (!
|
|
1698
|
+
const s = rt(t, this.options), { records: i } = this._myIndex, l = [];
|
|
1699
|
+
return i.forEach(({ v: n, i: r, n: o }) => {
|
|
1700
|
+
if (!ce(n))
|
|
1701
1701
|
return;
|
|
1702
|
-
const { isMatch:
|
|
1703
|
-
|
|
1704
|
-
item:
|
|
1702
|
+
const { isMatch: u, score: c, indices: a } = s.searchIn(n);
|
|
1703
|
+
u && l.push({
|
|
1704
|
+
item: n,
|
|
1705
1705
|
idx: r,
|
|
1706
|
-
matches: [{ score: c, value:
|
|
1706
|
+
matches: [{ score: c, value: n, norm: o, indices: a }]
|
|
1707
1707
|
});
|
|
1708
|
-
}),
|
|
1708
|
+
}), l;
|
|
1709
1709
|
}
|
|
1710
1710
|
_searchLogical(t) {
|
|
1711
|
-
const s =
|
|
1711
|
+
const s = Gt(t, this.options), i = (o, u, c) => {
|
|
1712
1712
|
if (!o.children) {
|
|
1713
|
-
const { keyId:
|
|
1714
|
-
key: this._keyStore.get(
|
|
1715
|
-
value: this._myIndex.getValueForItemAtKeyId(
|
|
1713
|
+
const { keyId: v, searcher: d } = o, g = this._findMatches({
|
|
1714
|
+
key: this._keyStore.get(v),
|
|
1715
|
+
value: this._myIndex.getValueForItemAtKeyId(u, v),
|
|
1716
1716
|
searcher: d
|
|
1717
1717
|
});
|
|
1718
1718
|
return g && g.length ? [
|
|
1719
1719
|
{
|
|
1720
1720
|
idx: c,
|
|
1721
|
-
item:
|
|
1721
|
+
item: u,
|
|
1722
1722
|
matches: g
|
|
1723
1723
|
}
|
|
1724
1724
|
] : [];
|
|
1725
1725
|
}
|
|
1726
|
-
const
|
|
1727
|
-
for (let
|
|
1728
|
-
const g = o.children[
|
|
1726
|
+
const a = [];
|
|
1727
|
+
for (let v = 0, d = o.children.length; v < d; v += 1) {
|
|
1728
|
+
const g = o.children[v], M = i(g, u, c);
|
|
1729
1729
|
if (M.length)
|
|
1730
|
-
|
|
1731
|
-
else if (o.operator ===
|
|
1730
|
+
a.push(...M);
|
|
1731
|
+
else if (o.operator === Ue.AND)
|
|
1732
1732
|
return [];
|
|
1733
1733
|
}
|
|
1734
|
-
return
|
|
1735
|
-
},
|
|
1736
|
-
return
|
|
1737
|
-
if (
|
|
1738
|
-
let c = i(s, o,
|
|
1739
|
-
c.length && (
|
|
1740
|
-
|
|
1734
|
+
return a;
|
|
1735
|
+
}, l = this._myIndex.records, n = {}, r = [];
|
|
1736
|
+
return l.forEach(({ $: o, i: u }) => {
|
|
1737
|
+
if (ce(o)) {
|
|
1738
|
+
let c = i(s, o, u);
|
|
1739
|
+
c.length && (n[u] || (n[u] = { idx: u, item: o, matches: [] }, r.push(n[u])), c.forEach(({ matches: a }) => {
|
|
1740
|
+
n[u].matches.push(...a);
|
|
1741
1741
|
}));
|
|
1742
1742
|
}
|
|
1743
1743
|
}), r;
|
|
1744
1744
|
}
|
|
1745
1745
|
_searchObjectList(t) {
|
|
1746
|
-
const s =
|
|
1747
|
-
return
|
|
1748
|
-
if (!
|
|
1746
|
+
const s = rt(t, this.options), { keys: i, records: l } = this._myIndex, n = [];
|
|
1747
|
+
return l.forEach(({ $: r, i: o }) => {
|
|
1748
|
+
if (!ce(r))
|
|
1749
1749
|
return;
|
|
1750
|
-
let
|
|
1751
|
-
i.forEach((c,
|
|
1752
|
-
|
|
1750
|
+
let u = [];
|
|
1751
|
+
i.forEach((c, a) => {
|
|
1752
|
+
u.push(
|
|
1753
1753
|
...this._findMatches({
|
|
1754
1754
|
key: c,
|
|
1755
|
-
value: r[
|
|
1755
|
+
value: r[a],
|
|
1756
1756
|
searcher: s
|
|
1757
1757
|
})
|
|
1758
1758
|
);
|
|
1759
|
-
}),
|
|
1759
|
+
}), u.length && n.push({
|
|
1760
1760
|
idx: o,
|
|
1761
1761
|
item: r,
|
|
1762
|
-
matches:
|
|
1762
|
+
matches: u
|
|
1763
1763
|
});
|
|
1764
|
-
}),
|
|
1764
|
+
}), n;
|
|
1765
1765
|
}
|
|
1766
1766
|
_findMatches({ key: t, value: s, searcher: i }) {
|
|
1767
|
-
if (!
|
|
1767
|
+
if (!ce(s))
|
|
1768
1768
|
return [];
|
|
1769
|
-
let
|
|
1769
|
+
let l = [];
|
|
1770
1770
|
if (Ce(s))
|
|
1771
|
-
s.forEach(({ v:
|
|
1772
|
-
if (!
|
|
1771
|
+
s.forEach(({ v: n, i: r, n: o }) => {
|
|
1772
|
+
if (!ce(n))
|
|
1773
1773
|
return;
|
|
1774
|
-
const { isMatch:
|
|
1775
|
-
|
|
1774
|
+
const { isMatch: u, score: c, indices: a } = i.searchIn(n);
|
|
1775
|
+
u && l.push({
|
|
1776
1776
|
score: c,
|
|
1777
1777
|
key: t,
|
|
1778
|
-
value:
|
|
1778
|
+
value: n,
|
|
1779
1779
|
idx: r,
|
|
1780
1780
|
norm: o,
|
|
1781
|
-
indices:
|
|
1781
|
+
indices: a
|
|
1782
1782
|
});
|
|
1783
1783
|
});
|
|
1784
1784
|
else {
|
|
1785
|
-
const { v:
|
|
1786
|
-
o &&
|
|
1785
|
+
const { v: n, n: r } = s, { isMatch: o, score: u, indices: c } = i.searchIn(n);
|
|
1786
|
+
o && l.push({ score: u, key: t, value: n, norm: r, indices: c });
|
|
1787
1787
|
}
|
|
1788
|
-
return
|
|
1788
|
+
return l;
|
|
1789
1789
|
}
|
|
1790
1790
|
}
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
const
|
|
1798
|
-
const [t, s] =
|
|
1791
|
+
Se.version = "7.1.0";
|
|
1792
|
+
Se.createIndex = Kt;
|
|
1793
|
+
Se.parseIndex = mi;
|
|
1794
|
+
Se.config = D;
|
|
1795
|
+
Se.parseQuery = Gt;
|
|
1796
|
+
zi($i);
|
|
1797
|
+
const Ee = (e) => {
|
|
1798
|
+
const [t, s] = fs(
|
|
1799
1799
|
(i) => {
|
|
1800
|
-
const
|
|
1801
|
-
function
|
|
1802
|
-
Y(
|
|
1800
|
+
const l = Ae(i);
|
|
1801
|
+
function n(a, v) {
|
|
1802
|
+
Y(v) && Ct(v) ? l.queryForm[a] = void 0 : l.queryForm[a] = v;
|
|
1803
1803
|
}
|
|
1804
|
-
function r(
|
|
1805
|
-
let { key:
|
|
1806
|
-
if (Y(g) && !
|
|
1804
|
+
function r(a) {
|
|
1805
|
+
let { key: v, label: d, value: g } = a;
|
|
1806
|
+
if (Y(g) && !Ct(g))
|
|
1807
1807
|
return;
|
|
1808
|
-
let M = "",
|
|
1808
|
+
let M = "", w = g == null ? void 0 : g.toString();
|
|
1809
1809
|
if (typeof g == "number" || typeof g == "boolean" || typeof g == "string")
|
|
1810
|
-
M = `${d}:${
|
|
1811
|
-
else if (De(g) && (M = `${d}:${
|
|
1812
|
-
let p = 0,
|
|
1813
|
-
for (let
|
|
1814
|
-
if (
|
|
1815
|
-
p =
|
|
1810
|
+
M = `${d}:${w}`, w.length > 50 && (M = `${d}:${w.slice(0, 50)}...`);
|
|
1811
|
+
else if (De(g) && (M = `${d}:${w}`, w.length > 50)) {
|
|
1812
|
+
let p = 0, C = 0;
|
|
1813
|
+
for (let x = 0; x < g.length; x++)
|
|
1814
|
+
if (C += g[x].length + 1, C > 50) {
|
|
1815
|
+
p = x + 1;
|
|
1816
1816
|
break;
|
|
1817
1817
|
}
|
|
1818
|
-
let
|
|
1819
|
-
M = `${d}:${
|
|
1818
|
+
let _ = g.slice(0, p);
|
|
1819
|
+
M = `${d}:${_.join(",").slice(0, 50)}...`, g.length > p && (M += `等其余${g.length - p}项`);
|
|
1820
1820
|
}
|
|
1821
|
-
const
|
|
1822
|
-
key:
|
|
1821
|
+
const b = {
|
|
1822
|
+
key: v,
|
|
1823
1823
|
label: d,
|
|
1824
1824
|
showStr: M,
|
|
1825
|
-
value:
|
|
1826
|
-
}, h =
|
|
1827
|
-
h === -1 ?
|
|
1825
|
+
value: w
|
|
1826
|
+
}, h = l.tags.findIndex((p) => p.key === v);
|
|
1827
|
+
h === -1 ? l.tags.push(b) : l.tags.splice(h, 1, b);
|
|
1828
1828
|
}
|
|
1829
|
-
function o(
|
|
1830
|
-
|
|
1829
|
+
function o(a, v) {
|
|
1830
|
+
a.key && l.tags.findIndex((d) => d.key === a.key) !== -1 && (l.queryForm[a.key] = void 0, v ? l.tags.splice(v, 1) : l.tags = l.tags.filter((d) => d.key !== a.key));
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
}),
|
|
1832
|
+
function u() {
|
|
1833
|
+
l.tags.forEach((a) => {
|
|
1834
|
+
l.queryForm[a.key] = void 0;
|
|
1835
|
+
}), l.tags = [];
|
|
1836
1836
|
}
|
|
1837
|
-
function c(
|
|
1838
|
-
Object.keys(
|
|
1839
|
-
|
|
1840
|
-
}),
|
|
1837
|
+
function c(a = {}) {
|
|
1838
|
+
Object.keys(l.queryForm).forEach((v) => {
|
|
1839
|
+
v !== "resetCount" && (l.queryForm[v] = a[v] ?? void 0);
|
|
1840
|
+
}), l.tags = [];
|
|
1841
1841
|
}
|
|
1842
|
-
return { state:
|
|
1842
|
+
return { state: l, setQuery: n, addTag: r, reduceTag: o, reduceAllTag: u, clearQuery: c };
|
|
1843
1843
|
},
|
|
1844
1844
|
{ injectionKey: e }
|
|
1845
1845
|
);
|
|
1846
1846
|
return { useProvideQueryStore: t, useQueryStore: s };
|
|
1847
|
-
},
|
|
1847
|
+
}, Oi = { class: "el-select-pop-search-container" }, ji = { class: "el-select-dropdown__wrap virtual-scroll-wrap" }, Ri = { class: "check-all ak-relative el-select-dropdown__item" }, Ni = ["title"], Pi = ["onClick"], qi = { class: "el-select-dropdown__empty" }, Ui = { class: "custom-multi-footer" }, Ki = { class: "counts" }, Qi = /* @__PURE__ */ he({
|
|
1848
1848
|
name: "JcSelectQuery",
|
|
1849
1849
|
__name: "index",
|
|
1850
1850
|
props: {
|
|
@@ -1897,79 +1897,79 @@ const Ie = (e) => {
|
|
|
1897
1897
|
}
|
|
1898
1898
|
},
|
|
1899
1899
|
setup(e, { expose: t }) {
|
|
1900
|
-
const s = e, i = T(),
|
|
1900
|
+
const s = e, i = T(), l = T([]), n = Ae(
|
|
1901
1901
|
{}
|
|
1902
|
-
), r = T(""), o = T(),
|
|
1902
|
+
), r = T(""), o = T(), u = T([]), c = T([]), a = T([]), v = T(!1), d = T(!1), g = T(!1), { useQueryStore: M } = Ee(s.injectionKey), { state: w, setQuery: b } = M();
|
|
1903
1903
|
let h = -1, p = !1;
|
|
1904
|
-
const
|
|
1905
|
-
y && (
|
|
1906
|
-
var
|
|
1907
|
-
(
|
|
1904
|
+
const C = T(), _ = (y) => {
|
|
1905
|
+
y && (a.value = l.value, r.value = "", c.value = u.value, $(a.value), Z(() => {
|
|
1906
|
+
var A;
|
|
1907
|
+
(A = o.value) == null || A.focus();
|
|
1908
1908
|
}));
|
|
1909
|
-
},
|
|
1910
|
-
|
|
1911
|
-
(
|
|
1909
|
+
}, x = (y) => {
|
|
1910
|
+
a.value = a.value.filter(
|
|
1911
|
+
(A) => A.value !== y.value
|
|
1912
1912
|
);
|
|
1913
|
-
},
|
|
1914
|
-
g.value = !0,
|
|
1913
|
+
}, k = (y) => {
|
|
1914
|
+
g.value = !0, b(s.field, y), Z(() => {
|
|
1915
1915
|
g.value = !1;
|
|
1916
1916
|
});
|
|
1917
1917
|
}, m = () => {
|
|
1918
1918
|
const y = r.value.trim();
|
|
1919
|
-
y !== "" ? c.value =
|
|
1920
|
-
},
|
|
1921
|
-
Y(r.value) || c.value.map((y) => y.value).includes(r.value) || (
|
|
1919
|
+
y !== "" ? c.value = C.value.search(y).map((A) => A.item) : c.value = u.value;
|
|
1920
|
+
}, V = () => {
|
|
1921
|
+
Y(r.value) || c.value.map((y) => y.value).includes(r.value) || (u.value.unshift({
|
|
1922
1922
|
label: r.value,
|
|
1923
1923
|
value: r.value
|
|
1924
|
-
}),
|
|
1924
|
+
}), a.value.push({
|
|
1925
1925
|
label: r.value,
|
|
1926
1926
|
value: r.value
|
|
1927
|
-
}),
|
|
1928
|
-
|
|
1927
|
+
}), l.value = a.value, b(s.field, l.value), Z(() => {
|
|
1928
|
+
C.value = new Se(u.value, {
|
|
1929
1929
|
keys: s.keyField
|
|
1930
1930
|
}), m();
|
|
1931
1931
|
}));
|
|
1932
|
-
},
|
|
1933
|
-
|
|
1932
|
+
}, P = (y) => {
|
|
1933
|
+
a.value = y ? c.value : [], d.value = !1, s.isNeedFooter || (l.value = a.value, b(s.field, l.value));
|
|
1934
1934
|
}, $ = (y) => {
|
|
1935
1935
|
if (y.length === 0) {
|
|
1936
|
-
|
|
1936
|
+
v.value = !1, d.value = !1;
|
|
1937
1937
|
return;
|
|
1938
1938
|
}
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1939
|
+
const A = y.length;
|
|
1940
|
+
v.value = A === c.value.length, d.value = A > 0 && A < c.value.length;
|
|
1941
1941
|
const { options: z } = s;
|
|
1942
1942
|
let O = 0;
|
|
1943
1943
|
if (y.length > 0) {
|
|
1944
|
-
const
|
|
1945
|
-
O = z.findIndex((
|
|
1944
|
+
const H = y[y.length - 1];
|
|
1945
|
+
O = z.findIndex((ie) => ie.value === H.value);
|
|
1946
1946
|
}
|
|
1947
1947
|
if (p) {
|
|
1948
|
-
const
|
|
1948
|
+
const H = Math.abs(h - O) + 1, ie = Math.min(h, O);
|
|
1949
1949
|
let ee = 0;
|
|
1950
|
-
for (; ee <
|
|
1951
|
-
const
|
|
1952
|
-
|
|
1950
|
+
for (; ee < H; ) {
|
|
1951
|
+
const ae = ie + ee;
|
|
1952
|
+
us(y, z[ae]) === -1 && a.value.push(z[ae]), ee++;
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
|
-
s.isNeedFooter || (
|
|
1956
|
-
},
|
|
1957
|
-
!p && !
|
|
1955
|
+
s.isNeedFooter || (l.value = a.value, b(s.field, l.value));
|
|
1956
|
+
}, N = (y) => {
|
|
1957
|
+
!p && !a.value.includes(y) && (h = u.value.findIndex((A) => A.value === y.value));
|
|
1958
1958
|
}, R = (y) => {
|
|
1959
|
-
|
|
1960
|
-
},
|
|
1959
|
+
a.value = [y], B();
|
|
1960
|
+
}, W = () => {
|
|
1961
1961
|
var y;
|
|
1962
1962
|
(y = i.value) == null || y.blur();
|
|
1963
|
-
},
|
|
1964
|
-
g.value = !0,
|
|
1963
|
+
}, B = () => {
|
|
1964
|
+
g.value = !0, l.value = a.value, b(s.field, l.value), W(), Z(() => {
|
|
1965
1965
|
g.value = !1;
|
|
1966
1966
|
});
|
|
1967
1967
|
};
|
|
1968
|
-
return
|
|
1968
|
+
return oe(
|
|
1969
1969
|
() => s.options,
|
|
1970
1970
|
() => {
|
|
1971
1971
|
var y;
|
|
1972
|
-
!De(s.options) || ((y = s.options) == null ? void 0 : y.length) === 0 || (c.value = s.options,
|
|
1972
|
+
!De(s.options) || ((y = s.options) == null ? void 0 : y.length) === 0 || (c.value = s.options, u.value = Pe(s.options), C.value = new Se(u.value, {
|
|
1973
1973
|
keys: s.keyField,
|
|
1974
1974
|
threshold: 0.1
|
|
1975
1975
|
}));
|
|
@@ -1978,38 +1978,38 @@ const Ie = (e) => {
|
|
|
1978
1978
|
immediate: !0,
|
|
1979
1979
|
deep: !0
|
|
1980
1980
|
}
|
|
1981
|
-
),
|
|
1982
|
-
() =>
|
|
1981
|
+
), oe(
|
|
1982
|
+
() => w.queryForm[s.field],
|
|
1983
1983
|
(y) => {
|
|
1984
|
-
g.value || (Y(y) ? (
|
|
1984
|
+
g.value || (Y(y) ? (l.value = [], a.value = []) : l.value = De(y) ? y : []);
|
|
1985
1985
|
},
|
|
1986
1986
|
{
|
|
1987
1987
|
deep: !0
|
|
1988
1988
|
}
|
|
1989
|
-
),
|
|
1989
|
+
), ke(() => {
|
|
1990
1990
|
window.addEventListener("keydown", (y) => {
|
|
1991
1991
|
y.shiftKey && (p = !0);
|
|
1992
1992
|
}), window.addEventListener("keyup", () => {
|
|
1993
1993
|
p = !1;
|
|
1994
1994
|
}), Z(() => {
|
|
1995
|
-
|
|
1995
|
+
C.value = new Se(u.value, {
|
|
1996
1996
|
keys: s.keyField
|
|
1997
1997
|
});
|
|
1998
1998
|
});
|
|
1999
|
-
}),
|
|
1999
|
+
}), $t(() => {
|
|
2000
2000
|
window.removeEventListener("keydown", (y) => {
|
|
2001
2001
|
y.shiftKey && (p = !0);
|
|
2002
2002
|
}), window.removeEventListener("keyup", () => {
|
|
2003
2003
|
p = !1;
|
|
2004
2004
|
});
|
|
2005
|
-
}),
|
|
2005
|
+
}), ke(() => {
|
|
2006
2006
|
var y;
|
|
2007
|
-
i.value && (
|
|
2008
|
-
}), t(
|
|
2007
|
+
i.value && (n.focus = i.value.focus, n.blur = i.value.blur, n.selectedLabel = (y = i.value) == null ? void 0 : y.selectedLabel);
|
|
2008
|
+
}), t(n), (y, A) => (j(), re(I(ft), de({
|
|
2009
2009
|
ref_key: "selectRef",
|
|
2010
2010
|
ref: i,
|
|
2011
|
-
modelValue:
|
|
2012
|
-
"onUpdate:modelValue":
|
|
2011
|
+
modelValue: l.value,
|
|
2012
|
+
"onUpdate:modelValue": A[3] || (A[3] = (z) => l.value = z)
|
|
2013
2013
|
}, y.$attrs, {
|
|
2014
2014
|
multiple: "",
|
|
2015
2015
|
clearable: "",
|
|
@@ -2022,89 +2022,89 @@ const Ie = (e) => {
|
|
|
2022
2022
|
class: "jc-select",
|
|
2023
2023
|
"popper-class": "jc-select-popper",
|
|
2024
2024
|
placeholder: "请选择",
|
|
2025
|
-
onVisibleChange:
|
|
2026
|
-
onRemoveTag:
|
|
2027
|
-
onChange:
|
|
2028
|
-
}),
|
|
2025
|
+
onVisibleChange: _,
|
|
2026
|
+
onRemoveTag: x,
|
|
2027
|
+
onChange: k
|
|
2028
|
+
}), zt({
|
|
2029
2029
|
default: S(() => [
|
|
2030
|
-
|
|
2030
|
+
E(I(ht), {
|
|
2031
2031
|
value: "1",
|
|
2032
2032
|
hidden: ""
|
|
2033
2033
|
}),
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2034
|
+
F("div", Oi, [
|
|
2035
|
+
E(I(He), { class: "selcet-icon search-icon" }),
|
|
2036
|
+
Be(F("input", {
|
|
2037
2037
|
ref_key: "searchInputRef",
|
|
2038
2038
|
ref: o,
|
|
2039
|
-
"onUpdate:modelValue":
|
|
2039
|
+
"onUpdate:modelValue": A[0] || (A[0] = (z) => r.value = z),
|
|
2040
2040
|
class: "el-select-pop__input",
|
|
2041
2041
|
onInput: m
|
|
2042
2042
|
}, null, 544), [
|
|
2043
|
-
[
|
|
2043
|
+
[ns, r.value]
|
|
2044
2044
|
]),
|
|
2045
|
-
e.allowCreate ? (j(),
|
|
2045
|
+
e.allowCreate ? (j(), re(I(hs), {
|
|
2046
2046
|
key: 0,
|
|
2047
2047
|
class: "selcet-icon circle-icon",
|
|
2048
|
-
onClick:
|
|
2049
|
-
})) :
|
|
2048
|
+
onClick: V
|
|
2049
|
+
})) : me("", !0)
|
|
2050
2050
|
]),
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
modelValue:
|
|
2055
|
-
"onUpdate:modelValue":
|
|
2051
|
+
Be(F("div", ji, [
|
|
2052
|
+
F("li", Ri, [
|
|
2053
|
+
E(I(_t), {
|
|
2054
|
+
modelValue: v.value,
|
|
2055
|
+
"onUpdate:modelValue": A[1] || (A[1] = (z) => v.value = z),
|
|
2056
2056
|
indeterminate: d.value,
|
|
2057
2057
|
size: e.size,
|
|
2058
|
-
onChange:
|
|
2058
|
+
onChange: P
|
|
2059
2059
|
}, {
|
|
2060
|
-
default: S(() =>
|
|
2061
|
-
|
|
2060
|
+
default: S(() => A[4] || (A[4] = [
|
|
2061
|
+
J("全选")
|
|
2062
2062
|
])),
|
|
2063
2063
|
_: 1,
|
|
2064
2064
|
__: [4]
|
|
2065
2065
|
}, 8, ["modelValue", "indeterminate", "size"])
|
|
2066
2066
|
]),
|
|
2067
|
-
|
|
2068
|
-
modelValue:
|
|
2069
|
-
"onUpdate:modelValue":
|
|
2067
|
+
E(I(bs), {
|
|
2068
|
+
modelValue: a.value,
|
|
2069
|
+
"onUpdate:modelValue": A[2] || (A[2] = (z) => a.value = z),
|
|
2070
2070
|
onChange: $,
|
|
2071
2071
|
size: e.size
|
|
2072
2072
|
}, {
|
|
2073
2073
|
default: S(() => [
|
|
2074
|
-
|
|
2074
|
+
E(I(pt), {
|
|
2075
2075
|
class: "recycle-scroller",
|
|
2076
2076
|
items: c.value,
|
|
2077
2077
|
"item-size": 30,
|
|
2078
2078
|
"key-field": "value",
|
|
2079
|
-
style:
|
|
2079
|
+
style: Qe({ maxHeight: e.maxScrollHeight })
|
|
2080
2080
|
}, {
|
|
2081
2081
|
default: S(({ item: z }) => [
|
|
2082
|
-
|
|
2082
|
+
F("li", {
|
|
2083
2083
|
class: "el-select-dropdown__item",
|
|
2084
2084
|
title: z.label
|
|
2085
2085
|
}, [
|
|
2086
|
-
|
|
2086
|
+
E(I(_t), {
|
|
2087
2087
|
size: e.size,
|
|
2088
2088
|
value: z,
|
|
2089
2089
|
label: z,
|
|
2090
2090
|
disabled: z.disabled,
|
|
2091
|
-
onClick: (O) =>
|
|
2091
|
+
onClick: (O) => N(z)
|
|
2092
2092
|
}, {
|
|
2093
2093
|
default: S(() => [
|
|
2094
2094
|
ye(y.$slots, "default", { scope: z }, () => [
|
|
2095
|
-
|
|
2095
|
+
F("span", null, se(z.label), 1)
|
|
2096
2096
|
])
|
|
2097
2097
|
]),
|
|
2098
2098
|
_: 2
|
|
2099
2099
|
}, 1032, ["size", "value", "label", "disabled", "onClick"]),
|
|
2100
|
-
e.isNeedOnlySelect ? (j(),
|
|
2100
|
+
e.isNeedOnlySelect ? (j(), G("div", {
|
|
2101
2101
|
key: 0,
|
|
2102
2102
|
class: "select-tag",
|
|
2103
|
-
onClick:
|
|
2104
|
-
},
|
|
2105
|
-
|
|
2106
|
-
]), 8,
|
|
2107
|
-
], 8,
|
|
2103
|
+
onClick: Mt((O) => R(z), ["stop"])
|
|
2104
|
+
}, A[5] || (A[5] = [
|
|
2105
|
+
F("span", null, "仅筛选此项", -1)
|
|
2106
|
+
]), 8, Pi)) : me("", !0)
|
|
2107
|
+
], 8, Ni)
|
|
2108
2108
|
]),
|
|
2109
2109
|
_: 3
|
|
2110
2110
|
}, 8, ["items", "style"])
|
|
@@ -2112,10 +2112,10 @@ const Ie = (e) => {
|
|
|
2112
2112
|
_: 3
|
|
2113
2113
|
}, 8, ["modelValue", "size"])
|
|
2114
2114
|
], 512), [
|
|
2115
|
-
[
|
|
2115
|
+
[Ne, c.value.length > 0]
|
|
2116
2116
|
]),
|
|
2117
|
-
|
|
2118
|
-
[
|
|
2117
|
+
Be(F("p", qi, "无数据", 512), [
|
|
2118
|
+
[Ne, c.value.length === 0]
|
|
2119
2119
|
])
|
|
2120
2120
|
]),
|
|
2121
2121
|
_: 2
|
|
@@ -2123,31 +2123,31 @@ const Ie = (e) => {
|
|
|
2123
2123
|
e.isNeedFooter ? {
|
|
2124
2124
|
name: "footer",
|
|
2125
2125
|
fn: S(() => [
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2126
|
+
F("div", Ui, [
|
|
2127
|
+
F("span", null, [
|
|
2128
|
+
F("span", Ki, "已选 " + se(a.value.length) + " 项", 1),
|
|
2129
|
+
A[6] || (A[6] = F("span", { class: "shift-tips" }, "(按住Shift可以快速多选)", -1))
|
|
2130
2130
|
]),
|
|
2131
|
-
|
|
2132
|
-
|
|
2131
|
+
F("span", null, [
|
|
2132
|
+
E(I(be), {
|
|
2133
2133
|
size: e.size,
|
|
2134
|
-
onClick:
|
|
2134
|
+
onClick: W,
|
|
2135
2135
|
plain: ""
|
|
2136
2136
|
}, {
|
|
2137
|
-
default: S(() =>
|
|
2138
|
-
|
|
2137
|
+
default: S(() => A[7] || (A[7] = [
|
|
2138
|
+
J("关闭")
|
|
2139
2139
|
])),
|
|
2140
2140
|
_: 1,
|
|
2141
2141
|
__: [7]
|
|
2142
2142
|
}, 8, ["size"]),
|
|
2143
|
-
|
|
2143
|
+
E(I(be), {
|
|
2144
2144
|
type: "primary",
|
|
2145
2145
|
size: e.size,
|
|
2146
|
-
onClick:
|
|
2146
|
+
onClick: B,
|
|
2147
2147
|
plain: ""
|
|
2148
2148
|
}, {
|
|
2149
2149
|
default: S(() => [
|
|
2150
|
-
|
|
2150
|
+
J(se(e.footerBtnName), 1)
|
|
2151
2151
|
]),
|
|
2152
2152
|
_: 1
|
|
2153
2153
|
}, 8, ["size"])
|
|
@@ -2158,10 +2158,10 @@ const Ie = (e) => {
|
|
|
2158
2158
|
} : void 0
|
|
2159
2159
|
]), 1040, ["modelValue", "size", "style"]));
|
|
2160
2160
|
}
|
|
2161
|
-
}),
|
|
2161
|
+
}), pe = (e) => (e.install = (t) => {
|
|
2162
2162
|
const s = e.name;
|
|
2163
2163
|
t.component(s, e);
|
|
2164
|
-
}, e),
|
|
2164
|
+
}, e), Hi = pe(Qi), Wi = { class: "jc-cascader-item" }, Gi = { title: "{{ data.label }}" }, Ji = ["onClick"], Yi = { class: "custom-multi-footer" }, Xi = /* @__PURE__ */ he({
|
|
2165
2165
|
name: "JcCascader",
|
|
2166
2166
|
__name: "index",
|
|
2167
2167
|
props: {
|
|
@@ -2209,73 +2209,73 @@ const Ie = (e) => {
|
|
|
2209
2209
|
}
|
|
2210
2210
|
},
|
|
2211
2211
|
setup(e, { expose: t }) {
|
|
2212
|
-
const s = e, i = T(),
|
|
2213
|
-
const m = String(
|
|
2214
|
-
return m.indexOf(
|
|
2212
|
+
const s = e, i = T(), l = T([]), n = Ae({}), r = (x, k) => {
|
|
2213
|
+
const m = String(x.label).trim().toLowerCase(), V = k.trim().toLowerCase();
|
|
2214
|
+
return m.indexOf(V) !== -1;
|
|
2215
2215
|
}, o = {
|
|
2216
2216
|
multiple: !0,
|
|
2217
2217
|
expandTrigger: "hover"
|
|
2218
|
-
},
|
|
2218
|
+
}, u = T(!1), { useQueryStore: c } = Ee(s.injectionKey), { state: a, setQuery: v } = c(), d = T(!1), g = T(!1), M = ue(() => {
|
|
2219
2219
|
var m;
|
|
2220
|
-
const
|
|
2221
|
-
(
|
|
2220
|
+
const x = [], k = s.options.map(
|
|
2221
|
+
(V) => ({ node: V, path: [V.value] })
|
|
2222
2222
|
);
|
|
2223
|
-
for (;
|
|
2224
|
-
const { node:
|
|
2225
|
-
(m =
|
|
2226
|
-
|
|
2227
|
-
}) :
|
|
2223
|
+
for (; k.length > 0; ) {
|
|
2224
|
+
const { node: V, path: P } = k.shift();
|
|
2225
|
+
(m = V.children) != null && m.length ? V.children.forEach(($) => {
|
|
2226
|
+
k.push({ node: $, path: [...P, $.value] });
|
|
2227
|
+
}) : x.push(P);
|
|
2228
2228
|
}
|
|
2229
|
-
return
|
|
2229
|
+
return x;
|
|
2230
2230
|
});
|
|
2231
|
-
|
|
2232
|
-
|
|
2231
|
+
oe(l, (x) => {
|
|
2232
|
+
x.length === 0 ? (d.value = !1, g.value = !1) : x.length === M.value.length ? (d.value = !0, g.value = !1) : g.value = !0;
|
|
2233
2233
|
});
|
|
2234
|
-
const
|
|
2235
|
-
g.value = !1,
|
|
2236
|
-
},
|
|
2237
|
-
var
|
|
2238
|
-
|
|
2234
|
+
const w = (x) => {
|
|
2235
|
+
g.value = !1, l.value = x ? M.value : [];
|
|
2236
|
+
}, b = () => {
|
|
2237
|
+
var x;
|
|
2238
|
+
l.value = [], d.value = !1, g.value = !1, (x = i.value) == null || x.togglePopperVisible(!1);
|
|
2239
2239
|
}, h = () => {
|
|
2240
|
-
var
|
|
2241
|
-
|
|
2242
|
-
|
|
2240
|
+
var x;
|
|
2241
|
+
u.value = !0, v(s.field, l.value), (x = i.value) == null || x.togglePopperVisible(!1), Z(() => {
|
|
2242
|
+
u.value = !1;
|
|
2243
2243
|
});
|
|
2244
2244
|
}, p = () => {
|
|
2245
2245
|
Z(() => {
|
|
2246
2246
|
h();
|
|
2247
2247
|
});
|
|
2248
|
-
},
|
|
2249
|
-
|
|
2250
|
-
},
|
|
2251
|
-
const
|
|
2252
|
-
(m) => m.includes(
|
|
2248
|
+
}, C = () => {
|
|
2249
|
+
l.value = [], h();
|
|
2250
|
+
}, _ = (x) => {
|
|
2251
|
+
const k = M.value.filter(
|
|
2252
|
+
(m) => m.includes(x.value)
|
|
2253
2253
|
);
|
|
2254
|
-
|
|
2254
|
+
l.value = k, h();
|
|
2255
2255
|
};
|
|
2256
|
-
return
|
|
2257
|
-
() =>
|
|
2258
|
-
(
|
|
2259
|
-
|
|
2256
|
+
return oe(
|
|
2257
|
+
() => a.queryForm[s.field],
|
|
2258
|
+
(x) => {
|
|
2259
|
+
u.value || (Y(x) ? l.value = [] : l.value = De(x) ? x : []);
|
|
2260
2260
|
},
|
|
2261
2261
|
{
|
|
2262
2262
|
deep: !0
|
|
2263
2263
|
}
|
|
2264
|
-
),
|
|
2265
|
-
}),
|
|
2266
|
-
}),
|
|
2267
|
-
var
|
|
2268
|
-
i.value && (
|
|
2269
|
-
}), t(
|
|
2270
|
-
const m =
|
|
2271
|
-
return j(),
|
|
2264
|
+
), ke(() => {
|
|
2265
|
+
}), $t(() => {
|
|
2266
|
+
}), ke(() => {
|
|
2267
|
+
var x, k, m;
|
|
2268
|
+
i.value && (n.getCheckedNodes = i.value.getCheckedNodes, n.cascaderPanelRef = i.value.cascaderPanelRef, n.togglePopperVisible = (x = i.value) == null ? void 0 : x.togglePopperVisible, n.contentRef = (k = i.value) == null ? void 0 : k.contentRef, n.presentText = (m = i.value) == null ? void 0 : m.presentText);
|
|
2269
|
+
}), t(n), (x, k) => {
|
|
2270
|
+
const m = te("el-checkbox"), V = te("el-button"), P = te("el-cascader");
|
|
2271
|
+
return j(), re(P, de({
|
|
2272
2272
|
ref_key: "cascaderRef",
|
|
2273
2273
|
ref: i,
|
|
2274
2274
|
class: "jc-cascader",
|
|
2275
2275
|
"popper-class": "jc-cascader-popper",
|
|
2276
|
-
modelValue:
|
|
2277
|
-
"onUpdate:modelValue":
|
|
2278
|
-
},
|
|
2276
|
+
modelValue: l.value,
|
|
2277
|
+
"onUpdate:modelValue": k[1] || (k[1] = ($) => l.value = $)
|
|
2278
|
+
}, x.$attrs, {
|
|
2279
2279
|
props: o,
|
|
2280
2280
|
options: e.options,
|
|
2281
2281
|
filterable: "",
|
|
@@ -2288,42 +2288,42 @@ const Ie = (e) => {
|
|
|
2288
2288
|
style: { width: e.width },
|
|
2289
2289
|
placeholder: "请选择",
|
|
2290
2290
|
onRemoveTag: p,
|
|
2291
|
-
onClear:
|
|
2292
|
-
}),
|
|
2291
|
+
onClear: C
|
|
2292
|
+
}), zt({
|
|
2293
2293
|
default: S(({ data: $ }) => [
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
e.isNeedOnlySelect ? (j(),
|
|
2294
|
+
F("div", Wi, [
|
|
2295
|
+
F("span", Gi, se($.label), 1),
|
|
2296
|
+
e.isNeedOnlySelect ? (j(), G("span", {
|
|
2297
2297
|
key: 0,
|
|
2298
2298
|
class: "select-tag",
|
|
2299
|
-
onClick:
|
|
2300
|
-
},
|
|
2301
|
-
|
|
2302
|
-
]), 8,
|
|
2299
|
+
onClick: Mt((N) => _($), ["stop"])
|
|
2300
|
+
}, k[3] || (k[3] = [
|
|
2301
|
+
F("span", null, "仅筛选此项", -1)
|
|
2302
|
+
]), 8, Ji)) : me("", !0)
|
|
2303
2303
|
])
|
|
2304
2304
|
]),
|
|
2305
2305
|
footer: S(() => [
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2306
|
+
F("div", Yi, [
|
|
2307
|
+
F("span", null, [
|
|
2308
|
+
E(V, {
|
|
2309
2309
|
size: e.size,
|
|
2310
|
-
onClick:
|
|
2310
|
+
onClick: b,
|
|
2311
2311
|
plain: ""
|
|
2312
2312
|
}, {
|
|
2313
|
-
default: S(() =>
|
|
2314
|
-
|
|
2313
|
+
default: S(() => k[4] || (k[4] = [
|
|
2314
|
+
J("关闭")
|
|
2315
2315
|
])),
|
|
2316
2316
|
_: 1,
|
|
2317
2317
|
__: [4]
|
|
2318
2318
|
}, 8, ["size"]),
|
|
2319
|
-
|
|
2319
|
+
E(V, {
|
|
2320
2320
|
type: "primary",
|
|
2321
2321
|
size: e.size,
|
|
2322
2322
|
onClick: h,
|
|
2323
2323
|
plain: ""
|
|
2324
2324
|
}, {
|
|
2325
2325
|
default: S(() => [
|
|
2326
|
-
|
|
2326
|
+
J(se(e.footerBtnName), 1)
|
|
2327
2327
|
]),
|
|
2328
2328
|
_: 1
|
|
2329
2329
|
}, 8, ["size"])
|
|
@@ -2335,17 +2335,17 @@ const Ie = (e) => {
|
|
|
2335
2335
|
e.isNeedHeader ? {
|
|
2336
2336
|
name: "header",
|
|
2337
2337
|
fn: S(() => [
|
|
2338
|
-
|
|
2339
|
-
|
|
2338
|
+
F("div", null, [
|
|
2339
|
+
E(m, {
|
|
2340
2340
|
style: { "margin-left": "10px" },
|
|
2341
2341
|
size: e.size,
|
|
2342
2342
|
modelValue: d.value,
|
|
2343
|
-
"onUpdate:modelValue":
|
|
2343
|
+
"onUpdate:modelValue": k[0] || (k[0] = ($) => d.value = $),
|
|
2344
2344
|
indeterminate: g.value,
|
|
2345
|
-
onChange:
|
|
2345
|
+
onChange: w
|
|
2346
2346
|
}, {
|
|
2347
|
-
default: S(() =>
|
|
2348
|
-
|
|
2347
|
+
default: S(() => k[2] || (k[2] = [
|
|
2348
|
+
J(" 全部 ")
|
|
2349
2349
|
])),
|
|
2350
2350
|
_: 1,
|
|
2351
2351
|
__: [2]
|
|
@@ -2357,7 +2357,7 @@ const Ie = (e) => {
|
|
|
2357
2357
|
]), 1040, ["modelValue", "options", "size", "style"]);
|
|
2358
2358
|
};
|
|
2359
2359
|
}
|
|
2360
|
-
}),
|
|
2360
|
+
}), Zi = pe(Xi), el = { style: { "max-width": "100px" } }, tl = /* @__PURE__ */ he({
|
|
2361
2361
|
name: "JcDatePicker",
|
|
2362
2362
|
__name: "index",
|
|
2363
2363
|
props: {
|
|
@@ -2387,63 +2387,63 @@ const Ie = (e) => {
|
|
|
2387
2387
|
},
|
|
2388
2388
|
emits: ["fieldChange"],
|
|
2389
2389
|
setup(e, { expose: t, emit: s }) {
|
|
2390
|
-
const i = e,
|
|
2390
|
+
const i = e, l = s, n = T([]), r = T([]), o = T(""), u = T(""), c = T(!1), { useQueryStore: a } = Ee(i.injectionKey), { state: v, setQuery: d } = a(), g = () => {
|
|
2391
2391
|
i.fieldList.forEach((p) => {
|
|
2392
2392
|
d(p.value, void 0);
|
|
2393
2393
|
});
|
|
2394
2394
|
}, M = (p) => {
|
|
2395
|
-
Y(
|
|
2395
|
+
Y(n.value) || (c.value = !0, g(), d(p, n.value), Z(() => {
|
|
2396
2396
|
c.value = !1;
|
|
2397
|
-
})),
|
|
2398
|
-
},
|
|
2399
|
-
c.value = !0,
|
|
2397
|
+
})), l("fieldChange", p);
|
|
2398
|
+
}, w = () => {
|
|
2399
|
+
c.value = !0, u.value = o.value, r.value = n.value, d(o.value, n.value), Z(() => {
|
|
2400
2400
|
c.value = !1;
|
|
2401
2401
|
});
|
|
2402
2402
|
};
|
|
2403
|
-
|
|
2403
|
+
oe(
|
|
2404
2404
|
() => i.fieldList,
|
|
2405
2405
|
(p) => {
|
|
2406
|
-
(!Y(p) && Y(o.value) || o.value && !i.fieldList.map((
|
|
2406
|
+
(!Y(p) && Y(o.value) || o.value && !i.fieldList.map((C) => C.value).includes(o.value)) && (o.value = p[0].value, n.value = []);
|
|
2407
2407
|
},
|
|
2408
2408
|
{
|
|
2409
2409
|
immediate: !0,
|
|
2410
2410
|
deep: !0
|
|
2411
2411
|
}
|
|
2412
|
-
),
|
|
2413
|
-
i.fieldList.map((p) => () =>
|
|
2412
|
+
), oe(
|
|
2413
|
+
i.fieldList.map((p) => () => v.queryForm[p.value]),
|
|
2414
2414
|
(p) => {
|
|
2415
2415
|
if (!c.value) {
|
|
2416
|
-
const
|
|
2417
|
-
|
|
2416
|
+
const C = p.findIndex((_) => !Y(_));
|
|
2417
|
+
C === -1 ? (o.value = i.fieldList[0].value, n.value = []) : (o.value = i.fieldList[C].value, n.value = p[C] || []);
|
|
2418
2418
|
}
|
|
2419
2419
|
},
|
|
2420
2420
|
{
|
|
2421
2421
|
deep: !0
|
|
2422
2422
|
}
|
|
2423
2423
|
);
|
|
2424
|
-
const
|
|
2425
|
-
return
|
|
2426
|
-
var p,
|
|
2427
|
-
|
|
2428
|
-
}), t(h), (p,
|
|
2429
|
-
const
|
|
2430
|
-
return j(),
|
|
2424
|
+
const b = T(), h = Ae({});
|
|
2425
|
+
return ke(() => {
|
|
2426
|
+
var p, C, _, x;
|
|
2427
|
+
b.value && (h.focus = (p = b.value) == null ? void 0 : p.focus, h.blur = (C = b.value) == null ? void 0 : C.blur, h.handleOpen = (_ = b.value) == null ? void 0 : _.handleOpen, h.handleClose = (x = b.value) == null ? void 0 : x.handleClose);
|
|
2428
|
+
}), t(h), (p, C) => {
|
|
2429
|
+
const _ = te("el-option"), x = te("el-select"), k = te("el-date-picker");
|
|
2430
|
+
return j(), G("div", {
|
|
2431
2431
|
class: "jc-date-picker",
|
|
2432
|
-
style:
|
|
2432
|
+
style: Qe({ width: e.width })
|
|
2433
2433
|
}, [
|
|
2434
|
-
|
|
2435
|
-
|
|
2434
|
+
F("div", el, [
|
|
2435
|
+
E(x, {
|
|
2436
2436
|
modelValue: o.value,
|
|
2437
|
-
"onUpdate:modelValue":
|
|
2437
|
+
"onUpdate:modelValue": C[0] || (C[0] = (m) => o.value = m),
|
|
2438
2438
|
size: e.size,
|
|
2439
2439
|
class: "select-field",
|
|
2440
2440
|
onChange: M
|
|
2441
2441
|
}, {
|
|
2442
2442
|
prefix: S(() => [
|
|
2443
|
-
|
|
2443
|
+
J(se((e.fieldList.find((m) => m.value === o.value) || {}).label), 1)
|
|
2444
2444
|
]),
|
|
2445
2445
|
default: S(() => [
|
|
2446
|
-
(j(!0),
|
|
2446
|
+
(j(!0), G(xe, null, we(e.fieldList, (m) => (j(), re(_, {
|
|
2447
2447
|
key: m.value,
|
|
2448
2448
|
label: m.label,
|
|
2449
2449
|
value: m.value
|
|
@@ -2452,11 +2452,11 @@ const Ie = (e) => {
|
|
|
2452
2452
|
_: 1
|
|
2453
2453
|
}, 8, ["modelValue", "size"])
|
|
2454
2454
|
]),
|
|
2455
|
-
|
|
2455
|
+
E(k, de({
|
|
2456
2456
|
ref_key: "datePickerRef",
|
|
2457
|
-
ref:
|
|
2458
|
-
modelValue:
|
|
2459
|
-
"onUpdate:modelValue":
|
|
2457
|
+
ref: b,
|
|
2458
|
+
modelValue: n.value,
|
|
2459
|
+
"onUpdate:modelValue": C[1] || (C[1] = (m) => n.value = m),
|
|
2460
2460
|
type: e.type
|
|
2461
2461
|
}, p.$attrs, {
|
|
2462
2462
|
"range-separator": "至",
|
|
@@ -2464,12 +2464,12 @@ const Ie = (e) => {
|
|
|
2464
2464
|
"end-placeholder": "结束时间",
|
|
2465
2465
|
size: e.size,
|
|
2466
2466
|
"value-format": e.type === "daterange" ? "YYYY-MM-DD" : "YYYY-MM",
|
|
2467
|
-
onChange:
|
|
2467
|
+
onChange: w
|
|
2468
2468
|
}), null, 16, ["modelValue", "type", "size", "value-format"])
|
|
2469
2469
|
], 4);
|
|
2470
2470
|
};
|
|
2471
2471
|
}
|
|
2472
|
-
}),
|
|
2472
|
+
}), sl = pe(tl), il = { class: "suffixContent" }, ll = /* @__PURE__ */ he({
|
|
2473
2473
|
name: "JcInputSwitch",
|
|
2474
2474
|
__name: "index",
|
|
2475
2475
|
props: {
|
|
@@ -2494,105 +2494,105 @@ const Ie = (e) => {
|
|
|
2494
2494
|
},
|
|
2495
2495
|
emits: ["fieldChange"],
|
|
2496
2496
|
setup(e, { expose: t, emit: s }) {
|
|
2497
|
-
const i = e,
|
|
2498
|
-
i.fieldList.forEach((
|
|
2499
|
-
|
|
2497
|
+
const i = e, l = s, n = T(""), r = T(""), o = T(""), u = T(""), { useQueryStore: c } = Ee(i.injectionKey), { state: a, setQuery: v } = c(), d = T(!1), g = () => {
|
|
2498
|
+
i.fieldList.forEach((C) => {
|
|
2499
|
+
v(C.value, void 0);
|
|
2500
2500
|
});
|
|
2501
2501
|
}, M = () => {
|
|
2502
|
-
d.value = !0,
|
|
2502
|
+
d.value = !0, n.value = "", g(), Z(() => {
|
|
2503
2503
|
d.value = !1;
|
|
2504
2504
|
});
|
|
2505
|
-
},
|
|
2506
|
-
|
|
2505
|
+
}, w = (C) => {
|
|
2506
|
+
n.value && (d.value = !0, g(), v(C, n.value), Z(() => {
|
|
2507
2507
|
d.value = !1;
|
|
2508
|
-
})),
|
|
2509
|
-
},
|
|
2510
|
-
d.value = !0, r.value =
|
|
2508
|
+
})), l("fieldChange", C);
|
|
2509
|
+
}, b = () => {
|
|
2510
|
+
d.value = !0, r.value = n.value, u.value = o.value, v(o.value, n.value.trim()), Z(() => {
|
|
2511
2511
|
d.value = !1;
|
|
2512
2512
|
});
|
|
2513
2513
|
};
|
|
2514
|
-
|
|
2514
|
+
oe(
|
|
2515
2515
|
() => i.fieldList,
|
|
2516
|
-
(
|
|
2517
|
-
(!Y(
|
|
2516
|
+
(C) => {
|
|
2517
|
+
(!Y(C) && Y(o.value) || o.value && !i.fieldList.map((_) => _.value).includes(o.value)) && (o.value = C[0].value, n.value = "");
|
|
2518
2518
|
},
|
|
2519
2519
|
{
|
|
2520
2520
|
immediate: !0,
|
|
2521
2521
|
deep: !0
|
|
2522
2522
|
}
|
|
2523
|
-
),
|
|
2524
|
-
() =>
|
|
2523
|
+
), oe(
|
|
2524
|
+
() => a.queryForm.resetCount,
|
|
2525
2525
|
() => {
|
|
2526
2526
|
M();
|
|
2527
2527
|
}
|
|
2528
|
-
),
|
|
2529
|
-
i.fieldList.map((
|
|
2530
|
-
(
|
|
2528
|
+
), oe(
|
|
2529
|
+
i.fieldList.map((C) => () => a.queryForm[C.value]),
|
|
2530
|
+
(C) => {
|
|
2531
2531
|
if (!d.value) {
|
|
2532
|
-
const
|
|
2533
|
-
|
|
2532
|
+
const _ = C.findIndex((x) => !Y(x));
|
|
2533
|
+
_ === -1 ? (o.value = i.fieldList[0].value, n.value = "") : (o.value = i.fieldList[_].value, n.value = C[_] || "");
|
|
2534
2534
|
}
|
|
2535
2535
|
},
|
|
2536
2536
|
{
|
|
2537
2537
|
deep: !0
|
|
2538
2538
|
}
|
|
2539
2539
|
);
|
|
2540
|
-
const h = T(), p =
|
|
2541
|
-
return
|
|
2542
|
-
var
|
|
2543
|
-
h.value && (p.blur = (
|
|
2544
|
-
}), t(p), (
|
|
2540
|
+
const h = T(), p = Ae({});
|
|
2541
|
+
return ke(() => {
|
|
2542
|
+
var C, _, x, k, m, V, P, $, N, R;
|
|
2543
|
+
h.value && (p.blur = (C = h.value) == null ? void 0 : C.blur, p.clear = (_ = h.value) == null ? void 0 : _.clear, p.focus = (x = h.value) == null ? void 0 : x.focus, p.input = (k = h.value) == null ? void 0 : k.input, p.ref = (m = h.value) == null ? void 0 : m.ref, p.resizeTextarea = (V = h.value) == null ? void 0 : V.resizeTextarea, p.select = (P = h.value) == null ? void 0 : P.select, p.textarea = ($ = h.value) == null ? void 0 : $.textarea, p.textareaStyle = (N = h.value) == null ? void 0 : N.textareaStyle, p.isComposing = (R = h.value) == null ? void 0 : R.isComposing);
|
|
2544
|
+
}), t(p), (C, _) => (j(), re(I(Ze), de({
|
|
2545
2545
|
ref_key: "inputRef",
|
|
2546
2546
|
ref: h,
|
|
2547
|
-
modelValue:
|
|
2548
|
-
"onUpdate:modelValue":
|
|
2547
|
+
modelValue: n.value,
|
|
2548
|
+
"onUpdate:modelValue": _[1] || (_[1] = (x) => n.value = x),
|
|
2549
2549
|
modelModifiers: { trim: !0 }
|
|
2550
|
-
},
|
|
2550
|
+
}, C.$attrs, {
|
|
2551
2551
|
placeholder: "请输入内容",
|
|
2552
2552
|
style: { width: e.width },
|
|
2553
2553
|
size: e.size,
|
|
2554
2554
|
class: "jc-input jc-input-switch"
|
|
2555
2555
|
}), {
|
|
2556
2556
|
prepend: S(() => [
|
|
2557
|
-
|
|
2557
|
+
E(I(ft), {
|
|
2558
2558
|
modelValue: o.value,
|
|
2559
|
-
"onUpdate:modelValue":
|
|
2559
|
+
"onUpdate:modelValue": _[0] || (_[0] = (x) => o.value = x),
|
|
2560
2560
|
size: e.size,
|
|
2561
2561
|
class: "select-field",
|
|
2562
|
-
onChange:
|
|
2562
|
+
onChange: w
|
|
2563
2563
|
}, {
|
|
2564
2564
|
prefix: S(() => [
|
|
2565
|
-
|
|
2565
|
+
J(se((e.fieldList.find((x) => x.value === o.value) || {}).label), 1)
|
|
2566
2566
|
]),
|
|
2567
2567
|
default: S(() => [
|
|
2568
|
-
(j(!0),
|
|
2569
|
-
key:
|
|
2570
|
-
label:
|
|
2571
|
-
value:
|
|
2568
|
+
(j(!0), G(xe, null, we(e.fieldList, (x) => (j(), re(I(ht), {
|
|
2569
|
+
key: x.value,
|
|
2570
|
+
label: x.label,
|
|
2571
|
+
value: x.value
|
|
2572
2572
|
}, null, 8, ["label", "value"]))), 128))
|
|
2573
2573
|
]),
|
|
2574
2574
|
_: 1
|
|
2575
2575
|
}, 8, ["modelValue", "size"])
|
|
2576
2576
|
]),
|
|
2577
2577
|
suffix: S(() => [
|
|
2578
|
-
|
|
2579
|
-
|
|
2578
|
+
F("div", il, [
|
|
2579
|
+
Be(E(I(Ve), {
|
|
2580
2580
|
class: "el-input__icon",
|
|
2581
2581
|
onClick: M
|
|
2582
2582
|
}, {
|
|
2583
2583
|
default: S(() => [
|
|
2584
|
-
|
|
2584
|
+
E(I(Lt))
|
|
2585
2585
|
]),
|
|
2586
2586
|
_: 1
|
|
2587
2587
|
}, 512), [
|
|
2588
|
-
[
|
|
2588
|
+
[Ne, n.value]
|
|
2589
2589
|
]),
|
|
2590
|
-
|
|
2590
|
+
E(I(Ve), {
|
|
2591
2591
|
class: "el-input__icon",
|
|
2592
|
-
onClick:
|
|
2592
|
+
onClick: b
|
|
2593
2593
|
}, {
|
|
2594
2594
|
default: S(() => [
|
|
2595
|
-
|
|
2595
|
+
E(I(He))
|
|
2596
2596
|
]),
|
|
2597
2597
|
_: 1
|
|
2598
2598
|
})
|
|
@@ -2601,7 +2601,7 @@ const Ie = (e) => {
|
|
|
2601
2601
|
_: 1
|
|
2602
2602
|
}, 16, ["modelValue", "style", "size"]));
|
|
2603
2603
|
}
|
|
2604
|
-
}),
|
|
2604
|
+
}), nl = pe(ll), ol = { class: "suffixContent" }, rl = { class: "popover-body" }, al = { class: "popover-btn" }, ul = { class: "popover-btn-right" }, cl = /* @__PURE__ */ he({
|
|
2605
2605
|
name: "JcInputComplex",
|
|
2606
2606
|
__name: "index",
|
|
2607
2607
|
props: {
|
|
@@ -2626,29 +2626,29 @@ const Ie = (e) => {
|
|
|
2626
2626
|
},
|
|
2627
2627
|
emits: ["fieldChange"],
|
|
2628
2628
|
setup(e, { expose: t, emit: s }) {
|
|
2629
|
-
const i = e,
|
|
2629
|
+
const i = e, l = s, n = T(""), r = T(""), o = T(""), u = T(""), c = T(!1), a = ue(() => o.value + "List"), v = ue(
|
|
2630
2630
|
() => {
|
|
2631
2631
|
var z;
|
|
2632
2632
|
return ((z = i.fieldList.find((O) => O.value === o.value)) == null ? void 0 : z.label) || "";
|
|
2633
2633
|
}
|
|
2634
|
-
), d = T(""), g = T(!1), { useQueryStore: M } =
|
|
2634
|
+
), d = T(""), g = T(!1), { useQueryStore: M } = Ee(i.injectionKey), { state: w, setQuery: b, addTag: h, reduceTag: p } = M(), C = {}, _ = {};
|
|
2635
2635
|
i.fieldList.forEach((z) => {
|
|
2636
|
-
|
|
2636
|
+
C[z.value] = void 0, _[z.value + "List"] = [];
|
|
2637
2637
|
});
|
|
2638
|
-
const
|
|
2639
|
-
c.value = !1,
|
|
2640
|
-
},
|
|
2641
|
-
|
|
2638
|
+
const x = (z) => {
|
|
2639
|
+
c.value = !1, k(), l("fieldChange", z);
|
|
2640
|
+
}, k = () => {
|
|
2641
|
+
w.queryForm[a.value] ? d.value = w.queryForm[a.value].join(`
|
|
2642
2642
|
`) : d.value = "";
|
|
2643
2643
|
}, m = () => {
|
|
2644
|
-
g.value = !0,
|
|
2644
|
+
g.value = !0, n.value = "", b(o.value, void 0), $(), Z(() => {
|
|
2645
2645
|
g.value = !1;
|
|
2646
2646
|
});
|
|
2647
|
-
},
|
|
2648
|
-
for (const z in
|
|
2649
|
-
|
|
2650
|
-
},
|
|
2651
|
-
g.value = !0, d.value = "", r.value =
|
|
2647
|
+
}, V = () => {
|
|
2648
|
+
for (const z in C)
|
|
2649
|
+
b(z, void 0);
|
|
2650
|
+
}, P = () => {
|
|
2651
|
+
g.value = !0, d.value = "", r.value = n.value, u.value = o.value, V(), b(a.value, void 0), p({ key: a.value }), b(o.value, n.value.trim()), Z(() => {
|
|
2652
2652
|
g.value = !1;
|
|
2653
2653
|
});
|
|
2654
2654
|
}, $ = () => {
|
|
@@ -2656,82 +2656,82 @@ const Ie = (e) => {
|
|
|
2656
2656
|
const z = d.value.split(`
|
|
2657
2657
|
`).filter((O) => !Y(O));
|
|
2658
2658
|
if (z.length > 0) {
|
|
2659
|
-
const O = [...new Set(z)],
|
|
2659
|
+
const O = [...new Set(z)], H = cs(
|
|
2660
2660
|
z,
|
|
2661
|
-
(ee,
|
|
2662
|
-
),
|
|
2663
|
-
if (
|
|
2661
|
+
(ee, ae, _e) => ds(_e, ee, ae + 1)
|
|
2662
|
+
), ie = [...new Set(H)];
|
|
2663
|
+
if (ie.length > 0) {
|
|
2664
2664
|
const ee = i.fieldList.find(
|
|
2665
2665
|
(_e) => _e.value === o.value
|
|
2666
|
-
),
|
|
2666
|
+
), ae = `搜索条件中包含重复的内容:${ee == null ? void 0 : ee.label}:${ie.join(
|
|
2667
2667
|
`
|
|
2668
2668
|
`
|
|
2669
2669
|
)}`;
|
|
2670
|
-
|
|
2670
|
+
ne.warning(ae);
|
|
2671
2671
|
}
|
|
2672
2672
|
d.value = O.join(`
|
|
2673
|
-
`),
|
|
2674
|
-
key:
|
|
2675
|
-
label:
|
|
2673
|
+
`), V(), b(a.value, O), h({
|
|
2674
|
+
key: a.value,
|
|
2675
|
+
label: v.value,
|
|
2676
2676
|
value: O
|
|
2677
2677
|
});
|
|
2678
2678
|
} else
|
|
2679
|
-
|
|
2680
|
-
|
|
2679
|
+
b(a.value, void 0), p({ key: a.value });
|
|
2680
|
+
N(), Z(() => {
|
|
2681
2681
|
g.value = !1;
|
|
2682
2682
|
});
|
|
2683
|
-
},
|
|
2683
|
+
}, N = () => {
|
|
2684
2684
|
c.value = !1;
|
|
2685
2685
|
}, R = () => {
|
|
2686
|
-
|
|
2687
|
-
},
|
|
2686
|
+
n.value = "", d.value = "", r.value = "", N();
|
|
2687
|
+
}, W = (z) => {
|
|
2688
2688
|
Object.keys(z).forEach((O) => {
|
|
2689
2689
|
o.value = O.replace("List", ""), d.value = z[O].join(`
|
|
2690
2690
|
`), $();
|
|
2691
2691
|
});
|
|
2692
|
-
},
|
|
2693
|
-
!Y(
|
|
2692
|
+
}, B = () => {
|
|
2693
|
+
!Y(n.value) && (n.value !== r.value || o.value !== u.value) ? (r.value = n.value, u.value = o.value, V(), b(a.value, void 0), p({ key: a.value }), b(o.value, n.value.trim())) : Y(n.value) && (r.value = n.value, b(o.value, void 0));
|
|
2694
2694
|
};
|
|
2695
|
-
|
|
2695
|
+
oe(
|
|
2696
2696
|
() => i.fieldList,
|
|
2697
2697
|
(z) => {
|
|
2698
|
-
(!Y(z) && Y(o.value) || o.value && !i.fieldList.map((O) => O.value).includes(o.value)) && (o.value = z[0].value,
|
|
2698
|
+
(!Y(z) && Y(o.value) || o.value && !i.fieldList.map((O) => O.value).includes(o.value)) && (o.value = z[0].value, n.value = "", d.value = "");
|
|
2699
2699
|
},
|
|
2700
2700
|
{
|
|
2701
2701
|
immediate: !0,
|
|
2702
2702
|
deep: !0
|
|
2703
2703
|
}
|
|
2704
|
-
),
|
|
2705
|
-
() =>
|
|
2704
|
+
), oe(
|
|
2705
|
+
() => w.queryForm.resetCount,
|
|
2706
2706
|
() => {
|
|
2707
2707
|
R();
|
|
2708
2708
|
}
|
|
2709
|
-
),
|
|
2709
|
+
), oe(
|
|
2710
2710
|
i.fieldList.flatMap((z) => [
|
|
2711
|
-
() =>
|
|
2712
|
-
() =>
|
|
2711
|
+
() => w.queryForm[z.value],
|
|
2712
|
+
() => w.queryForm[z.value + "List"]
|
|
2713
2713
|
]),
|
|
2714
2714
|
(z) => {
|
|
2715
2715
|
if (!g.value) {
|
|
2716
|
-
if (z.findIndex((
|
|
2716
|
+
if (z.findIndex((ie) => !Y(ie)) === -1) {
|
|
2717
2717
|
R();
|
|
2718
2718
|
return;
|
|
2719
2719
|
}
|
|
2720
|
-
let
|
|
2721
|
-
i.fieldList.forEach((
|
|
2722
|
-
var
|
|
2723
|
-
const ee =
|
|
2724
|
-
if (d.value = ((
|
|
2725
|
-
`)) || "", De(
|
|
2720
|
+
let H = !1;
|
|
2721
|
+
i.fieldList.forEach((ie) => {
|
|
2722
|
+
var ae;
|
|
2723
|
+
const ee = ie.value + "List";
|
|
2724
|
+
if (d.value = ((ae = w.queryForm[ee]) == null ? void 0 : ae.join(`
|
|
2725
|
+
`)) || "", De(w.queryForm[ee]) && !Y(w.queryForm[ee])) {
|
|
2726
2726
|
h({
|
|
2727
2727
|
key: ee,
|
|
2728
|
-
label:
|
|
2729
|
-
value:
|
|
2728
|
+
label: ie.label,
|
|
2729
|
+
value: w.queryForm[ee]
|
|
2730
2730
|
});
|
|
2731
2731
|
return;
|
|
2732
2732
|
} else
|
|
2733
2733
|
p({ key: ee });
|
|
2734
|
-
|
|
2734
|
+
w.queryForm[ie.value] ? (H = !0, o.value = ie.value, n.value = w.queryForm[ie.value] || "") : H || (n.value = "");
|
|
2735
2735
|
});
|
|
2736
2736
|
}
|
|
2737
2737
|
},
|
|
@@ -2739,15 +2739,15 @@ const Ie = (e) => {
|
|
|
2739
2739
|
deep: !0
|
|
2740
2740
|
}
|
|
2741
2741
|
);
|
|
2742
|
-
const y = T(),
|
|
2743
|
-
return
|
|
2744
|
-
var z, O,
|
|
2745
|
-
y.value && (
|
|
2746
|
-
}),
|
|
2742
|
+
const y = T(), A = Ae({});
|
|
2743
|
+
return ke(() => {
|
|
2744
|
+
var z, O, H, ie, ee, ae, _e, Ge, Je, f;
|
|
2745
|
+
y.value && (A.blur = (z = y.value) == null ? void 0 : z.blur, A.clear = (O = y.value) == null ? void 0 : O.clear, A.focus = (H = y.value) == null ? void 0 : H.focus, A.input = (ie = y.value) == null ? void 0 : ie.input, A.ref = (ee = y.value) == null ? void 0 : ee.ref, A.resizeTextarea = (ae = y.value) == null ? void 0 : ae.resizeTextarea, A.select = (_e = y.value) == null ? void 0 : _e.select, A.textarea = (Ge = y.value) == null ? void 0 : Ge.textarea, A.textareaStyle = (Je = y.value) == null ? void 0 : Je.textareaStyle, A.isComposing = (f = y.value) == null ? void 0 : f.isComposing);
|
|
2746
|
+
}), A.setInputValueMult = W, A.setInputByOutside = B, t(A), (z, O) => (j(), re(I(Ze), de({
|
|
2747
2747
|
ref_key: "inputRef",
|
|
2748
2748
|
ref: y,
|
|
2749
|
-
modelValue:
|
|
2750
|
-
"onUpdate:modelValue": O[5] || (O[5] = (
|
|
2749
|
+
modelValue: n.value,
|
|
2750
|
+
"onUpdate:modelValue": O[5] || (O[5] = (H) => n.value = H),
|
|
2751
2751
|
modelModifiers: { trim: !0 }
|
|
2752
2752
|
}, z.$attrs, {
|
|
2753
2753
|
placeholder: "请输入内容",
|
|
@@ -2756,52 +2756,52 @@ const Ie = (e) => {
|
|
|
2756
2756
|
size: e.size
|
|
2757
2757
|
}), {
|
|
2758
2758
|
prepend: S(() => [
|
|
2759
|
-
|
|
2759
|
+
E(I(ft), {
|
|
2760
2760
|
ref: "selectRef",
|
|
2761
2761
|
modelValue: o.value,
|
|
2762
|
-
"onUpdate:modelValue": O[0] || (O[0] = (
|
|
2762
|
+
"onUpdate:modelValue": O[0] || (O[0] = (H) => o.value = H),
|
|
2763
2763
|
size: e.size,
|
|
2764
2764
|
class: "select-field",
|
|
2765
|
-
onChange:
|
|
2765
|
+
onChange: x
|
|
2766
2766
|
}, {
|
|
2767
2767
|
prefix: S(() => [
|
|
2768
|
-
|
|
2768
|
+
J(se((e.fieldList.find((H) => H.value === o.value) || {}).label), 1)
|
|
2769
2769
|
]),
|
|
2770
2770
|
default: S(() => [
|
|
2771
|
-
(j(!0),
|
|
2772
|
-
key:
|
|
2773
|
-
label:
|
|
2774
|
-
value:
|
|
2771
|
+
(j(!0), G(xe, null, we(e.fieldList, (H) => (j(), re(I(ht), {
|
|
2772
|
+
key: H.value,
|
|
2773
|
+
label: H.label,
|
|
2774
|
+
value: H.value
|
|
2775
2775
|
}, null, 8, ["label", "value"]))), 128))
|
|
2776
2776
|
]),
|
|
2777
2777
|
_: 1
|
|
2778
2778
|
}, 8, ["modelValue", "size"])
|
|
2779
2779
|
]),
|
|
2780
2780
|
suffix: S(() => [
|
|
2781
|
-
|
|
2782
|
-
|
|
2781
|
+
F("div", ol, [
|
|
2782
|
+
Be(E(I(Ve), {
|
|
2783
2783
|
class: "el-input__icon",
|
|
2784
2784
|
onClick: m
|
|
2785
2785
|
}, {
|
|
2786
2786
|
default: S(() => [
|
|
2787
|
-
|
|
2787
|
+
E(I(Lt))
|
|
2788
2788
|
]),
|
|
2789
2789
|
_: 1
|
|
2790
2790
|
}, 512), [
|
|
2791
|
-
[
|
|
2791
|
+
[Ne, n.value]
|
|
2792
2792
|
]),
|
|
2793
|
-
|
|
2793
|
+
E(I(Ve), {
|
|
2794
2794
|
class: "el-input__icon",
|
|
2795
|
-
onClick:
|
|
2795
|
+
onClick: P
|
|
2796
2796
|
}, {
|
|
2797
2797
|
default: S(() => [
|
|
2798
|
-
|
|
2798
|
+
E(I(He))
|
|
2799
2799
|
]),
|
|
2800
2800
|
_: 1
|
|
2801
2801
|
}),
|
|
2802
|
-
|
|
2802
|
+
E(I(Tt), {
|
|
2803
2803
|
visible: c.value,
|
|
2804
|
-
"onUpdate:visible": O[4] || (O[4] = (
|
|
2804
|
+
"onUpdate:visible": O[4] || (O[4] = (H) => c.value = H),
|
|
2805
2805
|
placement: "bottom-end",
|
|
2806
2806
|
width: "240",
|
|
2807
2807
|
"show-arrow": !1,
|
|
@@ -2809,23 +2809,23 @@ const Ie = (e) => {
|
|
|
2809
2809
|
trigger: "click"
|
|
2810
2810
|
}, {
|
|
2811
2811
|
reference: S(() => [
|
|
2812
|
-
|
|
2812
|
+
E(I(Ve), {
|
|
2813
2813
|
class: "el-input__icon",
|
|
2814
2814
|
title: "多项搜索",
|
|
2815
2815
|
style: { "background-color": "#f0f2f5" },
|
|
2816
|
-
onClick:
|
|
2816
|
+
onClick: k
|
|
2817
2817
|
}, {
|
|
2818
2818
|
default: S(() => [
|
|
2819
|
-
|
|
2819
|
+
E(I(ps))
|
|
2820
2820
|
]),
|
|
2821
2821
|
_: 1
|
|
2822
2822
|
})
|
|
2823
2823
|
]),
|
|
2824
2824
|
default: S(() => [
|
|
2825
|
-
|
|
2826
|
-
|
|
2825
|
+
F("div", rl, [
|
|
2826
|
+
E(I(Ze), de({
|
|
2827
2827
|
modelValue: d.value,
|
|
2828
|
-
"onUpdate:modelValue": O[1] || (O[1] = (
|
|
2828
|
+
"onUpdate:modelValue": O[1] || (O[1] = (H) => d.value = H),
|
|
2829
2829
|
type: "textarea"
|
|
2830
2830
|
}, z.$attrs, {
|
|
2831
2831
|
size: e.size,
|
|
@@ -2833,38 +2833,38 @@ const Ie = (e) => {
|
|
|
2833
2833
|
class: "popover-textarea",
|
|
2834
2834
|
wrap: "off"
|
|
2835
2835
|
}), null, 16, ["modelValue", "size"]),
|
|
2836
|
-
|
|
2837
|
-
|
|
2836
|
+
F("div", al, [
|
|
2837
|
+
E(I(be), {
|
|
2838
2838
|
size: e.size,
|
|
2839
|
-
onClick: O[2] || (O[2] = (
|
|
2839
|
+
onClick: O[2] || (O[2] = (H) => d.value = ""),
|
|
2840
2840
|
plain: ""
|
|
2841
2841
|
}, {
|
|
2842
2842
|
default: S(() => O[6] || (O[6] = [
|
|
2843
|
-
|
|
2843
|
+
J("清空")
|
|
2844
2844
|
])),
|
|
2845
2845
|
_: 1,
|
|
2846
2846
|
__: [6]
|
|
2847
2847
|
}, 8, ["size"]),
|
|
2848
|
-
|
|
2849
|
-
|
|
2848
|
+
F("div", ul, [
|
|
2849
|
+
E(I(be), {
|
|
2850
2850
|
size: e.size,
|
|
2851
2851
|
plain: "",
|
|
2852
|
-
onClick:
|
|
2852
|
+
onClick: N
|
|
2853
2853
|
}, {
|
|
2854
2854
|
default: S(() => O[7] || (O[7] = [
|
|
2855
|
-
|
|
2855
|
+
J("关闭")
|
|
2856
2856
|
])),
|
|
2857
2857
|
_: 1,
|
|
2858
2858
|
__: [7]
|
|
2859
2859
|
}, 8, ["size"]),
|
|
2860
|
-
|
|
2860
|
+
E(I(be), {
|
|
2861
2861
|
type: "primary",
|
|
2862
2862
|
plain: "",
|
|
2863
2863
|
size: e.size,
|
|
2864
|
-
onClick: O[3] || (O[3] = (
|
|
2864
|
+
onClick: O[3] || (O[3] = (H) => $())
|
|
2865
2865
|
}, {
|
|
2866
2866
|
default: S(() => O[8] || (O[8] = [
|
|
2867
|
-
|
|
2867
|
+
J("搜索")
|
|
2868
2868
|
])),
|
|
2869
2869
|
_: 1,
|
|
2870
2870
|
__: [8]
|
|
@@ -2880,7 +2880,7 @@ const Ie = (e) => {
|
|
|
2880
2880
|
_: 1
|
|
2881
2881
|
}, 16, ["modelValue", "style", "size"]));
|
|
2882
2882
|
}
|
|
2883
|
-
}),
|
|
2883
|
+
}), dl = pe(cl), fl = { style: { display: "flex", "flex-wrap": "wrap", flex: "1", "flex-basis": "calc(100% - 50px)", "font-size": "12px", "margin-top": "4px" } }, hl = /* @__PURE__ */ he({
|
|
2884
2884
|
name: "JcTagQuery",
|
|
2885
2885
|
__name: "index",
|
|
2886
2886
|
props: {
|
|
@@ -2890,49 +2890,49 @@ const Ie = (e) => {
|
|
|
2890
2890
|
}
|
|
2891
2891
|
},
|
|
2892
2892
|
setup(e) {
|
|
2893
|
-
const t = e, { useQueryStore: s } =
|
|
2894
|
-
return (r, o) => (j(),
|
|
2895
|
-
(j(!0),
|
|
2896
|
-
key:
|
|
2893
|
+
const t = e, { useQueryStore: s } = Ee(t.injectionKey), { state: i, reduceTag: l, reduceAllTag: n } = s();
|
|
2894
|
+
return (r, o) => (j(), G("div", fl, [
|
|
2895
|
+
(j(!0), G(xe, null, we(I(i).tags, (u, c) => (j(), re(I(Cs), de({ ref_for: !0 }, r.$attrs, {
|
|
2896
|
+
key: u.label,
|
|
2897
2897
|
closable: "",
|
|
2898
2898
|
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" }],
|
|
2899
|
-
onClose: (
|
|
2899
|
+
onClose: (a) => I(l)(u, c)
|
|
2900
2900
|
}), {
|
|
2901
2901
|
default: S(() => [
|
|
2902
|
-
|
|
2903
|
-
content:
|
|
2902
|
+
E(I(_s), {
|
|
2903
|
+
content: u.value,
|
|
2904
2904
|
placement: "bottom",
|
|
2905
2905
|
effect: "light"
|
|
2906
2906
|
}, {
|
|
2907
2907
|
default: S(() => [
|
|
2908
|
-
|
|
2908
|
+
F("span", null, se(u.showStr), 1)
|
|
2909
2909
|
]),
|
|
2910
2910
|
_: 2
|
|
2911
2911
|
}, 1032, ["content"])
|
|
2912
2912
|
]),
|
|
2913
2913
|
_: 2
|
|
2914
2914
|
}, 1040, ["style", "onClose"]))), 128)),
|
|
2915
|
-
I(i).tags.length > 1 ? (j(),
|
|
2915
|
+
I(i).tags.length > 1 ? (j(), G("span", {
|
|
2916
2916
|
key: 0,
|
|
2917
2917
|
style: { "margin-left": "10px", "margin-top": "2px", display: "block" },
|
|
2918
2918
|
onClick: o[0] || (o[0] = //@ts-ignore
|
|
2919
|
-
(...
|
|
2919
|
+
(...u) => I(n) && I(n)(...u))
|
|
2920
2920
|
}, [
|
|
2921
|
-
|
|
2921
|
+
E(I(Ve), null, {
|
|
2922
2922
|
default: S(() => [
|
|
2923
|
-
|
|
2923
|
+
E(I(vs))
|
|
2924
2924
|
]),
|
|
2925
2925
|
_: 1
|
|
2926
2926
|
})
|
|
2927
|
-
])) :
|
|
2927
|
+
])) : me("", !0)
|
|
2928
2928
|
]));
|
|
2929
2929
|
}
|
|
2930
|
-
}),
|
|
2930
|
+
}), mt = (e, t) => {
|
|
2931
2931
|
const s = e.__vccOpts || e;
|
|
2932
|
-
for (const [i,
|
|
2933
|
-
s[i] =
|
|
2932
|
+
for (const [i, l] of t)
|
|
2933
|
+
s[i] = l;
|
|
2934
2934
|
return s;
|
|
2935
|
-
},
|
|
2935
|
+
}, pl = /* @__PURE__ */ mt(hl, [["__scopeId", "data-v-fddb24ed"]]), vl = pe(pl), ml = { class: "popover-btn" }, gl = { class: "popover-btn-right" }, yl = /* @__PURE__ */ he({
|
|
2936
2936
|
name: "JcMoreQueryContain",
|
|
2937
2937
|
__name: "index",
|
|
2938
2938
|
props: {
|
|
@@ -2960,47 +2960,47 @@ const Ie = (e) => {
|
|
|
2960
2960
|
}
|
|
2961
2961
|
},
|
|
2962
2962
|
setup(e, { expose: t }) {
|
|
2963
|
-
const s = T(!1), i = T({}),
|
|
2964
|
-
s.value = !s.value, s.value &&
|
|
2963
|
+
const s = T(!1), i = T({}), l = e, { useQueryStore: n } = Ee(l.injectionKey), { state: r, setQuery: o, addTag: u, reduceTag: c } = n(), a = T(!1), v = () => {
|
|
2964
|
+
s.value = !s.value, s.value && l.fieldList.forEach((h) => {
|
|
2965
2965
|
i.value[h.value] = r.queryForm[h.value] || void 0;
|
|
2966
2966
|
});
|
|
2967
2967
|
}, d = () => {
|
|
2968
|
-
|
|
2968
|
+
a.value = !0, i.value = {}, l.fieldList.forEach((h) => {
|
|
2969
2969
|
o(h.value, void 0), c({ key: h.value });
|
|
2970
2970
|
}), s.value = !1, Z(() => {
|
|
2971
|
-
|
|
2971
|
+
a.value = !1;
|
|
2972
2972
|
});
|
|
2973
2973
|
}, g = (h, p) => {
|
|
2974
|
-
var
|
|
2975
|
-
typeof i.value[h] > "u" || (typeof i.value[h] == "string" || typeof i.value[h] == "number" ?
|
|
2974
|
+
var C;
|
|
2975
|
+
typeof i.value[h] > "u" || (typeof i.value[h] == "string" || typeof i.value[h] == "number" ? u({
|
|
2976
2976
|
key: h,
|
|
2977
2977
|
label: p,
|
|
2978
|
-
value: Y(
|
|
2979
|
-
}) :
|
|
2978
|
+
value: Y(l.customTagObj[h]) ? i.value[h] : l.customTagObj[h]
|
|
2979
|
+
}) : u({
|
|
2980
2980
|
key: h,
|
|
2981
2981
|
label: p,
|
|
2982
|
-
value: Y(
|
|
2982
|
+
value: Y(l.customTagObj[h]) ? (C = i.value[h]) == null ? void 0 : C.join(",") : l.customTagObj[h]
|
|
2983
2983
|
}));
|
|
2984
2984
|
}, M = () => {
|
|
2985
|
-
|
|
2985
|
+
a.value = !0;
|
|
2986
2986
|
for (const h in i.value) {
|
|
2987
2987
|
o(h, Y(i.value[h]) ? void 0 : i.value[h]);
|
|
2988
|
-
const p =
|
|
2989
|
-
p === void 0 &&
|
|
2988
|
+
const p = l.fieldList.find((C) => C.value === h);
|
|
2989
|
+
p === void 0 && ne.warning("传入的fieldList和表单绑定的字段不匹配"), g(h, p.label);
|
|
2990
2990
|
}
|
|
2991
2991
|
s.value = !1, Z(() => {
|
|
2992
|
-
|
|
2992
|
+
a.value = !1;
|
|
2993
2993
|
});
|
|
2994
2994
|
};
|
|
2995
|
-
|
|
2995
|
+
oe(
|
|
2996
2996
|
() => r.queryForm.resetCount,
|
|
2997
2997
|
() => {
|
|
2998
2998
|
d();
|
|
2999
2999
|
}
|
|
3000
|
-
),
|
|
3001
|
-
|
|
3000
|
+
), oe(
|
|
3001
|
+
l.fieldList.map((h) => () => r.queryForm[h.value]),
|
|
3002
3002
|
() => {
|
|
3003
|
-
|
|
3003
|
+
a.value || l.fieldList.forEach((h) => {
|
|
3004
3004
|
i.value[h.value] = r.queryForm[h.value], Y(r.queryForm[h.value]) ? c({ key: h.value }) : g(h.value, h.label);
|
|
3005
3005
|
});
|
|
3006
3006
|
},
|
|
@@ -3008,13 +3008,13 @@ const Ie = (e) => {
|
|
|
3008
3008
|
deep: !0
|
|
3009
3009
|
}
|
|
3010
3010
|
);
|
|
3011
|
-
const
|
|
3012
|
-
return
|
|
3011
|
+
const w = T(), b = Ae({});
|
|
3012
|
+
return ke(() => {
|
|
3013
3013
|
var h;
|
|
3014
|
-
|
|
3015
|
-
}), t(
|
|
3014
|
+
w.value && (b.hide = (h = w.value) == null ? void 0 : h.hide);
|
|
3015
|
+
}), t(b), (h, p) => (j(), re(I(Tt), de({
|
|
3016
3016
|
ref_key: "popoverRef",
|
|
3017
|
-
ref:
|
|
3017
|
+
ref: w
|
|
3018
3018
|
}, h.$attrs, {
|
|
3019
3019
|
visible: s.value,
|
|
3020
3020
|
placement: "bottom",
|
|
@@ -3024,46 +3024,46 @@ const Ie = (e) => {
|
|
|
3024
3024
|
trigger: "click"
|
|
3025
3025
|
}), {
|
|
3026
3026
|
reference: S(() => [
|
|
3027
|
-
|
|
3027
|
+
E(I(be), {
|
|
3028
3028
|
size: e.size,
|
|
3029
|
-
icon: I(
|
|
3030
|
-
onClick:
|
|
3029
|
+
icon: I(ms),
|
|
3030
|
+
onClick: v
|
|
3031
3031
|
}, null, 8, ["size", "icon"])
|
|
3032
3032
|
]),
|
|
3033
3033
|
default: S(() => [
|
|
3034
3034
|
ye(h.$slots, "default", { scopeForm: i.value }),
|
|
3035
|
-
|
|
3036
|
-
|
|
3035
|
+
F("div", ml, [
|
|
3036
|
+
E(I(be), {
|
|
3037
3037
|
size: e.size,
|
|
3038
3038
|
onClick: d,
|
|
3039
3039
|
plain: ""
|
|
3040
3040
|
}, {
|
|
3041
3041
|
default: S(() => p[1] || (p[1] = [
|
|
3042
|
-
|
|
3042
|
+
J("清空")
|
|
3043
3043
|
])),
|
|
3044
3044
|
_: 1,
|
|
3045
3045
|
__: [1]
|
|
3046
3046
|
}, 8, ["size"]),
|
|
3047
|
-
|
|
3048
|
-
|
|
3047
|
+
F("div", gl, [
|
|
3048
|
+
E(I(be), {
|
|
3049
3049
|
size: e.size,
|
|
3050
|
-
onClick: p[0] || (p[0] = (
|
|
3050
|
+
onClick: p[0] || (p[0] = (C) => s.value = !1),
|
|
3051
3051
|
plain: ""
|
|
3052
3052
|
}, {
|
|
3053
3053
|
default: S(() => p[2] || (p[2] = [
|
|
3054
|
-
|
|
3054
|
+
J("关闭")
|
|
3055
3055
|
])),
|
|
3056
3056
|
_: 1,
|
|
3057
3057
|
__: [2]
|
|
3058
3058
|
}, 8, ["size"]),
|
|
3059
|
-
|
|
3059
|
+
E(I(be), {
|
|
3060
3060
|
type: "primary",
|
|
3061
3061
|
plain: "",
|
|
3062
3062
|
size: e.size,
|
|
3063
3063
|
onClick: M
|
|
3064
3064
|
}, {
|
|
3065
3065
|
default: S(() => p[3] || (p[3] = [
|
|
3066
|
-
|
|
3066
|
+
J("搜索")
|
|
3067
3067
|
])),
|
|
3068
3068
|
_: 1,
|
|
3069
3069
|
__: [3]
|
|
@@ -3074,15 +3074,15 @@ const Ie = (e) => {
|
|
|
3074
3074
|
_: 3
|
|
3075
3075
|
}, 16, ["visible", "width"]));
|
|
3076
3076
|
}
|
|
3077
|
-
}),
|
|
3077
|
+
}), bl = pe(yl), Cl = { class: "jc-list-layout" }, _l = {
|
|
3078
3078
|
key: 1,
|
|
3079
3079
|
class: "bottom-header"
|
|
3080
|
-
},
|
|
3080
|
+
}, Sl = /* @__PURE__ */ he({
|
|
3081
3081
|
name: "JcListLayout",
|
|
3082
3082
|
__name: "index",
|
|
3083
3083
|
setup(e) {
|
|
3084
|
-
return (t, s) => (j(),
|
|
3085
|
-
t.$slots["top-body"] ? (j(),
|
|
3084
|
+
return (t, s) => (j(), G("div", Cl, [
|
|
3085
|
+
t.$slots["top-body"] ? (j(), re(I(St), {
|
|
3086
3086
|
key: 0,
|
|
3087
3087
|
class: "top-card",
|
|
3088
3088
|
shadow: "never"
|
|
@@ -3091,11 +3091,11 @@ const Ie = (e) => {
|
|
|
3091
3091
|
ye(t.$slots, "top-body")
|
|
3092
3092
|
]),
|
|
3093
3093
|
_: 3
|
|
3094
|
-
})) :
|
|
3095
|
-
t.$slots["bottom-header"] ? (j(),
|
|
3094
|
+
})) : me("", !0),
|
|
3095
|
+
t.$slots["bottom-header"] ? (j(), G("div", _l, [
|
|
3096
3096
|
ye(t.$slots, "bottom-header")
|
|
3097
|
-
])) :
|
|
3098
|
-
t.$slots["bottom-body"] ? (j(),
|
|
3097
|
+
])) : me("", !0),
|
|
3098
|
+
t.$slots["bottom-body"] ? (j(), re(I(St), {
|
|
3099
3099
|
key: 2,
|
|
3100
3100
|
class: "bottom-card",
|
|
3101
3101
|
shadow: "never"
|
|
@@ -3104,10 +3104,10 @@ const Ie = (e) => {
|
|
|
3104
3104
|
ye(t.$slots, "bottom-body")
|
|
3105
3105
|
]),
|
|
3106
3106
|
_: 3
|
|
3107
|
-
})) :
|
|
3107
|
+
})) : me("", !0)
|
|
3108
3108
|
]));
|
|
3109
3109
|
}
|
|
3110
|
-
}),
|
|
3110
|
+
}), xl = pe(Sl), wl = { class: "jc-import-dialog" }, kl = { id: "import-wrapper" }, Al = { class: "basic-btn" }, Fl = { class: "import-info" }, El = /* @__PURE__ */ he({
|
|
3111
3111
|
name: "JcImportDialog",
|
|
3112
3112
|
__name: "index",
|
|
3113
3113
|
props: {
|
|
@@ -3137,62 +3137,62 @@ const Ie = (e) => {
|
|
|
3137
3137
|
},
|
|
3138
3138
|
emits: ["onSuccess", "onError"],
|
|
3139
3139
|
setup(e, { emit: t }) {
|
|
3140
|
-
const s = e, i = t,
|
|
3141
|
-
|
|
3142
|
-
|
|
3140
|
+
const s = e, i = t, l = T(!1), n = T(), r = T(!1), o = () => {
|
|
3141
|
+
l.value = !0, Z(() => {
|
|
3142
|
+
n.value.clearFiles();
|
|
3143
3143
|
});
|
|
3144
|
-
},
|
|
3144
|
+
}, u = (a) => {
|
|
3145
3145
|
if (!s.uploadFileFn) {
|
|
3146
|
-
|
|
3146
|
+
ne.warning("导入函数未定义");
|
|
3147
3147
|
return;
|
|
3148
3148
|
}
|
|
3149
|
-
const
|
|
3149
|
+
const v = Bt.service({
|
|
3150
3150
|
lock: !0,
|
|
3151
3151
|
text: "导入中,请耐心等待ing.....",
|
|
3152
3152
|
spinner: "el-icon-loading",
|
|
3153
3153
|
background: "rgba(0, 0, 0, 0.7)"
|
|
3154
3154
|
});
|
|
3155
|
-
|
|
3155
|
+
n.value.clearFiles();
|
|
3156
3156
|
const d = new FormData();
|
|
3157
|
-
d.append("file",
|
|
3158
|
-
|
|
3157
|
+
d.append("file", a.file), s.uploadFileFn(d).then((g) => {
|
|
3158
|
+
v.close(), g.code === 200 ? (ne.success("导入成功"), l.value = !1, i("onSuccess")) : (ne.warning(g.message || "导入失败"), i("onError"));
|
|
3159
3159
|
});
|
|
3160
3160
|
}, c = () => {
|
|
3161
3161
|
if (!s.downloadFileFn) {
|
|
3162
|
-
|
|
3162
|
+
ne.warning("下载函数未定义");
|
|
3163
3163
|
return;
|
|
3164
3164
|
}
|
|
3165
|
-
r.value = !0, s.downloadFileFn().then((
|
|
3166
|
-
r.value = !1,
|
|
3165
|
+
r.value = !0, s.downloadFileFn().then((a) => {
|
|
3166
|
+
r.value = !1, a.code === 200 ? ne.success("下载导入模版成功") : ne.warning(a.message || "下载导入模版失败");
|
|
3167
3167
|
});
|
|
3168
3168
|
};
|
|
3169
|
-
return (
|
|
3170
|
-
const d =
|
|
3171
|
-
return j(),
|
|
3172
|
-
|
|
3169
|
+
return (a, v) => {
|
|
3170
|
+
const d = te("el-button"), g = te("el-upload"), M = te("el-icon"), w = te("el-dialog");
|
|
3171
|
+
return j(), G("div", wl, [
|
|
3172
|
+
E(d, de(a.$attrs, { onClick: o }), {
|
|
3173
3173
|
default: S(() => [
|
|
3174
|
-
|
|
3174
|
+
J(se(e.btnName), 1)
|
|
3175
3175
|
]),
|
|
3176
3176
|
_: 1
|
|
3177
3177
|
}, 16),
|
|
3178
|
-
|
|
3179
|
-
modelValue:
|
|
3180
|
-
"onUpdate:modelValue":
|
|
3178
|
+
E(w, de({
|
|
3179
|
+
modelValue: l.value,
|
|
3180
|
+
"onUpdate:modelValue": v[0] || (v[0] = (b) => l.value = b),
|
|
3181
3181
|
title: e.title,
|
|
3182
3182
|
class: "is-no-footer",
|
|
3183
3183
|
width: "800px"
|
|
3184
|
-
},
|
|
3184
|
+
}, a.$attrs, {
|
|
3185
3185
|
top: "10vh",
|
|
3186
3186
|
style: { height: "calc(100vh - 200px)" }
|
|
3187
3187
|
}), {
|
|
3188
3188
|
default: S(() => [
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3189
|
+
F("div", kl, [
|
|
3190
|
+
F("div", Al, [
|
|
3191
|
+
F("div", null, [
|
|
3192
|
+
E(g, {
|
|
3193
3193
|
ref_key: "importUploadRef",
|
|
3194
|
-
ref:
|
|
3195
|
-
"http-request":
|
|
3194
|
+
ref: n,
|
|
3195
|
+
"http-request": u,
|
|
3196
3196
|
action: "#",
|
|
3197
3197
|
"show-file-list": !1,
|
|
3198
3198
|
accept: ".xlsx,.xls,.txt",
|
|
@@ -3200,9 +3200,9 @@ const Ie = (e) => {
|
|
|
3200
3200
|
style: { margin: "0 10px 0px 0px" }
|
|
3201
3201
|
}, {
|
|
3202
3202
|
default: S(() => [
|
|
3203
|
-
|
|
3203
|
+
E(d, { type: "primary" }, {
|
|
3204
3204
|
default: S(() => [
|
|
3205
|
-
|
|
3205
|
+
J(se(e.title), 1)
|
|
3206
3206
|
]),
|
|
3207
3207
|
_: 1
|
|
3208
3208
|
})
|
|
@@ -3210,35 +3210,35 @@ const Ie = (e) => {
|
|
|
3210
3210
|
_: 1
|
|
3211
3211
|
}, 512)
|
|
3212
3212
|
]),
|
|
3213
|
-
|
|
3213
|
+
E(d, {
|
|
3214
3214
|
type: "primary",
|
|
3215
3215
|
text: "",
|
|
3216
3216
|
loading: r.value,
|
|
3217
3217
|
onClick: c
|
|
3218
3218
|
}, {
|
|
3219
|
-
default: S(() =>
|
|
3220
|
-
|
|
3219
|
+
default: S(() => v[1] || (v[1] = [
|
|
3220
|
+
J("下载导入模板")
|
|
3221
3221
|
])),
|
|
3222
3222
|
_: 1,
|
|
3223
3223
|
__: [1]
|
|
3224
3224
|
}, 8, ["loading"])
|
|
3225
3225
|
]),
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3226
|
+
F("div", Fl, [
|
|
3227
|
+
F("div", null, [
|
|
3228
|
+
E(M, {
|
|
3229
3229
|
color: "#005bf5",
|
|
3230
3230
|
size: 18,
|
|
3231
3231
|
class: "icon"
|
|
3232
3232
|
}, {
|
|
3233
3233
|
default: S(() => [
|
|
3234
|
-
|
|
3234
|
+
E(I(gs))
|
|
3235
3235
|
]),
|
|
3236
3236
|
_: 1
|
|
3237
3237
|
})
|
|
3238
3238
|
]),
|
|
3239
|
-
|
|
3240
|
-
(j(!0),
|
|
3241
|
-
|
|
3239
|
+
F("ol", null, [
|
|
3240
|
+
(j(!0), G(xe, null, we(e.importInfoArr, (b, h) => (j(), G("li", { key: h }, [
|
|
3241
|
+
F("span", null, se(b), 1)
|
|
3242
3242
|
]))), 128))
|
|
3243
3243
|
])
|
|
3244
3244
|
])
|
|
@@ -3249,7 +3249,7 @@ const Ie = (e) => {
|
|
|
3249
3249
|
]);
|
|
3250
3250
|
};
|
|
3251
3251
|
}
|
|
3252
|
-
}),
|
|
3252
|
+
}), Il = /* @__PURE__ */ mt(El, [["__scopeId", "data-v-2660dae9"]]), $l = pe(Il), zl = { class: "jc-import-button" }, Ml = /* @__PURE__ */ he({
|
|
3253
3253
|
name: "JcImportButton",
|
|
3254
3254
|
__name: "index",
|
|
3255
3255
|
props: {
|
|
@@ -3264,29 +3264,29 @@ const Ie = (e) => {
|
|
|
3264
3264
|
},
|
|
3265
3265
|
emits: ["onSuccess", "onError"],
|
|
3266
3266
|
setup(e, { emit: t }) {
|
|
3267
|
-
const s = e, i = t,
|
|
3267
|
+
const s = e, i = t, l = T(!1), n = T(), r = (o) => {
|
|
3268
3268
|
if (!s.uploadFileFn) {
|
|
3269
|
-
|
|
3269
|
+
ne.warning("导入函数未定义");
|
|
3270
3270
|
return;
|
|
3271
3271
|
}
|
|
3272
|
-
const
|
|
3272
|
+
const u = Bt.service({
|
|
3273
3273
|
lock: !0,
|
|
3274
3274
|
text: "导入中,请耐心等待ing.....",
|
|
3275
3275
|
spinner: "el-icon-loading",
|
|
3276
3276
|
background: "rgba(0, 0, 0, 0.7)"
|
|
3277
3277
|
});
|
|
3278
|
-
|
|
3278
|
+
n.value.clearFiles();
|
|
3279
3279
|
const c = new FormData();
|
|
3280
|
-
c.append("file", o.file), s.uploadFileFn(c).then((
|
|
3281
|
-
|
|
3280
|
+
c.append("file", o.file), s.uploadFileFn(c).then((a) => {
|
|
3281
|
+
u.close(), a.code === 200 ? (ne.success("导入成功"), l.value = !1, i("onSuccess")) : (ne.warning(a.message || "导入失败"), i("onError"));
|
|
3282
3282
|
});
|
|
3283
3283
|
};
|
|
3284
|
-
return (o,
|
|
3285
|
-
const c =
|
|
3286
|
-
return j(),
|
|
3287
|
-
|
|
3284
|
+
return (o, u) => {
|
|
3285
|
+
const c = te("el-button"), a = te("el-upload");
|
|
3286
|
+
return j(), G("div", zl, [
|
|
3287
|
+
E(a, de({
|
|
3288
3288
|
ref_key: "importUploadRef",
|
|
3289
|
-
ref:
|
|
3289
|
+
ref: n,
|
|
3290
3290
|
"http-request": r,
|
|
3291
3291
|
action: "#",
|
|
3292
3292
|
"show-file-list": !1,
|
|
@@ -3294,9 +3294,9 @@ const Ie = (e) => {
|
|
|
3294
3294
|
limit: 1
|
|
3295
3295
|
}, o.$attrs), {
|
|
3296
3296
|
default: S(() => [
|
|
3297
|
-
|
|
3297
|
+
E(c, os(rs(o.$attrs)), {
|
|
3298
3298
|
default: S(() => [
|
|
3299
|
-
|
|
3299
|
+
J(se(e.btnName), 1)
|
|
3300
3300
|
]),
|
|
3301
3301
|
_: 1
|
|
3302
3302
|
}, 16)
|
|
@@ -3306,265 +3306,294 @@ const Ie = (e) => {
|
|
|
3306
3306
|
]);
|
|
3307
3307
|
};
|
|
3308
3308
|
}
|
|
3309
|
-
}),
|
|
3309
|
+
}), Ll = pe(Ml), Tl = "VXE_TABLE_CUSTOM_COLUMN_", ct = 1, Bl = ["checkbox", "seq", "radio", "expand"], gt = (e, t) => `${t}${e}`, Ke = (e, t) => {
|
|
3310
3310
|
try {
|
|
3311
|
-
const s =
|
|
3311
|
+
const s = gt(e, t), i = localStorage.getItem(s);
|
|
3312
3312
|
if (!i) return null;
|
|
3313
|
-
const
|
|
3314
|
-
return
|
|
3315
|
-
`[ToolbarColumnConfigV2] 存储版本不匹配 (当前: ${
|
|
3316
|
-
), null) :
|
|
3313
|
+
const l = JSON.parse(i);
|
|
3314
|
+
return l.version !== ct ? (console.warn(
|
|
3315
|
+
`[ToolbarColumnConfigV2] 存储版本不匹配 (当前: ${l.version}, 期望: ${ct}),将使用默认配置`
|
|
3316
|
+
), null) : l;
|
|
3317
3317
|
} catch (s) {
|
|
3318
3318
|
return console.error("[ToolbarColumnConfigV2] 读取列配置存储失败:", s), null;
|
|
3319
3319
|
}
|
|
3320
|
-
},
|
|
3320
|
+
}, dt = (e, t, s) => {
|
|
3321
3321
|
try {
|
|
3322
|
-
const i =
|
|
3323
|
-
version:
|
|
3322
|
+
const i = gt(e, t), l = {
|
|
3323
|
+
version: ct,
|
|
3324
3324
|
timestamp: Date.now(),
|
|
3325
3325
|
columns: s
|
|
3326
3326
|
};
|
|
3327
|
-
localStorage.setItem(i, JSON.stringify(
|
|
3327
|
+
localStorage.setItem(i, JSON.stringify(l));
|
|
3328
3328
|
} catch (i) {
|
|
3329
3329
|
console.error("[ToolbarColumnConfigV2] 保存列配置存储失败:", i);
|
|
3330
3330
|
}
|
|
3331
|
-
},
|
|
3331
|
+
}, Vl = (e, t) => {
|
|
3332
3332
|
try {
|
|
3333
|
-
const s =
|
|
3333
|
+
const s = gt(e, t);
|
|
3334
3334
|
localStorage.removeItem(s);
|
|
3335
3335
|
} catch (s) {
|
|
3336
3336
|
console.error("[ToolbarColumnConfigV2] 删除列配置存储失败:", s);
|
|
3337
3337
|
}
|
|
3338
|
-
},
|
|
3339
|
-
const
|
|
3340
|
-
if (
|
|
3341
|
-
const r =
|
|
3342
|
-
r ? r.width = i :
|
|
3338
|
+
}, Dl = (e, t, s, i, l) => {
|
|
3339
|
+
const n = Ke(e, t);
|
|
3340
|
+
if (n) {
|
|
3341
|
+
const r = n.columns.find((o) => o.field === s);
|
|
3342
|
+
r ? r.width = i : n.columns.push({
|
|
3343
3343
|
field: s,
|
|
3344
3344
|
visible: !0,
|
|
3345
3345
|
width: i,
|
|
3346
|
-
sortNumber:
|
|
3347
|
-
}),
|
|
3348
|
-
} else if (
|
|
3349
|
-
const r =
|
|
3346
|
+
sortNumber: n.columns.length
|
|
3347
|
+
}), dt(e, t, n.columns);
|
|
3348
|
+
} else if (l) {
|
|
3349
|
+
const r = l.map(
|
|
3350
3350
|
(o) => o.field === s ? { ...o, width: i } : o
|
|
3351
3351
|
);
|
|
3352
|
-
|
|
3352
|
+
dt(e, t, r);
|
|
3353
3353
|
}
|
|
3354
|
-
},
|
|
3355
|
-
const s =
|
|
3354
|
+
}, Ol = (e, t) => {
|
|
3355
|
+
const s = Ke(e, t);
|
|
3356
3356
|
return s !== null && s.columns.length > 0;
|
|
3357
3357
|
};
|
|
3358
|
-
function
|
|
3358
|
+
function jl(e) {
|
|
3359
3359
|
const {
|
|
3360
3360
|
table: t,
|
|
3361
3361
|
lockFieldList: s,
|
|
3362
3362
|
maxFixedCount: i,
|
|
3363
|
-
storagePrefix:
|
|
3364
|
-
columnGroupsConfig:
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3363
|
+
storagePrefix: l,
|
|
3364
|
+
columnGroupsConfig: n,
|
|
3365
|
+
defaultVisibleFields: r
|
|
3366
|
+
} = e, o = T([]), u = T([]), c = T([]), a = T([]), v = ue(() => c.value.map((f) => o.value.find((L) => L.field === f)).filter((f) => f !== void 0)), d = ue(
|
|
3367
|
+
() => o.value.filter((f) => f.visible).sort((f, L) => f.sortNumber - L.sortNumber)
|
|
3368
|
+
), g = ue(() => d.value.length), M = ue(
|
|
3369
|
+
() => d.value.filter((f) => f.fixed === "left").length
|
|
3370
|
+
), w = ue(
|
|
3371
|
+
() => d.value.filter((f) => f.fixed === "right").length
|
|
3372
|
+
), b = ue(
|
|
3373
|
+
() => M.value + w.value
|
|
3374
|
+
), h = ue(() => o.value.length > 0 && o.value.every((f) => f.visible)), p = ue(() => {
|
|
3375
|
+
const f = o.value.filter((L) => L.visible).length;
|
|
3376
|
+
return f > 0 && f < o.value.length;
|
|
3377
|
+
}), C = (f) => f.fixed === "left" ? !0 : b.value < i.value, _ = (f) => f.fixed === "right" ? !0 : b.value < i.value, x = (f) => !!(f.type && Bl.includes(
|
|
3378
|
+
f.type
|
|
3379
|
+
)), k = () => {
|
|
3380
|
+
const f = n.value || [], L = o.value.map((X) => X.field), q = /* @__PURE__ */ new Set(), K = f.map((X, ge) => {
|
|
3381
|
+
const Me = X.fields.filter(
|
|
3382
|
+
(Ie) => L.includes(Ie)
|
|
3382
3383
|
);
|
|
3383
|
-
return
|
|
3384
|
-
id: `group_${
|
|
3384
|
+
return Me.forEach((Ie) => q.add(Ie)), {
|
|
3385
|
+
id: `group_${ge}`,
|
|
3385
3386
|
title: X.title,
|
|
3386
|
-
fields:
|
|
3387
|
+
fields: Me
|
|
3387
3388
|
};
|
|
3388
|
-
}).filter((X) => X.fields.length > 0),
|
|
3389
|
-
(X) => !
|
|
3389
|
+
}).filter((X) => X.fields.length > 0), U = L.filter(
|
|
3390
|
+
(X) => !q.has(X)
|
|
3390
3391
|
);
|
|
3391
|
-
if (
|
|
3392
|
+
if (U.length > 0 || K.length === 0) {
|
|
3392
3393
|
const X = {
|
|
3393
3394
|
id: "__default__",
|
|
3394
3395
|
title: "基础信息",
|
|
3395
|
-
fields:
|
|
3396
|
+
fields: U.length > 0 ? U : L,
|
|
3396
3397
|
isDefault: !0
|
|
3397
3398
|
};
|
|
3398
|
-
|
|
3399
|
+
K.push(X);
|
|
3399
3400
|
}
|
|
3400
|
-
|
|
3401
|
-
},
|
|
3402
|
-
const
|
|
3403
|
-
if (!
|
|
3404
|
-
const L =
|
|
3405
|
-
|
|
3406
|
-
const
|
|
3407
|
-
(
|
|
3401
|
+
u.value = K;
|
|
3402
|
+
}, m = () => {
|
|
3403
|
+
const f = t.value;
|
|
3404
|
+
if (!f || a.value.length > 0) return;
|
|
3405
|
+
const L = f.getTableColumn(), q = L.fullColumn || L.tableColumn || f.getColumns();
|
|
3406
|
+
a.value = Pe(q);
|
|
3407
|
+
const K = q.filter(
|
|
3408
|
+
(U) => !x(U) && U.field
|
|
3408
3409
|
);
|
|
3409
|
-
|
|
3410
|
-
(
|
|
3410
|
+
c.value = K.map(
|
|
3411
|
+
(U) => U.field
|
|
3411
3412
|
);
|
|
3412
|
-
},
|
|
3413
|
-
const
|
|
3414
|
-
if (!
|
|
3415
|
-
const L =
|
|
3416
|
-
(
|
|
3417
|
-
).map(
|
|
3418
|
-
(
|
|
3419
|
-
const
|
|
3413
|
+
}, V = () => {
|
|
3414
|
+
const f = t.value;
|
|
3415
|
+
if (!f || !f.id) return;
|
|
3416
|
+
const L = f.id, q = f.getTableColumn(), K = q.fullColumn || q.tableColumn || f.getColumns(), U = Ke(L, l.value), X = new Map((U == null ? void 0 : U.columns.map((Q) => [Q.field, Q])) || []), ge = K.filter(
|
|
3417
|
+
(Q) => !x(Q) && Q.field
|
|
3418
|
+
), Me = r.value.length > 0, Ie = ge.map(
|
|
3419
|
+
(Q, le) => {
|
|
3420
|
+
const $e = Q.field, fe = X.get($e), Jt = s.value.includes($e), Yt = fe ? fe.visible : Me ? r.value.includes($e) : Q.visible !== !1;
|
|
3420
3421
|
return {
|
|
3421
|
-
field:
|
|
3422
|
-
title:
|
|
3423
|
-
visible:
|
|
3424
|
-
fixed: (
|
|
3425
|
-
width: (
|
|
3426
|
-
sortNumber: (
|
|
3427
|
-
visibleLocked:
|
|
3428
|
-
originalIndex:
|
|
3422
|
+
field: $e,
|
|
3423
|
+
title: Q.title || $e || "未命名",
|
|
3424
|
+
visible: Yt,
|
|
3425
|
+
fixed: (fe == null ? void 0 : fe.fixed) || Q.fixed || void 0,
|
|
3426
|
+
width: (fe == null ? void 0 : fe.width) || Q.renderWidth || void 0,
|
|
3427
|
+
sortNumber: (fe == null ? void 0 : fe.sortNumber) ?? le,
|
|
3428
|
+
visibleLocked: Jt,
|
|
3429
|
+
originalIndex: le
|
|
3429
3430
|
};
|
|
3430
3431
|
}
|
|
3431
3432
|
);
|
|
3432
|
-
|
|
3433
|
-
const
|
|
3434
|
-
(
|
|
3433
|
+
o.value = Ie, k(), o.value.forEach((Q) => {
|
|
3434
|
+
const le = u.value.find(
|
|
3435
|
+
($e) => $e.fields.includes(Q.field)
|
|
3435
3436
|
);
|
|
3436
|
-
|
|
3437
|
+
Q.groupId = le == null ? void 0 : le.id;
|
|
3437
3438
|
});
|
|
3438
|
-
},
|
|
3439
|
-
field:
|
|
3440
|
-
visible:
|
|
3441
|
-
fixed:
|
|
3442
|
-
width:
|
|
3443
|
-
sortNumber:
|
|
3444
|
-
})),
|
|
3439
|
+
}, P = () => o.value.map((f) => ({
|
|
3440
|
+
field: f.field,
|
|
3441
|
+
visible: f.visible,
|
|
3442
|
+
fixed: f.fixed,
|
|
3443
|
+
width: f.width,
|
|
3444
|
+
sortNumber: f.sortNumber
|
|
3445
|
+
})), $ = () => {
|
|
3446
|
+
const f = a.value;
|
|
3447
|
+
return f.length ? f.filter(
|
|
3448
|
+
(q) => !x(q) && q.field
|
|
3449
|
+
).map((q, K) => {
|
|
3450
|
+
const U = q.field;
|
|
3451
|
+
return {
|
|
3452
|
+
field: U,
|
|
3453
|
+
visible: r.value.includes(U),
|
|
3454
|
+
// 使用原始的 fixed 配置
|
|
3455
|
+
fixed: q.fixed || void 0,
|
|
3456
|
+
// 使用原始的宽度配置
|
|
3457
|
+
width: q.width || void 0,
|
|
3458
|
+
// 使用原始索引作为排序序号
|
|
3459
|
+
sortNumber: K
|
|
3460
|
+
};
|
|
3461
|
+
}) : [];
|
|
3462
|
+
}, N = async (f) => {
|
|
3445
3463
|
const L = t.value;
|
|
3446
3464
|
if (!L) return;
|
|
3447
|
-
const
|
|
3448
|
-
(
|
|
3449
|
-
), X =
|
|
3450
|
-
(
|
|
3451
|
-
),
|
|
3452
|
-
const le =
|
|
3453
|
-
return le && (
|
|
3454
|
-
column:
|
|
3465
|
+
const q = L.getTableColumn(), K = q.fullColumn || q.tableColumn || L.getColumns(), U = K.filter(
|
|
3466
|
+
(Q) => x(Q)
|
|
3467
|
+
), X = K.filter(
|
|
3468
|
+
(Q) => !x(Q)
|
|
3469
|
+
), ge = new Map(f.map((Q) => [Q.field, Q])), Me = X.map((Q) => {
|
|
3470
|
+
const le = ge.get(Q.field);
|
|
3471
|
+
return le && (Q.visible = le.visible, Q.fixed = le.fixed || "", le.width && (Q.width = le.width)), {
|
|
3472
|
+
column: Q,
|
|
3455
3473
|
sortNumber: (le == null ? void 0 : le.sortNumber) ?? 9999
|
|
3456
3474
|
};
|
|
3457
|
-
}).sort((
|
|
3458
|
-
await L.loadColumn(
|
|
3475
|
+
}).sort((Q, le) => Q.sortNumber - le.sortNumber).map((Q) => Q.column), Ie = [...U, ...Me];
|
|
3476
|
+
await L.loadColumn(Ie);
|
|
3459
3477
|
};
|
|
3460
3478
|
return {
|
|
3461
3479
|
// 状态
|
|
3462
|
-
allColumns:
|
|
3463
|
-
columnGroups:
|
|
3464
|
-
originalOrder:
|
|
3465
|
-
filteredColumns:
|
|
3466
|
-
selectedColumns:
|
|
3467
|
-
selectedCount:
|
|
3468
|
-
leftFixedCount:
|
|
3469
|
-
rightFixedCount:
|
|
3470
|
-
totalFixedCount:
|
|
3471
|
-
selectAll:
|
|
3472
|
-
isIndeterminate:
|
|
3480
|
+
allColumns: o,
|
|
3481
|
+
columnGroups: u,
|
|
3482
|
+
originalOrder: c,
|
|
3483
|
+
filteredColumns: v,
|
|
3484
|
+
selectedColumns: d,
|
|
3485
|
+
selectedCount: g,
|
|
3486
|
+
leftFixedCount: M,
|
|
3487
|
+
rightFixedCount: w,
|
|
3488
|
+
totalFixedCount: b,
|
|
3489
|
+
selectAll: h,
|
|
3490
|
+
isIndeterminate: p,
|
|
3473
3491
|
// 方法
|
|
3474
|
-
canFixLeft:
|
|
3475
|
-
canFixRight:
|
|
3476
|
-
initColumns:
|
|
3477
|
-
buildCurrentConfig:
|
|
3492
|
+
canFixLeft: C,
|
|
3493
|
+
canFixRight: _,
|
|
3494
|
+
initColumns: V,
|
|
3495
|
+
buildCurrentConfig: P,
|
|
3478
3496
|
applyConfigToTable: N,
|
|
3479
3497
|
loadStoredConfig: async () => {
|
|
3480
|
-
const
|
|
3481
|
-
if (!
|
|
3482
|
-
|
|
3483
|
-
const L =
|
|
3484
|
-
|
|
3498
|
+
const f = t.value;
|
|
3499
|
+
if (!f || !f.id) return;
|
|
3500
|
+
m();
|
|
3501
|
+
const L = Ke(f.id, l.value);
|
|
3502
|
+
if (L && L.columns.length)
|
|
3503
|
+
await N(L.columns);
|
|
3504
|
+
else if (r.value.length > 0) {
|
|
3505
|
+
const q = $();
|
|
3506
|
+
await N(q);
|
|
3507
|
+
}
|
|
3485
3508
|
},
|
|
3486
3509
|
saveAndApply: async () => {
|
|
3487
|
-
const
|
|
3488
|
-
if (!
|
|
3510
|
+
const f = t.value;
|
|
3511
|
+
if (!f || !f.id)
|
|
3489
3512
|
throw new Error("表格实例不存在或未设置 ID");
|
|
3490
|
-
const L =
|
|
3491
|
-
await N(L),
|
|
3513
|
+
const L = P();
|
|
3514
|
+
await N(L), dt(f.id, l.value, L);
|
|
3492
3515
|
},
|
|
3493
3516
|
resetToDefault: async () => {
|
|
3494
|
-
const
|
|
3495
|
-
!
|
|
3517
|
+
const f = t.value;
|
|
3518
|
+
if (!(!f || !f.id)) {
|
|
3519
|
+
if (Vl(f.id, l.value), a.value.length ? await f.reloadColumn(Pe(a.value)) : await f.refreshColumn(), r.value.length > 0) {
|
|
3520
|
+
const L = $();
|
|
3521
|
+
await N(L);
|
|
3522
|
+
}
|
|
3523
|
+
V();
|
|
3524
|
+
}
|
|
3496
3525
|
},
|
|
3497
|
-
onResizableChange: (
|
|
3526
|
+
onResizableChange: (f) => {
|
|
3498
3527
|
const L = t.value;
|
|
3499
3528
|
if (!L || !L.id) return;
|
|
3500
|
-
const { column:
|
|
3501
|
-
if (!
|
|
3502
|
-
const X =
|
|
3503
|
-
X && (X.width =
|
|
3529
|
+
const { column: q } = f, K = q.field, U = q.renderWidth;
|
|
3530
|
+
if (!K || !U) return;
|
|
3531
|
+
const X = o.value.find((ge) => ge.field === K);
|
|
3532
|
+
X && (X.width = U), Dl(
|
|
3504
3533
|
L.id,
|
|
3505
|
-
|
|
3534
|
+
l.value,
|
|
3535
|
+
K,
|
|
3506
3536
|
U,
|
|
3507
|
-
|
|
3508
|
-
B()
|
|
3537
|
+
P()
|
|
3509
3538
|
);
|
|
3510
3539
|
},
|
|
3511
3540
|
checkHasStoredConfig: () => {
|
|
3512
|
-
const
|
|
3513
|
-
return !
|
|
3541
|
+
const f = t.value;
|
|
3542
|
+
return !f || !f.id ? !1 : Ol(f.id, l.value);
|
|
3514
3543
|
},
|
|
3515
|
-
updateSelectedOrder: (
|
|
3516
|
-
|
|
3517
|
-
const
|
|
3518
|
-
|
|
3544
|
+
updateSelectedOrder: (f) => {
|
|
3545
|
+
f.forEach((L, q) => {
|
|
3546
|
+
const K = o.value.find((U) => U.field === L.field);
|
|
3547
|
+
K && (K.sortNumber = q);
|
|
3519
3548
|
});
|
|
3520
3549
|
},
|
|
3521
|
-
onSelectAllChange: (
|
|
3522
|
-
|
|
3523
|
-
L.visibleLocked || (L.visible =
|
|
3550
|
+
onSelectAllChange: (f) => {
|
|
3551
|
+
o.value.forEach((L) => {
|
|
3552
|
+
L.visibleLocked || (L.visible = f);
|
|
3524
3553
|
});
|
|
3525
3554
|
},
|
|
3526
|
-
onColumnVisibleChange: (
|
|
3527
|
-
!
|
|
3555
|
+
onColumnVisibleChange: (f) => {
|
|
3556
|
+
!f.visible && f.fixed && (f.fixed = void 0);
|
|
3528
3557
|
},
|
|
3529
3558
|
onDragEnd: () => {
|
|
3530
|
-
|
|
3531
|
-
|
|
3559
|
+
d.value.forEach((f, L) => {
|
|
3560
|
+
f.sortNumber = L;
|
|
3532
3561
|
});
|
|
3533
3562
|
},
|
|
3534
|
-
moveToTop: (
|
|
3535
|
-
var
|
|
3563
|
+
moveToTop: (f, L) => {
|
|
3564
|
+
var U;
|
|
3536
3565
|
if (L === 0) return;
|
|
3537
|
-
const
|
|
3538
|
-
|
|
3539
|
-
},
|
|
3540
|
-
removeFromSelected: (
|
|
3541
|
-
toggleFixed: (
|
|
3542
|
-
onGroupSelectChange: (
|
|
3543
|
-
const
|
|
3544
|
-
|
|
3545
|
-
|
|
3566
|
+
const K = ((U = o.value.filter((X) => X.visible).sort((X, ge) => X.sortNumber - ge.sortNumber)[0]) == null ? void 0 : U.sortNumber) ?? 0;
|
|
3567
|
+
f.sortNumber = K - 1;
|
|
3568
|
+
},
|
|
3569
|
+
removeFromSelected: (f) => f.visibleLocked ? !1 : (f.visible = !1, f.fixed && (f.fixed = void 0), !0),
|
|
3570
|
+
toggleFixed: (f, L) => f.fixed === L ? (f.fixed = void 0, !0) : L === "left" && !C(f) || L === "right" && !_(f) ? !1 : (f.fixed = L, !0),
|
|
3571
|
+
onGroupSelectChange: (f, L) => {
|
|
3572
|
+
const q = u.value.find((K) => K.id === f);
|
|
3573
|
+
q && o.value.forEach((K) => {
|
|
3574
|
+
q.fields.includes(K.field) && !K.visibleLocked && (K.visible = L);
|
|
3546
3575
|
});
|
|
3547
3576
|
},
|
|
3548
|
-
getGroupCheckState: (
|
|
3549
|
-
const L =
|
|
3577
|
+
getGroupCheckState: (f) => {
|
|
3578
|
+
const L = u.value.find((U) => U.id === f);
|
|
3550
3579
|
if (!L) return { checked: !1, indeterminate: !1 };
|
|
3551
|
-
const
|
|
3552
|
-
(
|
|
3580
|
+
const q = o.value.filter(
|
|
3581
|
+
(U) => L.fields.includes(U.field) && !U.visibleLocked
|
|
3553
3582
|
);
|
|
3554
|
-
if (
|
|
3583
|
+
if (q.length === 0)
|
|
3555
3584
|
return { checked: !0, indeterminate: !1 };
|
|
3556
|
-
const
|
|
3585
|
+
const K = q.filter((U) => U.visible).length;
|
|
3557
3586
|
return {
|
|
3558
|
-
checked:
|
|
3559
|
-
indeterminate:
|
|
3587
|
+
checked: K === q.length,
|
|
3588
|
+
indeterminate: K > 0 && K < q.length
|
|
3560
3589
|
};
|
|
3561
3590
|
}
|
|
3562
3591
|
};
|
|
3563
3592
|
}
|
|
3564
|
-
const
|
|
3593
|
+
const Rl = { class: "toolbar-column-config" }, Nl = { class: "column-config-body" }, Pl = { class: "column-list-left" }, ql = { class: "left-header" }, Ul = { class: "column-grid-wrapper" }, Kl = { class: "group-header" }, Ql = { class: "group-title" }, Hl = { class: "group-count" }, Wl = { class: "column-grid" }, Gl = ["title"], Jl = {
|
|
3565
3594
|
key: 0,
|
|
3566
3595
|
class: "vxe-icon-lock lock-icon"
|
|
3567
|
-
},
|
|
3596
|
+
}, Yl = { class: "column-list-right" }, Xl = { class: "right-header" }, Zl = { class: "selected-list-wrapper" }, en = { class: "selected-item" }, tn = { class: "index" }, sn = ["title"], ln = { class: "item-actions" }, nn = ["onClick"], on = ["onClick"], rn = ["onClick"], an = ["onClick"], un = { class: "drawer-footer" }, cn = { class: "footer-right" }, dn = /* @__PURE__ */ he({
|
|
3568
3597
|
name: "JcColumnConfig",
|
|
3569
3598
|
__name: "index",
|
|
3570
3599
|
props: {
|
|
@@ -3595,66 +3624,72 @@ const Vn = { class: "toolbar-column-config" }, On = { class: "column-config-body
|
|
|
3595
3624
|
// 存储键前缀
|
|
3596
3625
|
storagePrefix: {
|
|
3597
3626
|
type: String,
|
|
3598
|
-
default:
|
|
3627
|
+
default: Tl
|
|
3599
3628
|
},
|
|
3600
3629
|
// 列分组配置
|
|
3601
3630
|
columnGroups: {
|
|
3602
3631
|
type: Array,
|
|
3603
3632
|
default: () => []
|
|
3633
|
+
},
|
|
3634
|
+
// 默认可见的字段列表(仅这些字段可见,其他隐藏)
|
|
3635
|
+
defaultVisibleFields: {
|
|
3636
|
+
type: Array,
|
|
3637
|
+
default: () => []
|
|
3604
3638
|
}
|
|
3605
3639
|
},
|
|
3606
3640
|
emits: ["change", "saved", "reset", "width-change"],
|
|
3607
3641
|
setup(e, { expose: t, emit: s }) {
|
|
3608
|
-
const i = e,
|
|
3609
|
-
table:
|
|
3610
|
-
lockFieldList:
|
|
3611
|
-
maxFixedCount:
|
|
3612
|
-
storagePrefix:
|
|
3613
|
-
columnGroupsConfig:
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3642
|
+
const i = e, l = s, n = jl({
|
|
3643
|
+
table: Le(i, "table"),
|
|
3644
|
+
lockFieldList: Le(i, "lockFieldList"),
|
|
3645
|
+
maxFixedCount: Le(i, "maxFixedCount"),
|
|
3646
|
+
storagePrefix: Le(i, "storagePrefix"),
|
|
3647
|
+
columnGroupsConfig: Le(i, "columnGroups"),
|
|
3648
|
+
defaultVisibleFields: Le(i, "defaultVisibleFields")
|
|
3649
|
+
}), r = T(!1), o = T(""), u = ue(() => {
|
|
3650
|
+
const k = n.filteredColumns.value;
|
|
3651
|
+
if (!o.value) return k;
|
|
3617
3652
|
const m = o.value.toLowerCase();
|
|
3618
|
-
return
|
|
3619
|
-
}), c =
|
|
3620
|
-
...
|
|
3621
|
-
columns:
|
|
3622
|
-
checkState:
|
|
3623
|
-
})).filter((
|
|
3624
|
-
|
|
3653
|
+
return k.filter((V) => (V.title || V.field || "").toLowerCase().includes(m));
|
|
3654
|
+
}), c = ue(() => n.columnGroups.value.map((k) => ({
|
|
3655
|
+
...k,
|
|
3656
|
+
columns: u.value.filter((m) => m.groupId === k.id),
|
|
3657
|
+
checkState: n.getGroupCheckState(k.id)
|
|
3658
|
+
})).filter((k) => k.columns.length > 0)), a = (k, m) => {
|
|
3659
|
+
n.onGroupSelectChange(k, m);
|
|
3625
3660
|
};
|
|
3626
|
-
|
|
3661
|
+
oe(
|
|
3627
3662
|
() => i.table,
|
|
3628
|
-
async (
|
|
3629
|
-
|
|
3663
|
+
async (k) => {
|
|
3664
|
+
k && k.id && (await Z(), await C());
|
|
3630
3665
|
},
|
|
3631
3666
|
{ immediate: !0 }
|
|
3632
3667
|
);
|
|
3633
|
-
const
|
|
3668
|
+
const v = () => {
|
|
3634
3669
|
if (!i.table) {
|
|
3635
|
-
|
|
3670
|
+
ne.warning("表格实例未就绪");
|
|
3636
3671
|
return;
|
|
3637
3672
|
}
|
|
3638
|
-
|
|
3673
|
+
n.initColumns(), r.value = !0;
|
|
3639
3674
|
}, d = () => {
|
|
3640
3675
|
r.value = !1;
|
|
3641
3676
|
}, g = () => {
|
|
3642
3677
|
r.value = !1;
|
|
3643
|
-
}, M = (
|
|
3644
|
-
|
|
3645
|
-
},
|
|
3646
|
-
|
|
3647
|
-
},
|
|
3648
|
-
|
|
3678
|
+
}, M = (k) => {
|
|
3679
|
+
n.onSelectAllChange(k);
|
|
3680
|
+
}, w = (k, m) => {
|
|
3681
|
+
n.toggleFixed(k, m) || ne.warning(`最多只能固定 ${i.maxFixedCount} 列`);
|
|
3682
|
+
}, b = (k) => {
|
|
3683
|
+
n.removeFromSelected(k) || ne.warning("该列不能取消选中");
|
|
3649
3684
|
}, h = async () => {
|
|
3650
3685
|
try {
|
|
3651
|
-
await
|
|
3652
|
-
} catch (
|
|
3653
|
-
console.error("保存列配置失败:",
|
|
3686
|
+
await n.saveAndApply(), l("saved", n.allColumns.value), ne.success("列配置已保存并应用"), r.value = !1;
|
|
3687
|
+
} catch (k) {
|
|
3688
|
+
console.error("保存列配置失败:", k), ne.error("保存列配置失败");
|
|
3654
3689
|
}
|
|
3655
3690
|
}, p = async () => {
|
|
3656
3691
|
try {
|
|
3657
|
-
await
|
|
3692
|
+
await Ss.confirm(
|
|
3658
3693
|
"确定要恢复默认配置吗?(包括可见、固定、排序、列宽)。",
|
|
3659
3694
|
"提示",
|
|
3660
3695
|
{
|
|
@@ -3662,45 +3697,45 @@ const Vn = { class: "toolbar-column-config" }, On = { class: "column-config-body
|
|
|
3662
3697
|
cancelButtonText: "取消",
|
|
3663
3698
|
type: "warning"
|
|
3664
3699
|
}
|
|
3665
|
-
), await
|
|
3700
|
+
), await n.resetToDefault(), l("reset"), ne.success("已恢复默认配置");
|
|
3666
3701
|
} catch {
|
|
3667
3702
|
}
|
|
3668
|
-
},
|
|
3669
|
-
await
|
|
3703
|
+
}, C = async () => {
|
|
3704
|
+
await n.loadStoredConfig();
|
|
3670
3705
|
};
|
|
3671
3706
|
return t({
|
|
3672
|
-
openDrawer:
|
|
3707
|
+
openDrawer: v,
|
|
3673
3708
|
closeDrawer: d,
|
|
3674
|
-
loadStoredConfig:
|
|
3709
|
+
loadStoredConfig: C,
|
|
3675
3710
|
resetToDefault: p,
|
|
3676
3711
|
saveAndApply: h,
|
|
3677
|
-
onResizableChange: (
|
|
3678
|
-
|
|
3679
|
-
const m =
|
|
3680
|
-
m &&
|
|
3712
|
+
onResizableChange: (k) => {
|
|
3713
|
+
n.onResizableChange(k);
|
|
3714
|
+
const m = k.column.field, V = k.column.renderWidth;
|
|
3715
|
+
m && V && l("width-change", { field: m, width: V });
|
|
3681
3716
|
},
|
|
3682
|
-
hasStoredConfig: () =>
|
|
3683
|
-
}), (
|
|
3684
|
-
const
|
|
3685
|
-
return j(),
|
|
3686
|
-
|
|
3717
|
+
hasStoredConfig: () => n.checkHasStoredConfig()
|
|
3718
|
+
}), (k, m) => {
|
|
3719
|
+
const V = te("el-icon"), P = te("el-button"), $ = te("el-input"), N = te("el-checkbox"), R = te("el-tooltip"), W = te("el-drawer");
|
|
3720
|
+
return j(), G("div", Rl, [
|
|
3721
|
+
E(P, {
|
|
3687
3722
|
link: "",
|
|
3688
3723
|
class: "config-trigger-btn",
|
|
3689
|
-
onClick:
|
|
3724
|
+
onClick: v
|
|
3690
3725
|
}, {
|
|
3691
3726
|
default: S(() => [
|
|
3692
|
-
|
|
3727
|
+
E(V, { size: 16 }, {
|
|
3693
3728
|
default: S(() => [
|
|
3694
|
-
|
|
3729
|
+
E(I(ys))
|
|
3695
3730
|
]),
|
|
3696
3731
|
_: 1
|
|
3697
3732
|
})
|
|
3698
3733
|
]),
|
|
3699
3734
|
_: 1
|
|
3700
3735
|
}),
|
|
3701
|
-
|
|
3736
|
+
E(W, {
|
|
3702
3737
|
modelValue: r.value,
|
|
3703
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
3738
|
+
"onUpdate:modelValue": m[1] || (m[1] = (B) => r.value = B),
|
|
3704
3739
|
title: "列配置",
|
|
3705
3740
|
direction: "rtl",
|
|
3706
3741
|
size: e.drawerWidth,
|
|
@@ -3708,33 +3743,33 @@ const Vn = { class: "toolbar-column-config" }, On = { class: "column-config-body
|
|
|
3708
3743
|
class: "column-config-drawer"
|
|
3709
3744
|
}, {
|
|
3710
3745
|
header: S(() => m[2] || (m[2] = [
|
|
3711
|
-
|
|
3712
|
-
|
|
3746
|
+
F("div", { class: "drawer-header" }, [
|
|
3747
|
+
F("span", { class: "drawer-title" }, "列配置")
|
|
3713
3748
|
], -1)
|
|
3714
3749
|
])),
|
|
3715
3750
|
footer: S(() => [
|
|
3716
|
-
|
|
3717
|
-
|
|
3751
|
+
F("div", un, [
|
|
3752
|
+
E(P, { onClick: p }, {
|
|
3718
3753
|
default: S(() => m[9] || (m[9] = [
|
|
3719
|
-
|
|
3754
|
+
J("恢复默认")
|
|
3720
3755
|
])),
|
|
3721
3756
|
_: 1,
|
|
3722
3757
|
__: [9]
|
|
3723
3758
|
}),
|
|
3724
|
-
|
|
3725
|
-
|
|
3759
|
+
F("div", cn, [
|
|
3760
|
+
E(P, { onClick: g }, {
|
|
3726
3761
|
default: S(() => m[10] || (m[10] = [
|
|
3727
|
-
|
|
3762
|
+
J("取消")
|
|
3728
3763
|
])),
|
|
3729
3764
|
_: 1,
|
|
3730
3765
|
__: [10]
|
|
3731
3766
|
}),
|
|
3732
|
-
|
|
3767
|
+
E(P, {
|
|
3733
3768
|
type: "primary",
|
|
3734
3769
|
onClick: h
|
|
3735
3770
|
}, {
|
|
3736
3771
|
default: S(() => m[11] || (m[11] = [
|
|
3737
|
-
|
|
3772
|
+
J("保存并应用")
|
|
3738
3773
|
])),
|
|
3739
3774
|
_: 1,
|
|
3740
3775
|
__: [11]
|
|
@@ -3743,70 +3778,70 @@ const Vn = { class: "toolbar-column-config" }, On = { class: "column-config-body
|
|
|
3743
3778
|
])
|
|
3744
3779
|
]),
|
|
3745
3780
|
default: S(() => [
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3781
|
+
F("div", Nl, [
|
|
3782
|
+
F("div", Pl, [
|
|
3783
|
+
F("div", ql, [
|
|
3784
|
+
E($, {
|
|
3750
3785
|
modelValue: o.value,
|
|
3751
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
3786
|
+
"onUpdate:modelValue": m[0] || (m[0] = (B) => o.value = B),
|
|
3752
3787
|
placeholder: "搜索",
|
|
3753
3788
|
clearable: "",
|
|
3754
|
-
"prefix-icon": I(
|
|
3789
|
+
"prefix-icon": I(He),
|
|
3755
3790
|
size: "small"
|
|
3756
3791
|
}, null, 8, ["modelValue", "prefix-icon"]),
|
|
3757
|
-
|
|
3758
|
-
"model-value": I(
|
|
3759
|
-
indeterminate: I(
|
|
3792
|
+
E(N, {
|
|
3793
|
+
"model-value": I(n).selectAll.value,
|
|
3794
|
+
indeterminate: I(n).isIndeterminate.value,
|
|
3760
3795
|
class: "select-all-checkbox",
|
|
3761
3796
|
onChange: M
|
|
3762
3797
|
}, {
|
|
3763
3798
|
default: S(() => m[3] || (m[3] = [
|
|
3764
|
-
|
|
3799
|
+
J(" 全选 ")
|
|
3765
3800
|
])),
|
|
3766
3801
|
_: 1,
|
|
3767
3802
|
__: [3]
|
|
3768
3803
|
}, 8, ["model-value", "indeterminate"])
|
|
3769
3804
|
]),
|
|
3770
|
-
|
|
3771
|
-
(j(!0),
|
|
3772
|
-
key:
|
|
3805
|
+
F("div", Ul, [
|
|
3806
|
+
(j(!0), G(xe, null, we(c.value, (B) => (j(), G("div", {
|
|
3807
|
+
key: B.id,
|
|
3773
3808
|
class: "column-group"
|
|
3774
3809
|
}, [
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
"model-value":
|
|
3778
|
-
indeterminate:
|
|
3779
|
-
onChange: (y) =>
|
|
3810
|
+
F("div", Kl, [
|
|
3811
|
+
E(N, {
|
|
3812
|
+
"model-value": B.checkState.checked,
|
|
3813
|
+
indeterminate: B.checkState.indeterminate,
|
|
3814
|
+
onChange: (y) => a(B.id, y),
|
|
3780
3815
|
size: "small"
|
|
3781
3816
|
}, {
|
|
3782
3817
|
default: S(() => [
|
|
3783
|
-
|
|
3784
|
-
|
|
3818
|
+
F("span", Ql, se(B.title), 1),
|
|
3819
|
+
F("span", Hl, "(" + se(B.columns.length) + ")", 1)
|
|
3785
3820
|
]),
|
|
3786
3821
|
_: 2
|
|
3787
3822
|
}, 1032, ["model-value", "indeterminate", "onChange"])
|
|
3788
3823
|
]),
|
|
3789
|
-
|
|
3790
|
-
(j(!0),
|
|
3824
|
+
F("div", Wl, [
|
|
3825
|
+
(j(!0), G(xe, null, we(B.columns, (y) => (j(), G("div", {
|
|
3791
3826
|
key: y.field,
|
|
3792
3827
|
class: "column-checkbox-item",
|
|
3793
|
-
style:
|
|
3828
|
+
style: Qe({ width: e.itemWidth + "px" })
|
|
3794
3829
|
}, [
|
|
3795
|
-
|
|
3830
|
+
E(N, {
|
|
3796
3831
|
modelValue: y.visible,
|
|
3797
|
-
"onUpdate:modelValue": (
|
|
3832
|
+
"onUpdate:modelValue": (A) => y.visible = A,
|
|
3798
3833
|
disabled: y.visibleLocked,
|
|
3799
|
-
onChange: (
|
|
3834
|
+
onChange: (A) => I(n).onColumnVisibleChange(y),
|
|
3800
3835
|
size: "small"
|
|
3801
3836
|
}, {
|
|
3802
3837
|
default: S(() => [
|
|
3803
|
-
|
|
3838
|
+
F("span", {
|
|
3804
3839
|
class: "column-title",
|
|
3805
3840
|
title: y.title
|
|
3806
3841
|
}, [
|
|
3807
|
-
|
|
3808
|
-
y.visibleLocked ? (j(),
|
|
3809
|
-
], 8,
|
|
3842
|
+
J(se(y.title || y.field) + " ", 1),
|
|
3843
|
+
y.visibleLocked ? (j(), G("i", Jl)) : me("", !0)
|
|
3844
|
+
], 8, Gl)
|
|
3810
3845
|
]),
|
|
3811
3846
|
_: 2
|
|
3812
3847
|
}, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])
|
|
@@ -3815,93 +3850,93 @@ const Vn = { class: "toolbar-column-config" }, On = { class: "column-config-body
|
|
|
3815
3850
|
]))), 128))
|
|
3816
3851
|
])
|
|
3817
3852
|
]),
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
m[4] || (m[4] =
|
|
3853
|
+
F("div", Yl, [
|
|
3854
|
+
F("div", Xl, [
|
|
3855
|
+
F("span", null, "已选(" + se(I(n).selectedCount.value) + ")", 1),
|
|
3856
|
+
m[4] || (m[4] = F("span", { class: "drag-hint" }, "编号可拖拽排序", -1))
|
|
3822
3857
|
]),
|
|
3823
|
-
|
|
3824
|
-
|
|
3858
|
+
F("div", Zl, [
|
|
3859
|
+
E(I(xs), {
|
|
3825
3860
|
"item-key": "field",
|
|
3826
3861
|
animation: 200,
|
|
3827
3862
|
"ghost-class": "ghost-item",
|
|
3828
|
-
"model-value": I(
|
|
3829
|
-
"onUpdate:modelValue": I(
|
|
3830
|
-
onEnd: I(
|
|
3863
|
+
"model-value": I(n).selectedColumns.value,
|
|
3864
|
+
"onUpdate:modelValue": I(n).updateSelectedOrder,
|
|
3865
|
+
onEnd: I(n).onDragEnd
|
|
3831
3866
|
}, {
|
|
3832
|
-
item: S(({ element:
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3867
|
+
item: S(({ element: B, index: y }) => [
|
|
3868
|
+
F("div", en, [
|
|
3869
|
+
F("span", tn, se(y + 1), 1),
|
|
3870
|
+
F("span", {
|
|
3836
3871
|
class: "title",
|
|
3837
|
-
title:
|
|
3838
|
-
},
|
|
3839
|
-
|
|
3840
|
-
|
|
3872
|
+
title: B.title
|
|
3873
|
+
}, se(B.title || B.field), 9, sn),
|
|
3874
|
+
F("div", ln, [
|
|
3875
|
+
E(R, {
|
|
3841
3876
|
content: "取消选中",
|
|
3842
3877
|
placement: "top",
|
|
3843
3878
|
"show-after": 500,
|
|
3844
|
-
disabled:
|
|
3879
|
+
disabled: B.visibleLocked
|
|
3845
3880
|
}, {
|
|
3846
3881
|
default: S(() => [
|
|
3847
|
-
|
|
3848
|
-
class:
|
|
3849
|
-
onClick: (
|
|
3882
|
+
F("span", {
|
|
3883
|
+
class: Te(["action-btn remove-btn", { "is-hidden": B.visibleLocked }]),
|
|
3884
|
+
onClick: (A) => !B.visibleLocked && b(B)
|
|
3850
3885
|
}, m[5] || (m[5] = [
|
|
3851
|
-
|
|
3852
|
-
]), 10,
|
|
3886
|
+
F("i", { class: "vxe-icon-close" }, null, -1)
|
|
3887
|
+
]), 10, nn)
|
|
3853
3888
|
]),
|
|
3854
3889
|
_: 2
|
|
3855
3890
|
}, 1032, ["disabled"]),
|
|
3856
|
-
|
|
3891
|
+
E(R, {
|
|
3857
3892
|
content: "置顶",
|
|
3858
3893
|
placement: "top",
|
|
3859
3894
|
"show-after": 500,
|
|
3860
3895
|
disabled: y === 0
|
|
3861
3896
|
}, {
|
|
3862
3897
|
default: S(() => [
|
|
3863
|
-
|
|
3864
|
-
class:
|
|
3865
|
-
onClick: (
|
|
3898
|
+
F("span", {
|
|
3899
|
+
class: Te(["action-btn", { "is-hidden": y === 0 }]),
|
|
3900
|
+
onClick: (A) => y !== 0 && I(n).moveToTop(B, y)
|
|
3866
3901
|
}, m[6] || (m[6] = [
|
|
3867
|
-
|
|
3868
|
-
]), 10,
|
|
3902
|
+
F("i", { class: "vxe-icon-caret-up" }, null, -1)
|
|
3903
|
+
]), 10, on)
|
|
3869
3904
|
]),
|
|
3870
3905
|
_: 2
|
|
3871
3906
|
}, 1032, ["disabled"]),
|
|
3872
|
-
|
|
3907
|
+
E(R, {
|
|
3873
3908
|
content: "固定到左侧",
|
|
3874
3909
|
placement: "top",
|
|
3875
3910
|
"show-after": 500
|
|
3876
3911
|
}, {
|
|
3877
3912
|
default: S(() => [
|
|
3878
|
-
|
|
3879
|
-
class:
|
|
3880
|
-
"is-active":
|
|
3881
|
-
"is-disabled": !I(
|
|
3913
|
+
F("span", {
|
|
3914
|
+
class: Te(["fixed-btn", {
|
|
3915
|
+
"is-active": B.fixed === "left",
|
|
3916
|
+
"is-disabled": !I(n).canFixLeft(B)
|
|
3882
3917
|
}]),
|
|
3883
|
-
onClick: (
|
|
3918
|
+
onClick: (A) => w(B, "left")
|
|
3884
3919
|
}, m[7] || (m[7] = [
|
|
3885
|
-
|
|
3886
|
-
]), 10,
|
|
3920
|
+
F("i", { class: "vxe-icon-fixed-left" }, null, -1)
|
|
3921
|
+
]), 10, rn)
|
|
3887
3922
|
]),
|
|
3888
3923
|
_: 2
|
|
3889
3924
|
}, 1024),
|
|
3890
|
-
|
|
3925
|
+
E(R, {
|
|
3891
3926
|
content: "固定到右侧",
|
|
3892
3927
|
placement: "top",
|
|
3893
3928
|
"show-after": 500
|
|
3894
3929
|
}, {
|
|
3895
3930
|
default: S(() => [
|
|
3896
|
-
|
|
3897
|
-
class:
|
|
3898
|
-
"is-active":
|
|
3899
|
-
"is-disabled": !I(
|
|
3931
|
+
F("span", {
|
|
3932
|
+
class: Te(["fixed-btn", {
|
|
3933
|
+
"is-active": B.fixed === "right",
|
|
3934
|
+
"is-disabled": !I(n).canFixRight(B)
|
|
3900
3935
|
}]),
|
|
3901
|
-
onClick: (
|
|
3936
|
+
onClick: (A) => w(B, "right")
|
|
3902
3937
|
}, m[8] || (m[8] = [
|
|
3903
|
-
|
|
3904
|
-
]), 10,
|
|
3938
|
+
F("i", { class: "vxe-icon-fixed-right" }, null, -1)
|
|
3939
|
+
]), 10, an)
|
|
3905
3940
|
]),
|
|
3906
3941
|
_: 2
|
|
3907
3942
|
}, 1024)
|
|
@@ -3919,44 +3954,44 @@ const Vn = { class: "toolbar-column-config" }, On = { class: "column-config-body
|
|
|
3919
3954
|
]);
|
|
3920
3955
|
};
|
|
3921
3956
|
}
|
|
3922
|
-
}),
|
|
3957
|
+
}), fn = /* @__PURE__ */ mt(dn, [["__scopeId", "data-v-f5267788"]]), hn = pe(fn), pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, JcCascader: Zi, JcColumnConfig: hn, JcDatePicker: sl, JcImportButton: Ll, JcImportDialog: $l, JcInputComplex: dl, JcInputSwitch: nl, JcListLayout: xl, JcMoreQueryContain: bl, JcSelectQuery: Hi, JcTagQuery: vl }, Symbol.toStringTag, { value: "Module" })), Bn = (e = {}, t = "jc-query-injection-key") => {
|
|
3923
3958
|
e.resetCount = 0;
|
|
3924
|
-
const s =
|
|
3925
|
-
state:
|
|
3959
|
+
const s = Pe(e), i = Ae({ queryForm: s, tags: [] }), { useProvideQueryStore: l } = Ee(t), {
|
|
3960
|
+
state: n,
|
|
3926
3961
|
setQuery: r,
|
|
3927
3962
|
addTag: o,
|
|
3928
|
-
reduceTag:
|
|
3963
|
+
reduceTag: u,
|
|
3929
3964
|
reduceAllTag: c,
|
|
3930
|
-
clearQuery:
|
|
3931
|
-
} =
|
|
3932
|
-
|
|
3965
|
+
clearQuery: a
|
|
3966
|
+
} = l(i), v = () => {
|
|
3967
|
+
n.queryForm.resetCount++, a(e);
|
|
3933
3968
|
};
|
|
3934
3969
|
return {
|
|
3935
|
-
queryForm:
|
|
3970
|
+
queryForm: n.queryForm,
|
|
3936
3971
|
setQuery: r,
|
|
3937
3972
|
addTag: o,
|
|
3938
|
-
reduceTag:
|
|
3973
|
+
reduceTag: u,
|
|
3939
3974
|
reduceAllTag: c,
|
|
3940
|
-
clearQuery:
|
|
3975
|
+
clearQuery: v
|
|
3941
3976
|
};
|
|
3942
|
-
},
|
|
3977
|
+
}, Vn = {
|
|
3943
3978
|
install: (e) => {
|
|
3944
|
-
for (const t of Object.values(
|
|
3979
|
+
for (const t of Object.values(pn))
|
|
3945
3980
|
e.use(t);
|
|
3946
3981
|
}
|
|
3947
3982
|
};
|
|
3948
3983
|
export {
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3984
|
+
Zi as JcCascader,
|
|
3985
|
+
hn as JcColumnConfig,
|
|
3986
|
+
sl as JcDatePicker,
|
|
3987
|
+
Ll as JcImportButton,
|
|
3988
|
+
$l as JcImportDialog,
|
|
3989
|
+
dl as JcInputComplex,
|
|
3990
|
+
nl as JcInputSwitch,
|
|
3991
|
+
xl as JcListLayout,
|
|
3992
|
+
bl as JcMoreQueryContain,
|
|
3993
|
+
Hi as JcSelectQuery,
|
|
3994
|
+
vl as JcTagQuery,
|
|
3995
|
+
Vn as default,
|
|
3996
|
+
Bn as reactiveQuery
|
|
3962
3997
|
};
|