mvframe 1.0.10 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,30 +1,161 @@
1
- import { u as ke } from "./util.js";
2
- import { d as Te } from "./directive.js";
3
- import { s as Me, p as Ae, a as Ve } from "./store.js";
4
- import { createRouter as Oe, createWebHistory as je, useRoute as $e, useRouter as xe } from "vue-router";
5
- import { computed as V, openBlock as y, createElementBlock as T, normalizeClass as R, unref as a, Fragment as te, renderList as ne, toDisplayString as A, defineComponent as Ce, reactive as H, getCurrentInstance as re, watch as le, resolveComponent as K, createVNode as E, withCtx as I, renderSlot as q, inject as pe, onMounted as oe, onUnmounted as ce, createElementVNode as i, withModifiers as he, createCommentVNode as B, createTextVNode as Q, nextTick as me, normalizeProps as ue, guardReactiveProps as de, createSlots as fe, createBlock as D, ref as J, mergeProps as se, useAttrs as ge, isRef as Se, markRaw as ye, onBeforeMount as Ie, resolveDynamicComponent as Ne } from "vue";
1
+ import { u as Ne } from "./util.js";
2
+ import { d as Ke } from "./directive.js";
3
+ import { s as Te, p as Ae, a as Fe } from "./store.js";
4
+ import { createRouter as De, createWebHistory as Be, useRoute as Me, useRouter as Ve } from "vue-router";
5
+ import { computed as O, openBlock as b, createElementBlock as M, mergeProps as oe, unref as n, Fragment as Y, renderList as se, normalizeClass as F, createCommentVNode as K, createTextVNode as W, toDisplayString as L, reactive as H, onUnmounted as ce, watch as ne, markRaw as me, resolveComponent as E, createVNode as z, withCtx as V, createElementVNode as r, renderSlot as R, createBlock as B, resolveDynamicComponent as Oe, nextTick as ge, getCurrentInstance as ae, ref as G, onMounted as ee, normalizeStyle as Le, defineComponent as Ie, cloneVNode as _e, h as we, inject as he, withModifiers as $e, defineAsyncComponent as Pe, resolveDirective as Re, normalizeProps as de, guardReactiveProps as fe, createSlots as ie, withDirectives as He, useSlots as Ue, Transition as Ge, withKeys as Je, createStaticVNode as qe, useAttrs as ve, isRef as je, onBeforeMount as We } from "vue";
6
6
  /* empty css */
7
- import { deepEqual as be, isInView as ze, download as Ee, useRemoteSummary as Ke } from "./composition.js";
8
- import ve from "vuedraggable";
9
- const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
10
- h.beforeEach((o, r, d) => {
11
- b ? o.meta.admin && l() ? d() : e && e(d) : d();
12
- }), h.afterEach((o, r) => {
13
- const d = Me.tab(Ae);
14
- document.title = o.meta.title, d.saveTab(o);
7
+ import { deepEqual as xe, isInView as Ye, loadMvframeTheme as Ze, useOptions as ze, download as Qe, useRemoteSummary as Xe, useLang as et } from "./composition.js";
8
+ import Se from "vuedraggable";
9
+ const tt = {
10
+ "Theme color": "Theme color",
11
+ "Restore default": "Restore default",
12
+ Appearance: "Appearance",
13
+ "Light / dark mode": "Light / dark mode",
14
+ Dark: "Dark",
15
+ Light: "Light",
16
+ Language: "Language",
17
+ English: "English",
18
+ "Simplified Chinese": "Simplified Chinese",
19
+ "Traditional Chinese": "Traditional Chinese",
20
+ Japanese: "Japanese",
21
+ Korean: "Korean",
22
+ Vietnamese: "Vietnamese",
23
+ "Frame Config": "Frame Config",
24
+ Cancel: "Cancel",
25
+ Submit: "Submit"
26
+ }, ot = {
27
+ "Theme color": "主题色",
28
+ "Restore default": "恢复默认",
29
+ Appearance: "外观",
30
+ "Light / dark mode": "明暗模式",
31
+ Dark: "暗色",
32
+ Light: "浅色",
33
+ Language: "语言",
34
+ English: "English",
35
+ "Simplified Chinese": "中文-简体",
36
+ "Traditional Chinese": "中文-繁體",
37
+ Japanese: "日本語",
38
+ Korean: "한국어",
39
+ Vietnamese: "Tiếng Việt",
40
+ "Frame Config": "框架设置",
41
+ Cancel: "取消",
42
+ Submit: "确定"
43
+ }, nt = {
44
+ "Theme color": "主題色",
45
+ "Restore default": "還原預設",
46
+ Appearance: "外觀",
47
+ "Light / dark mode": "明暗模式",
48
+ Dark: "深色",
49
+ Light: "淺色",
50
+ Language: "語言",
51
+ English: "English",
52
+ "Simplified Chinese": "中文-简体",
53
+ "Traditional Chinese": "中文-繁體",
54
+ Japanese: "日本語",
55
+ Korean: "한국어",
56
+ Vietnamese: "Tiếng Việt",
57
+ "Frame Config": "框架設定",
58
+ Cancel: "取消",
59
+ Submit: "確定"
60
+ }, lt = {
61
+ "Theme color": "テーマカラー",
62
+ "Restore default": "既定に戻す",
63
+ Appearance: "外観",
64
+ "Light / dark mode": "ライト/ダーク",
65
+ Dark: "ダーク",
66
+ Light: "ライト",
67
+ Language: "言語",
68
+ English: "English",
69
+ "Simplified Chinese": "簡体字中国語",
70
+ "Traditional Chinese": "繁体字中国語",
71
+ Japanese: "日本語",
72
+ Korean: "韓国語",
73
+ Vietnamese: "ベトナム語",
74
+ "Frame Config": "フレーム設定",
75
+ Cancel: "キャンセル",
76
+ Submit: "確定"
77
+ }, st = {
78
+ "Theme color": "테마 색",
79
+ "Restore default": "기본값으로 복원",
80
+ Appearance: "모양",
81
+ "Light / dark mode": "라이트/다크 모드",
82
+ Dark: "다크",
83
+ Light: "라이트",
84
+ Language: "언어",
85
+ English: "English",
86
+ "Simplified Chinese": "중국어(간체)",
87
+ "Traditional Chinese": "중국어(번체)",
88
+ Japanese: "일본어",
89
+ Korean: "한국어",
90
+ Vietnamese: "베트남어",
91
+ "Frame Config": "프레임 설정",
92
+ Cancel: "취소",
93
+ Submit: "확인"
94
+ }, at = {
95
+ "Theme color": "Màu chủ đề",
96
+ "Restore default": "Khôi phục mặc định",
97
+ Appearance: "Giao diện",
98
+ "Light / dark mode": "Sáng / tối",
99
+ Dark: "Tối",
100
+ Light: "Sáng",
101
+ Language: "Ngôn ngữ",
102
+ English: "English",
103
+ "Simplified Chinese": "Tiếng Trung (Giản thể)",
104
+ "Traditional Chinese": "Tiếng Trung (Phồn thể)",
105
+ Japanese: "Tiếng Nhật",
106
+ Korean: "Tiếng Hàn",
107
+ Vietnamese: "Tiếng Việt",
108
+ "Frame Config": "Cấu hình khung",
109
+ Cancel: "Hủy",
110
+ Submit: "Gửi"
111
+ }, ye = {
112
+ en_us: tt,
113
+ zh_cn: ot,
114
+ zh_tw: nt,
115
+ ja_jp: lt,
116
+ ko_kr: st,
117
+ vi_vn: at
118
+ };
119
+ function rt(p) {
120
+ return String(p || "en_us").toLowerCase().replace(/-/g, "_");
121
+ }
122
+ const gl = ye;
123
+ function hl(p) {
124
+ const m = rt(p);
125
+ return { ...ye[m] || ye.en_us };
126
+ }
127
+ const pe = (p) => {
128
+ try {
129
+ Te.init(Ae).setPageLoading(p);
130
+ } catch {
131
+ }
132
+ }, it = ({ router: p, useAdmin: m, adminPermission: o, noaccess: e }) => {
133
+ p.beforeEach((t, s, u) => {
134
+ pe(!0), u();
135
+ }), p.beforeEach((t, s, u) => {
136
+ m ? t.meta.admin && o() ? u() : e && e(t, s, u) : u();
137
+ }), p.afterEach((t, s, u) => {
138
+ if (u) {
139
+ pe(!1);
140
+ return;
141
+ }
142
+ const C = Te.tab(Ae);
143
+ document.title = t.meta.title, C.saveTab(t), pe(!1);
144
+ }), p.onError(() => {
145
+ pe(!1);
15
146
  });
16
- }, Be = (h, { routes: b, guard: l, useAdmin: e = !1, adminPermission: o = () => !0, noaccess: r }) => {
17
- const d = Oe({
18
- history: je(),
19
- routes: b
147
+ }, ct = (p, { routes: m, guard: o, useAdmin: e = !1, adminPermission: t = () => !0, noaccess: s }) => {
148
+ const u = De({
149
+ history: Be(),
150
+ routes: m
20
151
  });
21
- l && l(d), Le({ router: d, useAdmin: e, adminPermission: o, noaccess: r }), h.use(d), globalThis.$router = d;
22
- }, X = (h, b) => {
23
- const l = h.__vccOpts || h;
24
- for (const [e, o] of b)
25
- l[e] = o;
26
- return l;
27
- }, Pe = ["disabled", "onClick"], Fe = /* @__PURE__ */ Object.assign({
152
+ o && o(u), it({ router: u, useAdmin: e, adminPermission: t, noaccess: s }), p.use(u), globalThis.$router = u;
153
+ }, J = (p, m) => {
154
+ const o = p.__vccOpts || p;
155
+ for (const [e, t] of m)
156
+ o[e] = t;
157
+ return o;
158
+ }, ut = ["disabled", "onClick"], dt = /* @__PURE__ */ Object.assign({
28
159
  name: "MvcBtnGroup",
29
160
  inheritAttrs: !1
30
161
  }, {
@@ -46,6 +177,14 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
46
177
  type: String,
47
178
  default: "label"
48
179
  },
180
+ iconKey: {
181
+ type: String,
182
+ default: "icon"
183
+ },
184
+ iconClass: {
185
+ type: String,
186
+ default: "imicon"
187
+ },
49
188
  disabled: {
50
189
  type: Boolean,
51
190
  default: !1
@@ -53,46 +192,377 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
53
192
  size: {
54
193
  type: String,
55
194
  default: "default",
56
- validator: (h) => ["default", "small", "large"].includes(h)
195
+ validator: (p) => ["default", "small", "large"].includes(p)
57
196
  }
58
197
  },
59
198
  emits: ["update:modelValue", "change"],
60
- setup(h, { emit: b }) {
61
- const l = h, e = b, o = (u) => u == null ? u : ["Object", "Array"].includes(globalThis.$getType(u)) ? u[l.valueKey] : u, r = (u) => u == null ? "" : ["Object", "Array"].includes(globalThis.$getType(u)) ? u[l.labelKey] : String(u), d = (u) => {
62
- const x = o(u);
63
- return x === l.modelValue && (x !== void 0 || l.modelValue !== void 0);
64
- }, w = (u) => {
65
- if (l.disabled) return;
66
- const x = o(u);
67
- e("update:modelValue", x), e("change", x);
68
- }, g = V(() => ({ small: "g4", default: "g6", large: "g8" })[l.size] ?? "g6"), k = V(() => l.size === "small" ? "sizeSmall" : l.size === "large" ? "sizeLarge" : "");
69
- return (u, x) => (y(), T("div", {
70
- class: R(["MvcBtnGroup flexMode", [a(g), a(k)]]),
71
- role: "group"
72
- }, [
73
- (y(!0), T(te, null, ne(l.options, (S) => (y(), T("button", {
74
- key: o(S),
199
+ setup(p, { emit: m }) {
200
+ const o = p, e = m, t = (y) => {
201
+ const g = y.value;
202
+ return g === o.modelValue && (g !== void 0 || o.modelValue !== void 0);
203
+ }, s = (y) => {
204
+ o.disabled || (e("update:modelValue", y.value), e("change", y.value));
205
+ }, u = O(() => {
206
+ const y = o.options, g = Array.isArray(y) ? y : [], w = o.valueKey, _ = o.labelKey, T = o.iconKey;
207
+ return g.filter((A) => A != null).map((A) => typeof A == "object" && !Array.isArray(A) ? {
208
+ value: A[w],
209
+ label: A[_] ?? "",
210
+ icon: A[T] || "",
211
+ raw: A
212
+ } : {
213
+ value: A,
214
+ label: String(A),
215
+ icon: "",
216
+ raw: A
217
+ });
218
+ }), C = O(() => ({ small: "g4", default: "g6", large: "g8" })[o.size] ?? "g6"), $ = O(() => o.size === "small" ? "sizeSmall" : o.size === "large" ? "sizeLarge" : "");
219
+ return (y, g) => (b(), M("div", oe({
220
+ class: ["MvcBtnGroup flexMode", [n(C), n($), y.$attrs.class]]
221
+ }, y.$attrs, { role: "group" }), [
222
+ (b(!0), M(Y, null, se(n(u), (w) => (b(), M("button", {
223
+ key: w.value,
75
224
  type: "button",
76
- class: R(["btnItem", { isActive: d(S) }]),
77
- disabled: l.disabled,
78
- onClick: ($) => w(S)
79
- }, A(r(S)), 11, Pe))), 128))
80
- ], 2));
225
+ class: F(["btnItem", { isActive: t(w) }]),
226
+ disabled: o.disabled || w.disabled,
227
+ onClick: (_) => s(w)
228
+ }, [
229
+ w.icon ? (b(), M("i", {
230
+ key: 0,
231
+ class: F([[w.icon, o.iconClass], "noShrink fs16"]),
232
+ "aria-hidden": "true"
233
+ }, null, 2)) : K("", !0),
234
+ W(" " + L(y.$l(w.label)), 1)
235
+ ], 10, ut))), 128))
236
+ ], 16));
81
237
  }
82
- }), De = /* @__PURE__ */ X(Fe, [["__scopeId", "data-v-19946018"]]), Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
238
+ }), pt = /* @__PURE__ */ J(dt, [["__scopeId", "data-v-61c1ddc0"]]), mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
83
239
  __proto__: null,
84
- default: De
85
- }, Symbol.toStringTag, { value: "Module" })), He = Ce({
240
+ default: pt
241
+ }, Symbol.toStringTag, { value: "Module" })), ft = { class: "MvcDrawer" }, gt = { class: "dragArea" }, ht = {
242
+ key: 0,
243
+ class: "flexMode vc hc h56 w64 abs r t z9"
244
+ }, bt = /* @__PURE__ */ Object.assign({
245
+ name: "MvcDrawer",
246
+ inheritAttrs: !1
247
+ }, {
248
+ __name: "index",
249
+ props: {
250
+ drawer: {
251
+ type: [Array, Object],
252
+ default: () => []
253
+ },
254
+ current: {
255
+ type: [Number, String],
256
+ default: ""
257
+ },
258
+ keepalive: {
259
+ type: Boolean,
260
+ default: !1
261
+ }
262
+ },
263
+ emits: ["update:current"],
264
+ setup(p, { emit: m }) {
265
+ const o = p, e = () => ({
266
+ visible: !1,
267
+ title: "",
268
+ cpt: "",
269
+ size: 640,
270
+ params: {},
271
+ direction: "rtl"
272
+ }), t = H({
273
+ drawerInfo: e(),
274
+ cpt: null,
275
+ mounted: !1,
276
+ dragMode: !1
277
+ }), s = m, u = () => {
278
+ t.mounted = !0;
279
+ }, C = () => {
280
+ s("update:current", ""), t.mounted = !1, k.value ? t.drawerInfo = e() : ge(() => {
281
+ delete t.drawerInfo.cpt;
282
+ });
283
+ }, $ = () => {
284
+ t.drawerInfo.visible && (s("update:current", ""), t.drawerInfo.visible = !1);
285
+ }, y = () => {
286
+ t.drawerInfo.cpt = t.cpt;
287
+ }, g = (d) => {
288
+ t.dragMode = !0, document.addEventListener("mousemove", w), document.addEventListener("mouseup", _);
289
+ }, w = (d) => {
290
+ var a, l;
291
+ if (d.x > 80) {
292
+ const h = (((l = (a = globalThis.$config) == null ? void 0 : a.options) == null ? void 0 : l.innerWidth) ?? window.innerWidth) - d.x;
293
+ h > 480 && (t.drawerInfo.size = h);
294
+ }
295
+ }, _ = () => {
296
+ t.dragMode = !1, T();
297
+ }, T = () => {
298
+ document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", _);
299
+ }, A = O(() => !!t.drawerInfo.title), k = O(() => !o.keepalive);
300
+ return ce(() => {
301
+ T();
302
+ }), ne(
303
+ () => o.current,
304
+ (d) => {
305
+ if (o.drawer.length)
306
+ if (window.$getType(d) === "Number") {
307
+ const a = o.drawer[d], l = {
308
+ ...a,
309
+ size: a.size || 640,
310
+ direction: a.direction || "rtl",
311
+ visible: !0
312
+ };
313
+ l.cpt ? (t.cpt = me(l.cpt), delete l.cpt) : (t.cpt = null, u()), t.drawerInfo = l;
314
+ } else
315
+ $();
316
+ }
317
+ ), (d, a) => {
318
+ const l = E("Loading"), c = E("el-drawer");
319
+ return b(), M("div", ft, [
320
+ z(c, {
321
+ modelValue: n(t).drawerInfo.visible,
322
+ "onUpdate:modelValue": a[0] || (a[0] = (h) => n(t).drawerInfo.visible = h),
323
+ title: d.$l(n(t).drawerInfo.title),
324
+ "with-header": n(A),
325
+ "append-to-body": "",
326
+ size: n(t).drawerInfo.size,
327
+ direction: n(t).drawerInfo.direction,
328
+ "destroy-on-close": n(k),
329
+ onClosed: C,
330
+ onOpened: y,
331
+ class: F(n(t).dragMode && "notransition noevent noselect")
332
+ }, {
333
+ default: V(() => [
334
+ r("div", gt, [
335
+ r("div", {
336
+ class: F(["dragHandle", n(t).dragMode && "active"]),
337
+ onMousedown: g
338
+ }, [...a[1] || (a[1] = [
339
+ r("i", { class: "imicon im-handle fs12" }, null, -1)
340
+ ])], 34)
341
+ ]),
342
+ n(A) ? K("", !0) : (b(), M("div", ht, [
343
+ r("i", {
344
+ class: "imicon im-close fs20 txt-dark7 hover-txt-primary",
345
+ onClick: $
346
+ })
347
+ ])),
348
+ z(l, {
349
+ loading: !n(t).mounted
350
+ }, null, 8, ["loading"]),
351
+ d.$slots.default ? R(d.$slots, "default", { key: 1 }, void 0, !0) : (b(), B(Oe(n(t).drawerInfo.cpt), oe({ key: 2 }, d.$attrs, {
352
+ params: n(t).drawerInfo.params,
353
+ onClose: $,
354
+ onMounted: u
355
+ }), null, 16, ["params"]))
356
+ ]),
357
+ _: 3
358
+ }, 8, ["modelValue", "title", "with-header", "size", "direction", "destroy-on-close", "class"])
359
+ ]);
360
+ };
361
+ }
362
+ }), yt = /* @__PURE__ */ J(bt, [["__scopeId", "data-v-665c2158"]]), vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
363
+ __proto__: null,
364
+ default: yt
365
+ }, Symbol.toStringTag, { value: "Module" })), _t = {
366
+ key: 1,
367
+ class: "flexMode vc"
368
+ }, wt = { class: "pl4" }, $t = { class: "pl4" }, xt = /* @__PURE__ */ Object.assign({
369
+ name: "MvcDrawerArea",
370
+ inheritAttrs: !1
371
+ }, {
372
+ __name: "index",
373
+ props: {
374
+ noscroll: {
375
+ type: Boolean,
376
+ default: !1
377
+ },
378
+ nofooter: {
379
+ type: Boolean,
380
+ default: !1
381
+ },
382
+ loading: {
383
+ type: Boolean,
384
+ default: !1
385
+ },
386
+ loadingTxt: {
387
+ type: String,
388
+ default: "... ... ..."
389
+ },
390
+ footerClass: {
391
+ type: String,
392
+ default: "hc"
393
+ },
394
+ showCancel: {
395
+ type: Boolean,
396
+ default: !0
397
+ },
398
+ cancelTxt: {
399
+ type: String,
400
+ default: "Cancel"
401
+ },
402
+ cancelIcon: {
403
+ type: String,
404
+ default: "im-left"
405
+ },
406
+ showConfirm: {
407
+ type: Boolean,
408
+ default: !0
409
+ },
410
+ confirmTxt: {
411
+ type: String,
412
+ default: "Submit"
413
+ },
414
+ confirmIcon: {
415
+ type: String,
416
+ default: "im-check"
417
+ },
418
+ minusHeight: {
419
+ type: [String, Number],
420
+ default: 0
421
+ }
422
+ },
423
+ emits: ["close", "submit", "cancel", "mounted"],
424
+ setup(p, { expose: m, emit: o }) {
425
+ const e = p, { proxy: t } = ae(), s = G(), u = o;
426
+ ee(() => {
427
+ u("mounted");
428
+ });
429
+ const C = () => {
430
+ u("close"), u("cancel");
431
+ }, $ = () => {
432
+ u("submit");
433
+ };
434
+ m({
435
+ toClose: C,
436
+ scrollTo: (_) => {
437
+ var T;
438
+ (T = s.value) == null || T.setScrollTop(_);
439
+ }
440
+ });
441
+ const g = O(() => [e.loading && "noevent", t.$attrs.class]), w = O(() => ({
442
+ height: `calc(100vh - 56px - ${e.nofooter ? 0 : 64}px - ${e.minusHeight}px)`
443
+ }));
444
+ return (_, T) => {
445
+ const A = E("Loading"), k = E("el-scrollbar"), d = E("el-button");
446
+ return b(), M(Y, null, [
447
+ r("div", {
448
+ class: F(["MvcDrawerBody VAfter", n(g)]),
449
+ style: Le(n(w))
450
+ }, [
451
+ z(A, {
452
+ loading: e.loading,
453
+ txt: e.loadingTxt
454
+ }, null, 8, ["loading", "txt"]),
455
+ e.noscroll ? R(_.$slots, "default", { key: 0 }, void 0, !0) : (b(), B(k, {
456
+ key: 1,
457
+ ref_key: "scrollbar",
458
+ ref: s,
459
+ class: "wp100"
460
+ }, {
461
+ default: V(() => [
462
+ R(_.$slots, "default", {}, void 0, !0)
463
+ ]),
464
+ _: 3
465
+ }, 512))
466
+ ], 6),
467
+ e.nofooter ? K("", !0) : (b(), M("div", {
468
+ key: 0,
469
+ class: F(["drawerFooter relative flexMode vc hb h64", e.footerClass])
470
+ }, [
471
+ _.$slots.footer ? R(_.$slots, "footer", { key: 0 }, void 0, !0) : (b(), M("div", _t, [
472
+ _.$slots.cancel ? R(_.$slots, "cancel", { key: 0 }, void 0, !0) : e.showCancel ? (b(), B(d, {
473
+ key: 1,
474
+ plain: "",
475
+ size: "large",
476
+ onClick: C
477
+ }, {
478
+ icon: V(() => [
479
+ r("i", {
480
+ class: F(["imicon", e.cancelIcon])
481
+ }, null, 2)
482
+ ]),
483
+ default: V(() => [
484
+ r("span", wt, L(_.$l(e.cancelTxt)), 1)
485
+ ]),
486
+ _: 1
487
+ })) : K("", !0),
488
+ _.$slots.submit ? R(_.$slots, "submit", { key: 2 }, void 0, !0) : e.showConfirm ? (b(), B(d, {
489
+ key: 3,
490
+ type: "primary",
491
+ size: "large",
492
+ loading: e.loading,
493
+ onClick: $
494
+ }, {
495
+ icon: V(() => [
496
+ r("i", {
497
+ class: F(["imicon", e.confirmIcon])
498
+ }, null, 2)
499
+ ]),
500
+ default: V(() => [
501
+ r("span", $t, L(_.$l(e.confirmTxt)), 1)
502
+ ]),
503
+ _: 1
504
+ }, 8, ["loading"])) : K("", !0),
505
+ _.$slots.footerright ? R(_.$slots, "footerright", { key: 4 }, void 0, !0) : K("", !0)
506
+ ]))
507
+ ], 2))
508
+ ], 64);
509
+ };
510
+ }
511
+ }), St = /* @__PURE__ */ J(xt, [["__scopeId", "data-v-f61caca0"]]), Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
512
+ __proto__: null,
513
+ default: St
514
+ }, Symbol.toStringTag, { value: "Module" }));
515
+ function kt(p) {
516
+ var o;
517
+ if (p == null) return [];
518
+ const m = Array.isArray(p) ? p : [p];
519
+ if (m.length === 1 && ((o = m[0]) == null ? void 0 : o.type) === Y) {
520
+ const e = m[0].children;
521
+ return e == null ? [] : Array.isArray(e) ? e : [e];
522
+ }
523
+ return m;
524
+ }
525
+ function Ce(p, m) {
526
+ if (p === m) return !0;
527
+ if (!Array.isArray(p) || !Array.isArray(m) || p.length !== m.length)
528
+ return !1;
529
+ for (let o = 0; o < p.length; o++)
530
+ if (p[o] !== m[o]) return !1;
531
+ return !0;
532
+ }
533
+ const Tt = Ie({
86
534
  name: "MvcFormItemFilter",
87
- setup: (h, b) => {
88
- var r, d;
89
- const l = (w) => Array.isArray(w) ? w.filter((g) => g.children !== "v-if").map((g) => {
90
- var u, x, S, $;
91
- return g && (window.$getType(g.children) === "Array" ? g.children = l(g.children) : ((u = g.type) == null ? void 0 : u.name) === "ElFormItem" && (x = g.props) != null && x.label && (g.props.label = (($ = (S = g.props.label).$l) == null ? void 0 : $.call(S)) || g.props.label), g);
92
- }) : [], e = (d = (r = b.slots).default) == null ? void 0 : d.call(r), o = e == null ? void 0 : e[0];
93
- return () => l((o == null ? void 0 : o.children) ?? []);
535
+ setup(p, m) {
536
+ function o(t) {
537
+ if (!Array.isArray(t)) return [];
538
+ const s = t.filter((y) => y && y.children !== "v-if"), u = s.length !== t.length, C = s.map((y) => e(y));
539
+ return u || C.some((y, g) => y !== s[g]) ? C : t;
540
+ }
541
+ function e(t) {
542
+ var C, $, y, g;
543
+ if (!t) return t;
544
+ const s = t.children, u = window.$getType(s);
545
+ if (((C = t.type) == null ? void 0 : C.name) === "ElFormItem" && (($ = t.props) == null ? void 0 : $.label) != null) {
546
+ const w = ((g = (y = t.props.label).$l) == null ? void 0 : g.call(y)) || t.props.label;
547
+ if (u === "Array") {
548
+ const _ = o(s);
549
+ return Ce(_, s) ? _e(t, { label: w }) : we(t.type, { ...t.props || {}, label: w }, _);
550
+ }
551
+ return _e(t, { label: w });
552
+ }
553
+ if (u === "Array") {
554
+ const w = o(s);
555
+ return Ce(w, s) ? t : we(t.type, t.props, w);
556
+ }
557
+ return t;
558
+ }
559
+ return () => {
560
+ var u, C;
561
+ const t = (C = (u = m.slots).default) == null ? void 0 : C.call(u), s = kt(t);
562
+ return o(s);
563
+ };
94
564
  }
95
- }), Ue = { class: "MvcForm" }, Je = /* @__PURE__ */ Object.assign({
565
+ }), At = { class: "MvcForm" }, Mt = /* @__PURE__ */ Object.assign({
96
566
  name: "MvcForm"
97
567
  }, {
98
568
  __name: "index",
@@ -110,59 +580,59 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
110
580
  default: "large"
111
581
  }
112
582
  },
113
- setup(h, { expose: b, emit: l }) {
114
- const e = h, o = H({
583
+ setup(p, { expose: m, emit: o }) {
584
+ const e = p, t = H({
115
585
  form: {}
116
- }), { proxy: r } = re(), d = l, w = async () => {
117
- var u;
586
+ }), { proxy: s } = ae(), u = o, C = async () => {
587
+ var g;
118
588
  try {
119
- return (u = r.$refs) != null && u.form ? (await r.$refs.form.validate(), g()) : !1;
589
+ return (g = s.$refs) != null && g.form ? (await s.$refs.form.validate(), $()) : !1;
120
590
  } catch {
121
591
  return !1;
122
592
  }
123
- }, g = () => o.form, k = V(() => {
124
- const u = {};
125
- for (let x in e.rules)
126
- u[x] = e.rules[x].map((S) => ({
127
- ...S,
128
- ...S.message && { message: window.$l(S.message) }
593
+ }, $ = () => t.form, y = O(() => {
594
+ const g = {};
595
+ for (let w in e.rules)
596
+ g[w] = e.rules[w].map((_) => ({
597
+ ..._,
598
+ ..._.message && { message: window.$l(_.message) }
129
599
  }));
130
- return u;
600
+ return g;
131
601
  });
132
- return le(
133
- () => o.form,
134
- (u) => {
135
- u && !be(u, e.modelValue) && d("update:modelValue", u);
602
+ return ne(
603
+ () => t.form,
604
+ (g) => {
605
+ g && !xe(g, e.modelValue) && u("update:modelValue", g);
136
606
  },
137
607
  {
138
608
  deep: !0
139
609
  }
140
- ), le(
610
+ ), ne(
141
611
  () => e.modelValue,
142
- (u) => {
143
- u && !be(u, o.form) && (o.form = u);
612
+ (g) => {
613
+ g && !xe(g, t.form) && (t.form = g);
144
614
  },
145
615
  {
146
616
  immediate: !0,
147
617
  deep: !0
148
618
  }
149
- ), b({
150
- validate: w
151
- }), (u, x) => {
152
- const S = K("el-form");
153
- return y(), T("div", Ue, [
154
- E(S, {
619
+ ), m({
620
+ validate: C
621
+ }), (g, w) => {
622
+ const _ = E("el-form");
623
+ return b(), M("div", At, [
624
+ z(_, {
155
625
  ref: "form",
156
- model: a(o).form,
157
- rules: a(k),
626
+ model: n(t).form,
627
+ rules: n(y),
158
628
  size: e.size,
159
629
  "validate-on-rule-change": !1,
160
630
  "label-position": "top"
161
631
  }, {
162
- default: I(() => [
163
- E(a(He), null, {
164
- default: I(() => [
165
- q(u.$slots, "default")
632
+ default: V(() => [
633
+ z(n(Tt), null, {
634
+ default: V(() => [
635
+ R(g.$slots, "default")
166
636
  ]),
167
637
  _: 3
168
638
  })
@@ -172,127 +642,127 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
172
642
  ]);
173
643
  };
174
644
  }
175
- }), qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
645
+ }), Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
176
646
  __proto__: null,
177
- default: Je
178
- }, Symbol.toStringTag, { value: "Module" })), Ge = { class: "FrameTab relative h36 pl16 pt4 xscroll nobar fadeout" }, We = { class: "relative flexMode vr g4 z2" }, Ye = ["id", "onContextmenu", "onClick", "onDblclick"], Ze = ["onClick"], Qe = /* @__PURE__ */ Object.assign({
647
+ default: Mt
648
+ }, Symbol.toStringTag, { value: "Module" })), Ot = { class: "FrameTab sticky h36 pl16 pt4 xscroll nobar fadeout flexGrow backdrop z9" }, Lt = { class: "relative flexMode vr g4 z2" }, It = ["id", "onContextmenu", "onClick", "onDblclick"], jt = ["onClick"], zt = /* @__PURE__ */ Object.assign({
179
649
  name: "FrameTab",
180
650
  inheritAttrs: !1
181
651
  }, {
182
652
  __name: "Tab",
183
- setup(h) {
653
+ setup(p) {
184
654
  H({
185
655
  active: 2
186
656
  });
187
- const b = pe("store"), l = b.tab(), e = b.rmenu(), o = $e(), r = xe(), { proxy: d } = re();
188
- oe(() => {
189
- w();
657
+ const m = he("store"), o = m.tab(), e = m.rmenu(), t = Me(), s = Ve(), { proxy: u } = ae();
658
+ ee(() => {
659
+ C();
190
660
  });
191
- const w = () => {
192
- d.$el.addEventListener("scroll", k);
193
- }, g = () => {
194
- const s = localStorage.getItem("tabsScroll");
195
- s && (d.$el.scrollLeft = Number(s));
196
- }, k = (s) => {
197
- let f = null;
198
- f !== null && clearTimeout(f), f = setTimeout(function() {
199
- const { scrollLeft: O } = s.target;
200
- localStorage.setItem("tabsScroll", O);
661
+ const C = () => {
662
+ u.$el.addEventListener("scroll", y);
663
+ }, $ = () => {
664
+ const l = localStorage.getItem("tabsScroll");
665
+ l && (u.$el.scrollLeft = Number(l));
666
+ }, y = (l) => {
667
+ let c = null;
668
+ c !== null && clearTimeout(c), c = setTimeout(function() {
669
+ const { scrollLeft: h } = l.target;
670
+ localStorage.setItem("tabsScroll", h);
201
671
  }, 100);
202
- }, u = () => {
203
- me(() => {
204
- const s = d.$el.querySelector(`#tab_${c.value}`);
205
- ze(d.$el, s) ? g() : d.$el.scrollLeft = (s == null ? void 0 : s.offsetLeft) - 16;
672
+ }, g = () => {
673
+ ge(() => {
674
+ const l = u.$el.querySelector(`#tab_${d.value}`);
675
+ Ye(u.$el, l) ? $() : u.$el.scrollLeft = (l == null ? void 0 : l.offsetLeft) - 16;
206
676
  });
207
- }, x = (s, f, O) => {
677
+ }, w = (l, c, h) => {
208
678
  e.saveData("type", "tabManager"), e.saveData("options", [
209
679
  {
210
680
  label: "Close",
211
681
  value: "close",
212
682
  icon: "im-close",
213
- disabled: m.value.length === 1,
683
+ disabled: k.value.length === 1,
214
684
  cb: () => {
215
- l.closeTab(f, O);
685
+ o.closeTab(c, h);
216
686
  }
217
687
  },
218
688
  {
219
689
  label: "Close Right",
220
690
  value: "closeRight",
221
691
  icon: "im-right",
222
- disabled: O === m.value.length - 1,
692
+ disabled: h === k.value.length - 1,
223
693
  cb: () => {
224
- l.closeRightTab(f, O);
694
+ o.closeRightTab(c, h);
225
695
  }
226
696
  },
227
697
  {
228
698
  label: "Close Left",
229
699
  value: "closeLeft",
230
700
  icon: "im-left",
231
- disabled: O === 0,
701
+ disabled: h === 0,
232
702
  cb: () => {
233
- l.closeLeftTab(f, O);
703
+ o.closeLeftTab(c, h);
234
704
  }
235
705
  },
236
706
  {
237
707
  label: "Close Other",
238
708
  value: "closeOther",
239
709
  icon: "im-left",
240
- disabled: m.value.length === 1,
710
+ disabled: k.value.length === 1,
241
711
  cb: () => {
242
- l.closeOtherTab(f, O);
712
+ o.closeOtherTab(c, h);
243
713
  }
244
714
  }
245
- ]), e.show({ el: s.target });
246
- }, S = (s) => {
247
- s.name !== c.value && r.push({ name: s.name });
248
- }, $ = (s) => {
249
- s.name === c.value ? r.replace({ name: s.name, query: { t: +/* @__PURE__ */ new Date() } }) : S(s);
250
- }, M = (s, f) => {
251
- l.closeTab(s, f);
252
- }, m = V(() => l.tabs), c = V(() => o.name), t = V(() => m.value.length);
253
- return le(
254
- () => t.value,
255
- (s) => {
256
- s && (localStorage.setItem("tabs", JSON.stringify(m.value)), u());
715
+ ]), e.show({ el: l.target });
716
+ }, _ = (l) => {
717
+ l.name !== d.value && s.push({ name: l.name });
718
+ }, T = (l) => {
719
+ l.name === d.value ? s.replace({ name: l.name, query: { t: +/* @__PURE__ */ new Date() } }) : _(l);
720
+ }, A = (l, c) => {
721
+ o.closeTab(l, c);
722
+ }, k = O(() => o.tabs), d = O(() => t.name), a = O(() => k.value.length);
723
+ return ne(
724
+ () => a.value,
725
+ (l) => {
726
+ l && (localStorage.setItem("tabs", JSON.stringify(k.value)), g());
257
727
  },
258
728
  {
259
729
  immediate: !0
260
730
  }
261
731
  ), ce(() => {
262
- d.$el.removeEventListener("scroll", k);
263
- }), (s, f) => (y(), T("div", Ge, [
264
- i("div", We, [
265
- (y(!0), T(te, null, ne(a(m), (O, C) => (y(), T("div", {
266
- key: O.name,
267
- id: `tab_${O.name}`,
268
- class: R(["relative flexMode vc g4 noShrink tabItem h32 p0-8 fs12 radius4 point noselect", [
269
- O.name === a(c) && "active",
270
- a(m).length > 1 && "hoverItem"
732
+ u.$el.removeEventListener("scroll", y);
733
+ }), (l, c) => (b(), M("div", Ot, [
734
+ r("div", Lt, [
735
+ (b(!0), M(Y, null, se(n(k), (h, x) => (b(), M("div", {
736
+ key: h.name,
737
+ id: `tab_${h.name}`,
738
+ class: F(["relative flexMode vc g4 noShrink tabItem h32 p0-8 fs12 radius4 point noselect", [
739
+ h.name === n(d) && "active",
740
+ n(k).length > 1 && "hoverItem"
271
741
  ]]),
272
- onContextmenu: he((n) => x(n, O, C), ["prevent", "stop"]),
273
- onClick: (n) => S(O),
274
- onDblclick: (n) => $(O)
742
+ onContextmenu: $e((i) => w(i, h, x), ["prevent", "stop"]),
743
+ onClick: (i) => _(h),
744
+ onDblclick: (i) => T(h)
275
745
  }, [
276
- O.icon ? (y(), T("i", {
746
+ h.icon ? (b(), M("i", {
277
747
  key: 0,
278
- class: R(["imicon", O.icon])
279
- }, null, 2)) : B("", !0),
280
- Q(" " + A(O.meta.title) + " ", 1),
281
- i("div", {
748
+ class: F(["imicon", h.icon])
749
+ }, null, 2)) : K("", !0),
750
+ W(" " + L(h.meta.title) + " ", 1),
751
+ r("div", {
282
752
  class: "abs r flexMode hc vc w20 h20",
283
- onClick: he((n) => M(O, C), ["stop"])
284
- }, [...f[0] || (f[0] = [
285
- i("span", null, "✕", -1)
286
- ])], 8, Ze)
287
- ], 42, Ye))), 128)),
288
- f[1] || (f[1] = i("div", { class: "w16 h16 noShrink" }, null, -1))
753
+ onClick: $e((i) => A(h, x), ["stop"])
754
+ }, [...c[0] || (c[0] = [
755
+ r("span", null, "✕", -1)
756
+ ])], 8, jt)
757
+ ], 42, It))), 128)),
758
+ c[1] || (c[1] = r("div", { class: "w16 h16 noShrink" }, null, -1))
289
759
  ])
290
760
  ]));
291
761
  }
292
- }), Xe = /* @__PURE__ */ X(Qe, [["__scopeId", "data-v-1a5bae58"]]), et = { class: "LogoArea flexMode vc h64 p0-16 relative" }, tt = { class: "logo" }, lt = { class: "logomini" }, ot = { class: "MenuArea p4 yscroll" }, nt = ["onClick"], st = { class: "itemIcon w24 txt-c txt-tip fs18" }, at = { key: 1 }, rt = {
762
+ }), Et = /* @__PURE__ */ J(zt, [["__scopeId", "data-v-bc298ab0"]]), Nt = { class: "LogoArea flexMode vc h64 p0-16 relative" }, Kt = { class: "logo" }, Ft = { class: "logomini" }, Dt = { class: "MenuArea p4 yscroll" }, Bt = ["onClick"], Pt = { class: "itemIcon w24 txt-c txt-tip fs18" }, Rt = { key: 1 }, Ht = {
293
763
  key: 0,
294
764
  class: "itemChildrenArea mt2 p4"
295
- }, it = ["onClick"], ct = { class: "itemIcon w24 txt-c txt-tip fs18" }, ut = /* @__PURE__ */ Object.assign({
765
+ }, Ut = ["onClick"], Gt = { class: "itemIcon w24 txt-c txt-tip fs18" }, Jt = { class: "h64 p8-4" }, qt = { class: "flexMode vc g8 p8-16 radius4 hover" }, Wt = /* @__PURE__ */ Object.assign({
296
766
  name: "FrameMenu",
297
767
  inheritAttrs: !1
298
768
  }, {
@@ -305,122 +775,188 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
305
775
  routes: {
306
776
  type: Array,
307
777
  default: () => []
778
+ },
779
+ usernameKey: {
780
+ type: String,
781
+ default: "username"
308
782
  }
309
783
  },
310
- setup(h, { emit: b }) {
311
- const l = h, e = H({
784
+ setup(p, { emit: m }) {
785
+ const o = p, e = H({
312
786
  collapse: !1
313
- }), o = $e(), r = xe();
314
- oe(() => {
315
- w();
787
+ }), t = Me(), s = Ve(), C = he("store").launch();
788
+ ee(() => {
789
+ y();
316
790
  });
317
- const d = b, w = () => {
318
- const m = localStorage.getItem("collapse");
319
- m && (e.collapse = JSON.parse(m)), document.addEventListener("keydown", k);
320
- }, g = (m) => {
321
- e.collapse === !0 ? e.collapse = !1 : e.collapse === !1 ? e.collapse = !0 : e.collapse = m, localStorage.setItem("collapse", e.collapse), d("on-collapse-change", e.collapse);
322
- }, k = (m) => {
323
- m.shiftKey && (m.metaKey || m.ctrlKey) && (m.keyCode === 37 ? g(!0) : m.keyCode === 39 && g(!1));
324
- }, u = (m) => {
791
+ const $ = m, y = () => {
792
+ const l = localStorage.getItem("collapse");
793
+ l && (e.collapse = JSON.parse(l)), document.addEventListener("keydown", w);
794
+ }, g = (l) => {
795
+ e.collapse === !0 ? e.collapse = !1 : e.collapse === !1 ? e.collapse = !0 : e.collapse = l, localStorage.setItem("collapse", e.collapse), $("on-collapse-change", e.collapse);
796
+ }, w = (l) => {
797
+ l.shiftKey && (l.metaKey || l.ctrlKey) && (l.keyCode === 37 ? g(!0) : l.keyCode === 39 && g(!1));
798
+ }, _ = (l) => {
325
799
  var c;
326
- return (c = m == null ? void 0 : m.children) != null && c.length ? u(m.children[0]) : m;
327
- }, x = (m) => {
800
+ return (c = l == null ? void 0 : l.children) != null && c.length ? _(l.children[0]) : l;
801
+ }, T = (l) => {
328
802
  var c;
329
- return ((c = m == null ? void 0 : m.children) == null ? void 0 : c.some((t) => t.name === o.name || x(t))) ?? !1;
330
- }, S = (m) => {
331
- const c = u(m);
332
- c != null && c.name && r.push({ name: c.name });
333
- }, $ = () => {
334
- const m = { ...o.query, _: Date.now() }, c = o.name ? { name: o.name, params: o.params, query: m } : { path: o.path, query: m };
335
- r.replace(c).catch(() => {
803
+ return ((c = l == null ? void 0 : l.children) == null ? void 0 : c.some((h) => h.name === t.name || T(h))) ?? !1;
804
+ }, A = (l) => {
805
+ const c = _(l);
806
+ c != null && c.name && s.push({ name: c.name });
807
+ }, k = () => {
808
+ const l = { ...t.query, _: Date.now() }, c = t.name ? { name: t.name, params: t.params, query: l } : { path: t.path, query: l };
809
+ s.replace(c).catch(() => {
336
810
  });
337
- }, M = V(() => e.collapse ? "im-verticalleft" : "im-verticalright");
811
+ }, d = () => {
812
+ window.$confirm("Log out?".$l(), "Tips", {
813
+ callback: (l) => {
814
+ l === "confirm" && s.replace({ path: "/" });
815
+ }
816
+ });
817
+ }, a = O(() => e.collapse ? "im-verticalleft" : "im-verticalright");
338
818
  return ce(() => {
339
- document.removeEventListener("keydown", k);
340
- }), (m, c) => (y(), T("div", {
341
- class: R(["FrameMenu sticky vh100 noselect noShrink", a(e).collapse && "collapse"])
342
- }, [
343
- i("div", et, [
344
- i("div", tt, [
345
- q(m.$slots, "logo", {}, void 0, !0)
346
- ]),
347
- i("div", lt, [
348
- q(m.$slots, "logomini", {}, void 0, !0)
349
- ]),
350
- i("div", {
351
- class: "collapseArea hover abs",
352
- onClick: c[0] || (c[0] = (t) => g(a(e).collapse))
353
- }, [
354
- i("i", {
355
- class: R(["imicon fs20", a(M)])
356
- }, null, 2)
357
- ])
358
- ]),
359
- i("div", ot, [
360
- (y(!0), T(te, null, ne(l.routes, (t, s) => {
361
- var f, O;
362
- return y(), T("div", {
363
- key: s,
364
- class: "menuItemWrap mb2"
819
+ document.removeEventListener("keydown", w);
820
+ }), (l, c) => {
821
+ const h = E("el-popconfirm");
822
+ return b(), M("div", {
823
+ class: F(["FrameMenu sticky vh100 noselect noShrink", n(e).collapse && "collapse"])
824
+ }, [
825
+ r("div", Nt, [
826
+ r("div", Kt, [
827
+ R(l.$slots, "logo", {}, void 0, !0)
828
+ ]),
829
+ r("div", Ft, [
830
+ R(l.$slots, "logomini", {}, void 0, !0)
831
+ ]),
832
+ r("div", {
833
+ class: "collapseArea hover abs",
834
+ onClick: c[0] || (c[0] = (x) => g(n(e).collapse))
365
835
  }, [
366
- i("div", {
367
- class: R(["menuItem flexMode vc g8 radius4 p0-16", [
368
- a(o).name === t.name && "active bg-primary",
369
- a(e).collapse && "hc",
370
- a(e).collapse && x(t) && "activeChild"
371
- ]]),
372
- onClick: (C) => S(t),
373
- onDblclick: $
836
+ r("i", {
837
+ class: F(["imicon fs20", n(a)])
838
+ }, null, 2)
839
+ ])
840
+ ]),
841
+ r("div", Dt, [
842
+ (b(!0), M(Y, null, se(o.routes, (x, i) => {
843
+ var f, S;
844
+ return b(), M("div", {
845
+ key: i,
846
+ class: "menuItemWrap mb2"
374
847
  }, [
375
- i("div", st, [
376
- t.meta.icon ? (y(), T("i", {
377
- key: 0,
378
- class: R([l.iconClass, t.meta.icon])
379
- }, null, 2)) : (y(), T("span", at, A(((f = t.meta.title) == null ? void 0 : f.substr(0, 1)) || "U"), 1))
380
- ]),
381
- a(e).collapse ? B("", !0) : (y(), T("div", {
382
- key: 0,
383
- class: R(["itemTitle txt-nowrap fs14", a(o).name === t.name ? "txt-white" : "txt-h1"])
384
- }, A(t.meta.title), 3))
385
- ], 42, nt),
386
- (O = t.children) != null && O.length ? (y(), T("div", rt, [
387
- (y(!0), T(te, null, ne(t.children, (C, n) => (y(), T("div", {
388
- key: n,
389
- class: R(["childrenItem flexMode vc g8 radius4 h40 p0-16", a(o).name === C.name && "active bg-primary"]),
390
- onClick: (p) => S(C),
391
- onDblclick: $
848
+ r("div", {
849
+ class: F(["menuItem flexMode vc g8 radius4 p0-16", [
850
+ n(t).name === x.name && "active bg-primary",
851
+ n(e).collapse && "hc",
852
+ n(e).collapse && T(x) && "activeChild"
853
+ ]]),
854
+ onClick: (v) => A(x),
855
+ onDblclick: k
392
856
  }, [
393
- i("div", ct, [
394
- C.meta.icon ? (y(), T("i", {
857
+ r("div", Pt, [
858
+ x.meta.icon ? (b(), M("i", {
395
859
  key: 0,
396
- class: R([l.iconClass, C.meta.icon])
397
- }, null, 2)) : B("", !0)
860
+ class: F([o.iconClass, x.meta.icon])
861
+ }, null, 2)) : (b(), M("span", Rt, L(((f = x.meta.title) == null ? void 0 : f.substr(0, 1)) || "U"), 1))
398
862
  ]),
399
- a(e).collapse ? B("", !0) : (y(), T("div", {
863
+ n(e).collapse ? K("", !0) : (b(), M("div", {
400
864
  key: 0,
401
- class: R(["itemTitle txt-nowrap fs14", a(o).name === C.name ? "txt-white" : "txt-h1"])
402
- }, A(C.meta.title), 3))
403
- ], 42, it))), 128))
404
- ])) : B("", !0)
405
- ]);
406
- }), 128))
407
- ])
408
- ], 2));
865
+ class: F(["itemTitle txt-nowrap fs14", n(t).name === x.name ? "txt-white" : "txt-h1"])
866
+ }, L(x.meta.title), 3))
867
+ ], 42, Bt),
868
+ (S = x.children) != null && S.length ? (b(), M("div", Ht, [
869
+ (b(!0), M(Y, null, se(x.children, (v, N) => (b(), M("div", {
870
+ key: N,
871
+ class: F(["childrenItem flexMode vc g8 radius4 h40 p0-16", n(t).name === v.name && "active bg-primary"]),
872
+ onClick: (I) => A(v),
873
+ onDblclick: k
874
+ }, [
875
+ r("div", Gt, [
876
+ v.meta.icon ? (b(), M("i", {
877
+ key: 0,
878
+ class: F([o.iconClass, v.meta.icon])
879
+ }, null, 2)) : K("", !0)
880
+ ]),
881
+ n(e).collapse ? K("", !0) : (b(), M("div", {
882
+ key: 0,
883
+ class: F(["itemTitle txt-nowrap fs14", n(t).name === v.name ? "txt-white" : "txt-h1"])
884
+ }, L(v.meta.title), 3))
885
+ ], 42, Ut))), 128))
886
+ ])) : K("", !0)
887
+ ]);
888
+ }), 128))
889
+ ]),
890
+ r("div", Jt, [
891
+ z(h, {
892
+ placement: "top",
893
+ title: l.$l("Log out?"),
894
+ onConfirm: d
895
+ }, {
896
+ reference: V(() => [
897
+ r("div", qt, [
898
+ c[1] || (c[1] = r("i", { class: "imicon im-power fs20" }, null, -1)),
899
+ r("span", null, L(n(C).userinfo[o.usernameKey]), 1)
900
+ ])
901
+ ]),
902
+ _: 1
903
+ }, 8, ["title"])
904
+ ])
905
+ ], 2);
906
+ };
409
907
  }
410
- }), dt = /* @__PURE__ */ X(ut, [["__scopeId", "data-v-8dc648a5"]]), pt = { class: "FrameFooter" }, mt = { class: "txt-tip" }, ft = { class: "txt-primary" }, gt = /* @__PURE__ */ Object.assign({
908
+ }), Yt = /* @__PURE__ */ J(Wt, [["__scopeId", "data-v-8db79d97"]]), Zt = { class: "FrameFooter" }, Qt = { class: "txt-tip" }, Xt = { class: "txt-primary" }, eo = /* @__PURE__ */ Object.assign({
411
909
  name: "FrameFooter",
412
910
  inheritAttrs: !1
413
911
  }, {
414
912
  __name: "Footer",
415
- setup(h) {
913
+ setup(p) {
416
914
  H({});
417
- const b = V(() => globalThis.$config);
418
- return (l, e) => (y(), T("div", pt, [
419
- i("span", mt, A(a(b).copyright), 1),
420
- i("span", ft, A(a(b).author), 1)
915
+ const m = O(() => globalThis.$config);
916
+ return (o, e) => (b(), M("div", Zt, [
917
+ r("span", Qt, L(n(m).copyright), 1),
918
+ r("span", Xt, L(n(m).author), 1)
421
919
  ]));
422
920
  }
423
- }), ht = /* @__PURE__ */ X(gt, [["__scopeId", "data-v-c3ba0162"]]), yt = { class: "MvcFrame" }, bt = { class: "PageArea" }, vt = /* @__PURE__ */ Object.assign({
921
+ }), to = /* @__PURE__ */ J(eo, [["__scopeId", "data-v-c3ba0162"]]), oo = /* @__PURE__ */ Object.assign({
922
+ name: "FrameTool",
923
+ inheritAttrs: !1
924
+ }, {
925
+ __name: "Tool",
926
+ setup(p) {
927
+ const m = Pe(() => import("./Config.js"));
928
+ H({});
929
+ const o = H({
930
+ current: "",
931
+ list: [
932
+ {
933
+ title: "Frame Config",
934
+ cpt: me(m)
935
+ }
936
+ ]
937
+ }), e = () => {
938
+ o.current = 0;
939
+ };
940
+ return (t, s) => {
941
+ const u = E("Drawer");
942
+ return b(), M(Y, null, [
943
+ r("div", { class: "FrameTool fixed r t flexMode vc g8 p0-8 w40 h40 noShrink z9" }, [
944
+ r("div", {
945
+ class: "hover w24 h24 flexMode hc vc",
946
+ onClick: e
947
+ }, [...s[1] || (s[1] = [
948
+ r("i", { class: "imicon im-setting fs20" }, null, -1)
949
+ ])])
950
+ ]),
951
+ z(u, {
952
+ current: n(o).current,
953
+ "onUpdate:current": s[0] || (s[0] = (C) => n(o).current = C),
954
+ drawer: n(o).list
955
+ }, null, 8, ["current", "drawer"])
956
+ ], 64);
957
+ };
958
+ }
959
+ }), no = { class: "MvcFrame" }, lo = ["element-loading-text"], so = /* @__PURE__ */ Object.assign({
424
960
  name: "MvcFrame",
425
961
  inheritAttrs: !1
426
962
  }, {
@@ -440,60 +976,71 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
440
976
  page: {
441
977
  type: Object,
442
978
  default: /* @__PURE__ */ Object.create(null)
979
+ },
980
+ /** `v-loading` 文案;空则使用 Element Plus 默认 */
981
+ pageLoadingText: {
982
+ type: String,
983
+ default: ""
443
984
  }
444
985
  },
445
- setup(h) {
446
- const b = h;
986
+ setup(p) {
987
+ const m = p;
447
988
  H({});
448
- const e = pe("store").tab();
449
- oe(() => {
450
- o();
989
+ const o = he("store"), e = o.tab(), t = o.init();
990
+ ee(() => {
991
+ s();
451
992
  });
452
- const o = () => {
453
- r();
454
- }, r = () => {
455
- var d, w, g, k, u, x;
456
- if ((w = (d = globalThis.$config) == null ? void 0 : d.iconfont) != null && w.url) {
457
- const S = document.createElement("script");
458
- if (S.id = "iconfont", S.type = "text/javascript", S.src = (k = (g = globalThis.$config) == null ? void 0 : g.iconfont) == null ? void 0 : k.url, document.getElementById("iconfont"))
993
+ const s = () => {
994
+ Ze(), u(), ze();
995
+ }, u = () => {
996
+ var $, y, g, w, _, T;
997
+ if ((y = ($ = globalThis.$config) == null ? void 0 : $.iconfont) != null && y.url) {
998
+ const A = document.createElement("script");
999
+ if (A.id = "iconfont", A.type = "text/javascript", A.src = (w = (g = globalThis.$config) == null ? void 0 : g.iconfont) == null ? void 0 : w.url, document.getElementById("iconfont"))
459
1000
  return;
460
- document.head.appendChild(S), (x = (u = globalThis.$config) == null ? void 0 : u.iconfont) == null || delete x.url;
1001
+ document.head.appendChild(A), (T = (_ = globalThis.$config) == null ? void 0 : _.iconfont) == null || delete T.url;
461
1002
  }
462
- };
463
- return (d, w) => {
464
- const g = K("router-view");
465
- return y(), T("div", yt, [
466
- E(dt, ue(de(b.menu)), fe({ _: 2 }, [
467
- d.$slots.logo ? {
1003
+ }, C = O(() => t.pageLoading);
1004
+ return ($, y) => {
1005
+ const g = E("router-view"), w = Re("loading");
1006
+ return b(), M("div", no, [
1007
+ z(Yt, de(fe(m.menu)), ie({ _: 2 }, [
1008
+ $.$slots.logo ? {
468
1009
  name: "logo",
469
- fn: I(() => [
470
- q(d.$slots, "logo", {}, void 0, !0)
1010
+ fn: V(() => [
1011
+ R($.$slots, "logo", {}, void 0, !0)
471
1012
  ]),
472
1013
  key: "0"
473
1014
  } : void 0,
474
- d.$slots.logomini ? {
1015
+ $.$slots.logomini ? {
475
1016
  name: "logomini",
476
- fn: I(() => [
477
- q(d.$slots, "logomini", {}, void 0, !0)
1017
+ fn: V(() => [
1018
+ R($.$slots, "logomini", {}, void 0, !0)
478
1019
  ]),
479
1020
  key: "1"
480
1021
  } : void 0
481
1022
  ]), 1040),
482
- i("div", bt, [
483
- a(e).useTab ? (y(), D(Xe, { key: 0 })) : B("", !0),
484
- E(g, ue(de(b.page)), null, 16),
485
- E(ht)
1023
+ He((b(), M("div", {
1024
+ class: "PageArea pageAreaWithLoading",
1025
+ "element-loading-text": m.pageLoadingText || "LOADING"
1026
+ }, [
1027
+ n(e).useTab ? (b(), B(Et, { key: 0 })) : K("", !0),
1028
+ z(oo),
1029
+ z(g, de(fe(m.page)), null, 16),
1030
+ z(to)
1031
+ ], 8, lo)), [
1032
+ [w, n(C)]
486
1033
  ])
487
1034
  ]);
488
1035
  };
489
1036
  }
490
- }), _t = /* @__PURE__ */ X(vt, [["__scopeId", "data-v-d0100e71"]]), $t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1037
+ }), ao = /* @__PURE__ */ J(so, [["__scopeId", "data-v-2163182e"]]), ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
491
1038
  __proto__: null,
492
- default: _t
493
- }, Symbol.toStringTag, { value: "Module" })), xt = {
1039
+ default: ao
1040
+ }, Symbol.toStringTag, { value: "Module" })), io = {
494
1041
  class: "MvcIcon",
495
1042
  "aria-hidden": "true"
496
- }, Ct = ["xlink:href"], St = /* @__PURE__ */ Object.assign({
1043
+ }, co = ["xlink:href"], uo = /* @__PURE__ */ Object.assign({
497
1044
  name: "MvcIcon"
498
1045
  }, {
499
1046
  __name: "index",
@@ -503,23 +1050,23 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
503
1050
  default: "cloud"
504
1051
  }
505
1052
  },
506
- setup(h) {
507
- const b = H({
1053
+ setup(p) {
1054
+ const m = H({
508
1055
  prefix: "imc"
509
1056
  });
510
- return oe(() => {
511
- var l, e;
512
- (e = (l = globalThis.$config) == null ? void 0 : l.iconfont) != null && e.prefix && (b.prefix = globalThis.$config.iconfont.prefix);
513
- }), (l, e) => (y(), T("svg", xt, [
514
- i("use", {
515
- "xlink:href": `#${a(b).prefix}-${h.name}`
516
- }, null, 8, Ct)
1057
+ return ee(() => {
1058
+ var o, e;
1059
+ (e = (o = globalThis.$config) == null ? void 0 : o.iconfont) != null && e.prefix && (m.prefix = globalThis.$config.iconfont.prefix);
1060
+ }), (o, e) => (b(), M("svg", io, [
1061
+ r("use", {
1062
+ "xlink:href": `#${n(m).prefix}-${p.name}`
1063
+ }, null, 8, co)
517
1064
  ]));
518
1065
  }
519
- }), wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1066
+ }), po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
520
1067
  __proto__: null,
521
- default: St
522
- }, Symbol.toStringTag, { value: "Module" })), kt = /* @__PURE__ */ Object.assign({
1068
+ default: uo
1069
+ }, Symbol.toStringTag, { value: "Module" })), mo = /* @__PURE__ */ Object.assign({
523
1070
  name: "MvcInput"
524
1071
  }, {
525
1072
  __name: "index",
@@ -536,56 +1083,447 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
536
1083
  "blur",
537
1084
  "focus"
538
1085
  ],
539
- setup(h, { emit: b }) {
540
- const l = h, e = J(null);
541
- let o = null;
542
- const r = H({
1086
+ setup(p, { emit: m }) {
1087
+ const o = p, e = Ue(), t = G(null);
1088
+ let s = null;
1089
+ const u = H({
543
1090
  val: "",
544
1091
  isComposing: !1
545
- }), d = b, { proxy: w } = re();
546
- oe(() => {
547
- var m, c, t;
548
- const M = (m = e.value) == null ? void 0 : m.$el;
549
- o = ((c = M == null ? void 0 : M.querySelector) == null ? void 0 : c.call(M, "input")) || ((t = M == null ? void 0 : M.querySelector) == null ? void 0 : t.call(M, "textarea")), o && (o.addEventListener("compositionstart", g), o.addEventListener("compositionend", k));
1092
+ }), C = m, { proxy: $ } = ae();
1093
+ ee(() => {
1094
+ var d, a, l;
1095
+ const k = (d = t.value) == null ? void 0 : d.$el;
1096
+ s = ((a = k == null ? void 0 : k.querySelector) == null ? void 0 : a.call(k, "input")) || ((l = k == null ? void 0 : k.querySelector) == null ? void 0 : l.call(k, "textarea")), s && (s.addEventListener("compositionstart", y), s.addEventListener("compositionend", g));
550
1097
  });
551
- const g = () => {
552
- r.isComposing = !0;
553
- }, k = () => {
554
- r.isComposing = !1, me(() => x(r.val));
555
- }, u = (M) => {
556
- r.isComposing || x(M);
557
- }, x = (M) => {
558
- d("update:modelValue", M), d("input", M);
559
- }, S = V(() => !!(w.$attrs.maxlength || $.value)), $ = V(() => w.$attrs.max);
560
- return le(
561
- () => l.modelValue,
562
- (M) => {
563
- const m = String(M ?? "");
564
- String(r.val) !== m && (r.val = m);
1098
+ const y = () => {
1099
+ u.isComposing = !0;
1100
+ }, g = () => {
1101
+ u.isComposing = !1, ge(() => _(u.val));
1102
+ }, w = (k) => {
1103
+ u.isComposing || _(k);
1104
+ }, _ = (k) => {
1105
+ C("update:modelValue", k), C("input", k);
1106
+ }, T = O(() => !!($.$attrs.maxlength || A.value)), A = O(() => $.$attrs.max);
1107
+ return ne(
1108
+ () => o.modelValue,
1109
+ (k) => {
1110
+ const d = String(k ?? "");
1111
+ String(u.val) !== d && (u.val = d);
565
1112
  },
566
1113
  { immediate: !0 }
567
1114
  ), ce(() => {
568
- o && (o.removeEventListener("compositionstart", g), o.removeEventListener("compositionend", k), o = null);
569
- }), (M, m) => {
570
- const c = K("el-input");
571
- return y(), D(c, se({
1115
+ s && (s.removeEventListener("compositionstart", y), s.removeEventListener("compositionend", g), s = null);
1116
+ }), (k, d) => {
1117
+ const a = E("el-input");
1118
+ return b(), B(a, oe({
572
1119
  ref_key: "inputRef",
573
- ref: e,
574
- modelValue: a(r).val,
575
- "onUpdate:modelValue": m[0] || (m[0] = (t) => a(r).val = t),
576
- "show-word-limit": a(S),
577
- maxlength: a($),
1120
+ ref: t,
1121
+ modelValue: n(u).val,
1122
+ "onUpdate:modelValue": d[0] || (d[0] = (l) => n(u).val = l),
1123
+ "show-word-limit": n(T),
1124
+ maxlength: n(A),
578
1125
  class: "MvcInput"
579
- }, M.$attrs, { onInput: u }), null, 16, ["modelValue", "show-word-limit", "maxlength"]);
1126
+ }, k.$attrs, { onInput: w }), ie({ _: 2 }, [
1127
+ se(n(e), (l, c) => ({
1128
+ name: c,
1129
+ fn: V((h) => [
1130
+ R(k.$slots, c, de(fe(h || {})))
1131
+ ])
1132
+ }))
1133
+ ]), 1040, ["modelValue", "show-word-limit", "maxlength"]);
1134
+ };
1135
+ }
1136
+ }), fo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1137
+ __proto__: null,
1138
+ default: mo
1139
+ }, Symbol.toStringTag, { value: "Module" })), go = { class: "content flexMode flexV vc g12 relative z1" }, ho = /* @__PURE__ */ Object.assign({
1140
+ name: "MvcLoading",
1141
+ inheritAttrs: !1
1142
+ }, {
1143
+ __name: "index",
1144
+ props: {
1145
+ /** 是否显示遮罩与指示器 */
1146
+ loading: {
1147
+ type: Boolean,
1148
+ default: !1
1149
+ },
1150
+ txtClass: {
1151
+ type: String,
1152
+ default: "txt-h2"
1153
+ },
1154
+ showTxt: {
1155
+ type: Boolean,
1156
+ default: !1
1157
+ },
1158
+ /** 底部说明文案(空则不显示第二行) */
1159
+ txt: {
1160
+ type: String,
1161
+ default: "- LOADING -"
1162
+ },
1163
+ /** 旋转图标 class,默认图标字体 */
1164
+ icon: {
1165
+ type: String,
1166
+ default: "im-loading"
1167
+ },
1168
+ size: {
1169
+ type: String,
1170
+ default: "28"
1171
+ },
1172
+ radius: {
1173
+ type: String,
1174
+ default: "8"
1175
+ }
1176
+ },
1177
+ setup(p) {
1178
+ const m = p;
1179
+ return (o, e) => (b(), B(Ge, { name: "loadingFade" }, {
1180
+ default: V(() => [
1181
+ m.loading ? (b(), M("div", {
1182
+ key: 0,
1183
+ class: "MvcLoading absFull hp100 flexMode flexV vc hc ztop",
1184
+ role: "status",
1185
+ "aria-busy": "true",
1186
+ "aria-live": "polite",
1187
+ style: Le({ borderRadius: `${m.radius}px` })
1188
+ }, [
1189
+ r("div", go, [
1190
+ r("i", {
1191
+ class: F([m.icon, `fs${m.size}`, "imicon ani-rotate"]),
1192
+ "aria-hidden": "true"
1193
+ }, null, 2),
1194
+ m.showTxt ? (b(), M("span", {
1195
+ key: 0,
1196
+ class: F(["loaderTxt fs14 txt-c", m.txtClass])
1197
+ }, L(o.$l(m.txt)), 3)) : K("", !0)
1198
+ ])
1199
+ ], 4)) : K("", !0)
1200
+ ]),
1201
+ _: 1
1202
+ }));
1203
+ }
1204
+ }), bo = /* @__PURE__ */ J(ho, [["__scopeId", "data-v-0bb814a6"]]), yo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1205
+ __proto__: null,
1206
+ default: bo
1207
+ }, Symbol.toStringTag, { value: "Module" })), vo = { class: "MvcLogin flexMode flexV hc vc wp100 vh100 p24-16" }, _o = { class: "panelWrap wp100 maxw400 p24 radius8 border noShrink" }, wo = { class: "flexMode vc hb mb16" }, $o = { class: "pl8 fs20 fw700 txt-h1" }, xo = { class: "contentArea minh160" }, So = {
1208
+ key: 1,
1209
+ class: "oauthAuthPanel flexMode flexV g8 wp100 vl"
1210
+ }, Co = ["disabled"], ko = ["disabled"], To = {
1211
+ key: 2,
1212
+ class: "scanArea flexMode flexV vc g12"
1213
+ }, Ao = { class: "scanTitle m0 block fs14 txt-h2" }, Mo = { class: "footerLine flexMode flexWrap hc g8 mt24 fs12 txt-tip" }, be = "mvframe_login_remember", Vo = /* @__PURE__ */ Object.assign({
1214
+ name: "MvcLogin",
1215
+ inheritAttrs: !1
1216
+ }, {
1217
+ __name: "index",
1218
+ props: {
1219
+ /** 登录表单文案与表单项展示配置(与默认合并,仅传需要覆盖的键即可) */
1220
+ formFileds: {
1221
+ type: Object,
1222
+ default: () => /* @__PURE__ */ Object.create(null)
1223
+ },
1224
+ title: {
1225
+ type: String,
1226
+ default: "Login"
1227
+ },
1228
+ rememberTxt: {
1229
+ type: String,
1230
+ default: "Remember me"
1231
+ },
1232
+ submitTxt: {
1233
+ type: String,
1234
+ default: "Login"
1235
+ },
1236
+ successTxt: {
1237
+ type: String,
1238
+ default: "Login successful"
1239
+ },
1240
+ loginMethods: {
1241
+ type: Array,
1242
+ default: () => [0, 1, 2, 3, 4]
1243
+ }
1244
+ },
1245
+ emits: ["success", "submit"],
1246
+ setup(p, { emit: m }) {
1247
+ const o = p, { proxy: e } = ae(), t = G(null), s = H({
1248
+ method: "password",
1249
+ form: {},
1250
+ remember: !1,
1251
+ submitting: !1
1252
+ });
1253
+ ee(() => {
1254
+ try {
1255
+ const c = localStorage.getItem(be);
1256
+ if (c) {
1257
+ const h = JSON.parse(c);
1258
+ h && typeof h == "object" && h.remember && (s.remember = !0, h.username != null && (s.form.username = String(h.username)), h.password != null && (s.form.password = String(h.password)));
1259
+ }
1260
+ } catch {
1261
+ }
1262
+ });
1263
+ const u = m, C = (c, h = "info") => {
1264
+ const x = e == null ? void 0 : e.$message;
1265
+ x != null && x[h] && x[h](c);
1266
+ }, $ = () => {
1267
+ try {
1268
+ s.remember ? localStorage.setItem(
1269
+ be,
1270
+ JSON.stringify({
1271
+ remember: !0,
1272
+ username: s.form.username,
1273
+ password: s.form.password
1274
+ })
1275
+ ) : localStorage.removeItem(be);
1276
+ } catch {
1277
+ }
1278
+ }, y = () => {
1279
+ C("Google 登录需按官方物料与 OAuth 配置 token,当前未发起跳转。");
1280
+ }, g = () => {
1281
+ C("Sign in with Apple 需按 Apple 人机界面指南配置服务,当前未发起跳转。");
1282
+ }, w = async () => {
1283
+ var i, f;
1284
+ if (s.submitting) return;
1285
+ const c = await ((f = (i = t.value) == null ? void 0 : i.validate) == null ? void 0 : f.call(i));
1286
+ if (!c) return;
1287
+ const h = String(c.username ?? "").trim();
1288
+ if (!h)
1289
+ return;
1290
+ const x = String(c.password ?? "").trim();
1291
+ if (x) {
1292
+ s.submitting = !0;
1293
+ try {
1294
+ const S = await globalThis.$pm(async () => ({
1295
+ method: "password",
1296
+ username: h,
1297
+ password: x
1298
+ }));
1299
+ $(), u("submit", {
1300
+ method: "password",
1301
+ [A.value.username.valueKey]: S.username,
1302
+ [A.value.password.valueKey]: S.password
1303
+ }), localStorage.removeItem("ctab"), localStorage.removeItem("tabs");
1304
+ } finally {
1305
+ s.submitting = !1;
1306
+ }
1307
+ }
1308
+ }, _ = O(() => {
1309
+ const c = globalThis.$config;
1310
+ return {
1311
+ copyright: (c == null ? void 0 : c.copyright) ?? "",
1312
+ author: (c == null ? void 0 : c.author) ?? ""
1313
+ };
1314
+ }), T = O(() => a[s.method] ?? "Login"), A = O(() => ({
1315
+ username: {
1316
+ ...l.username,
1317
+ ...o.formFileds.username || {}
1318
+ },
1319
+ password: {
1320
+ ...l.password,
1321
+ ...o.formFileds.password || {}
1322
+ }
1323
+ })), k = O(() => ({
1324
+ username: [
1325
+ {
1326
+ required: !0,
1327
+ message: A.value.username.message,
1328
+ trigger: "blur"
1329
+ }
1330
+ ],
1331
+ password: [
1332
+ {
1333
+ required: !0,
1334
+ message: A.value.password.message,
1335
+ trigger: "blur"
1336
+ }
1337
+ ]
1338
+ })), d = O(() => [
1339
+ { value: "password", label: "Account" },
1340
+ { value: "auth", label: "Google/Apple" },
1341
+ { value: "dingtalk", label: "DingTalk" },
1342
+ { value: "feishu", label: "Lark" },
1343
+ { value: "wechat", label: "Wechat" }
1344
+ ].filter((c, h) => o.loginMethods.includes(h))), a = {
1345
+ dingtalk: "DingTalk",
1346
+ feishu: "Lark",
1347
+ wechat: "Wechat"
1348
+ }, l = {
1349
+ username: {
1350
+ label: "Account",
1351
+ placeholder: "Enter your account",
1352
+ message: "Account is required",
1353
+ showPrefix: !0,
1354
+ icon: "imicon im-user",
1355
+ valueKey: "username"
1356
+ },
1357
+ password: {
1358
+ label: "Password",
1359
+ placeholder: "Enter your password",
1360
+ message: "Password is required",
1361
+ showPrefix: !0,
1362
+ icon: "imicon im-lock",
1363
+ valueKey: "password"
1364
+ }
1365
+ };
1366
+ return (c, h) => {
1367
+ const x = E("BtnGroup"), i = E("Input"), f = E("el-form-item"), S = E("el-checkbox"), v = E("el-button"), N = E("Form");
1368
+ return b(), M("div", vo, [
1369
+ r("div", _o, [
1370
+ r("div", wo, [
1371
+ r("span", $o, L(c.$l(o.title)), 1)
1372
+ ]),
1373
+ z(x, {
1374
+ modelValue: n(s).method,
1375
+ "onUpdate:modelValue": h[0] || (h[0] = (I) => n(s).method = I),
1376
+ options: n(d),
1377
+ disabled: n(s).submitting,
1378
+ size: "small",
1379
+ class: "mb32"
1380
+ }, null, 8, ["modelValue", "options", "disabled"]),
1381
+ r("div", xo, [
1382
+ n(s).method === "password" ? (b(), B(N, {
1383
+ key: 0,
1384
+ ref_key: "pwdFormRef",
1385
+ ref: t,
1386
+ modelValue: n(s).form,
1387
+ "onUpdate:modelValue": h[4] || (h[4] = (I) => n(s).form = I),
1388
+ size: "default",
1389
+ rules: n(k)
1390
+ }, {
1391
+ default: V(() => [
1392
+ z(f, { prop: "username" }, {
1393
+ default: V(() => [
1394
+ z(i, {
1395
+ modelValue: n(s).form.username,
1396
+ "onUpdate:modelValue": h[1] || (h[1] = (I) => n(s).form.username = I),
1397
+ class: "wp100",
1398
+ size: "large",
1399
+ name: "username",
1400
+ placeholder: n(A).username.placeholder,
1401
+ disabled: n(s).submitting
1402
+ }, ie({ _: 2 }, [
1403
+ n(A).username.showPrefix ? {
1404
+ name: "prefix",
1405
+ fn: V(() => [
1406
+ r("i", {
1407
+ class: F(n(A).username.icon)
1408
+ }, null, 2)
1409
+ ]),
1410
+ key: "0"
1411
+ } : void 0
1412
+ ]), 1032, ["modelValue", "placeholder", "disabled"])
1413
+ ]),
1414
+ _: 1
1415
+ }),
1416
+ z(f, { prop: "password" }, {
1417
+ default: V(() => [
1418
+ z(i, {
1419
+ modelValue: n(s).form.password,
1420
+ "onUpdate:modelValue": h[2] || (h[2] = (I) => n(s).form.password = I),
1421
+ class: "wp100",
1422
+ size: "large",
1423
+ type: "password",
1424
+ name: "password",
1425
+ placeholder: n(A).password.placeholder,
1426
+ "show-password": "",
1427
+ disabled: n(s).submitting,
1428
+ onKeyup: Je(w, ["enter"])
1429
+ }, ie({ _: 2 }, [
1430
+ n(A).password.showPrefix ? {
1431
+ name: "prefix",
1432
+ fn: V(() => [
1433
+ r("i", {
1434
+ class: F(n(A).password.icon)
1435
+ }, null, 2)
1436
+ ]),
1437
+ key: "0"
1438
+ } : void 0
1439
+ ]), 1032, ["modelValue", "placeholder", "disabled"])
1440
+ ]),
1441
+ _: 1
1442
+ }),
1443
+ z(f, null, {
1444
+ default: V(() => [
1445
+ z(S, {
1446
+ modelValue: n(s).remember,
1447
+ "onUpdate:modelValue": h[3] || (h[3] = (I) => n(s).remember = I),
1448
+ disabled: n(s).submitting
1449
+ }, {
1450
+ default: V(() => [
1451
+ W(L(c.$l(o.rememberTxt)), 1)
1452
+ ]),
1453
+ _: 1
1454
+ }, 8, ["modelValue", "disabled"])
1455
+ ]),
1456
+ _: 1
1457
+ }),
1458
+ z(v, {
1459
+ type: "primary",
1460
+ size: "large",
1461
+ class: "wp100",
1462
+ loading: n(s).submitting,
1463
+ disabled: n(s).submitting,
1464
+ onClick: w
1465
+ }, {
1466
+ default: V(() => [
1467
+ W(L(c.$l(o.submitTxt)), 1)
1468
+ ]),
1469
+ _: 1
1470
+ }, 8, ["loading", "disabled"])
1471
+ ]),
1472
+ _: 1
1473
+ }, 8, ["modelValue", "rules"])) : n(s).method === "auth" ? (b(), M("div", So, [
1474
+ h[7] || (h[7] = r("p", { class: "oauthAuthTip m0 block fs12 lh20 txt-tip mb16" }, " 需在应用中配置 OAuth Client 与 token;以下为品牌示意按钮,不发起跳转。 ", -1)),
1475
+ r("button", {
1476
+ type: "button",
1477
+ class: "oauthGoogle wp100 mb36",
1478
+ disabled: n(s).submitting,
1479
+ onClick: y
1480
+ }, [...h[5] || (h[5] = [
1481
+ qe('<svg class="oauthGoogleLogo noShrink" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="18" height="18" aria-hidden="true" data-v-8e4310b6><path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z" data-v-8e4310b6></path><path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z" data-v-8e4310b6></path><path fill="#FBBC05" d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z" data-v-8e4310b6></path><path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z" data-v-8e4310b6></path></svg><span class="oauthGoogleLabel" data-v-8e4310b6>Sign in with Google</span>', 2)
1482
+ ])], 8, Co),
1483
+ r("button", {
1484
+ type: "button",
1485
+ class: "oauthApple wp100 mb16",
1486
+ disabled: n(s).submitting,
1487
+ onClick: g
1488
+ }, [...h[6] || (h[6] = [
1489
+ r("svg", {
1490
+ class: "oauthAppleLogo noShrink",
1491
+ xmlns: "http://www.w3.org/2000/svg",
1492
+ viewBox: "0 0 24 24",
1493
+ width: "18",
1494
+ height: "22",
1495
+ "aria-hidden": "true"
1496
+ }, [
1497
+ r("path", {
1498
+ fill: "currentColor",
1499
+ d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.38c.843-1.012 1.4-2.427 1.245-3.826-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"
1500
+ })
1501
+ ], -1),
1502
+ r("span", { class: "oauthAppleLabel fs14" }, "Sign in with Apple", -1)
1503
+ ])], 8, ko)
1504
+ ])) : (b(), M("div", To, [
1505
+ r("p", Ao, L(n(T)), 1),
1506
+ r("div", {
1507
+ class: F(["qrBlock w180 h180 radius6", `qr-${n(s).method}`]),
1508
+ "aria-hidden": "true"
1509
+ }, null, 2)
1510
+ ]))
1511
+ ])
1512
+ ]),
1513
+ r("div", Mo, [
1514
+ r("span", null, L(n(_).copyright), 1),
1515
+ r("span", null, L(n(_).author), 1)
1516
+ ])
1517
+ ]);
580
1518
  };
581
1519
  }
582
- }), Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1520
+ }), Oo = /* @__PURE__ */ J(Vo, [["__scopeId", "data-v-8e4310b6"]]), Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
583
1521
  __proto__: null,
584
- default: kt
585
- }, Symbol.toStringTag, { value: "Module" })), Mt = { class: "MvcPage" }, At = {
1522
+ default: Oo
1523
+ }, Symbol.toStringTag, { value: "Module" })), Io = { class: "MvcPage" }, jo = {
586
1524
  key: 0,
587
1525
  class: "PageHeader"
588
- }, Vt = { class: "PageHeaderLeft" }, Ot = { class: "PageHeaderTitle" }, jt = { class: "PageHeaderSubTitle" }, It = { class: "PageHeaderRight" }, Nt = { class: "PageBody" }, zt = /* @__PURE__ */ Object.assign({
1526
+ }, zo = { class: "PageHeaderLeft" }, Eo = { class: "PageHeaderTitle" }, No = { class: "PageHeaderSubTitle" }, Ko = { class: "PageHeaderRight" }, Fo = { class: "PageBody" }, Do = /* @__PURE__ */ Object.assign({
589
1527
  name: "MvcPage",
590
1528
  inheritAttrs: !1
591
1529
  }, {
@@ -604,33 +1542,33 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
604
1542
  default: !1
605
1543
  }
606
1544
  },
607
- setup(h) {
608
- const b = h, { proxy: l } = re(), o = pe("store").tab(), r = V(() => b.title || b.subtitle);
609
- return V(() => o.useTab ? {
1545
+ setup(p) {
1546
+ const m = p, { proxy: o } = ae(), t = he("store").tab(), s = O(() => m.title || m.subtitle);
1547
+ return O(() => t.useTab ? {
610
1548
  minHeight: "calc(100vh - 48px - 36px)"
611
1549
  } : {
612
1550
  minHeight: "calc(100vh - 48px)"
613
- }), (d, w) => (y(), T("div", Mt, [
614
- b.noheader ? B("", !0) : (y(), T("div", At, [
615
- i("div", Vt, [
616
- d.$slots.header ? q(d.$slots, "header", { key: 0 }, void 0, !0) : a(r) ? (y(), T(te, { key: 1 }, [
617
- i("h3", Ot, A(b.title), 1),
618
- i("p", jt, A(b.subtitle), 1)
619
- ], 64)) : B("", !0)
1551
+ }), (u, C) => (b(), M("div", Io, [
1552
+ m.noheader ? K("", !0) : (b(), M("div", jo, [
1553
+ r("div", zo, [
1554
+ u.$slots.header ? R(u.$slots, "header", { key: 0 }, void 0, !0) : n(s) ? (b(), M(Y, { key: 1 }, [
1555
+ r("h3", Eo, L(m.title), 1),
1556
+ r("p", No, L(m.subtitle), 1)
1557
+ ], 64)) : K("", !0)
620
1558
  ]),
621
- i("div", It, [
622
- d.$slots.right ? q(d.$slots, "right", { key: 0 }, void 0, !0) : B("", !0)
1559
+ r("div", Ko, [
1560
+ u.$slots.right ? R(u.$slots, "right", { key: 0 }, void 0, !0) : K("", !0)
623
1561
  ])
624
1562
  ])),
625
- i("div", Nt, [
626
- q(d.$slots, "default", {}, void 0, !0)
1563
+ r("div", Fo, [
1564
+ R(u.$slots, "default", {}, void 0, !0)
627
1565
  ])
628
1566
  ]));
629
1567
  }
630
- }), Et = /* @__PURE__ */ X(zt, [["__scopeId", "data-v-7d18d3b1"]]), Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1568
+ }), Bo = /* @__PURE__ */ J(Do, [["__scopeId", "data-v-7d18d3b1"]]), Po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
631
1569
  __proto__: null,
632
- default: Et
633
- }, Symbol.toStringTag, { value: "Module" })), Lt = { class: "flexMode hb vc" }, Bt = { key: 1 }, Pt = { class: "tag" }, Ft = { class: "flexMode hr" }, Dt = /* @__PURE__ */ Object.assign({
1570
+ default: Bo
1571
+ }, Symbol.toStringTag, { value: "Module" })), Ro = { class: "flexMode hb vc" }, Ho = { key: 1 }, Uo = { class: "tag" }, Go = { class: "flexMode hr" }, Jo = /* @__PURE__ */ Object.assign({
634
1572
  name: "MvcSelect",
635
1573
  inheritAttrs: !1
636
1574
  }, {
@@ -674,130 +1612,130 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
674
1612
  }
675
1613
  },
676
1614
  emits: ["update:modelValue", "change"],
677
- setup(h, { emit: b }) {
678
- const l = h, e = J(null), o = J([]), r = J(!1), d = J(!1), w = J(!1), g = b, k = (n) => {
679
- l.multiple ? (o.value = Array.isArray(n) ? [...n] : [], m()) : (g("update:modelValue", n), g("change", n));
680
- }, u = (n) => {
681
- if (r.value = n, n && l.multiple) {
682
- const p = l.modelValue;
683
- o.value = Array.isArray(p) ? [...p] : p ? [p] : [], m();
1615
+ setup(p, { emit: m }) {
1616
+ const o = p, e = G(null), t = G([]), s = G(!1), u = G(!1), C = G(!1), $ = m, y = (i) => {
1617
+ o.multiple ? (t.value = Array.isArray(i) ? [...i] : [], k()) : ($("update:modelValue", i), $("change", i));
1618
+ }, g = (i) => {
1619
+ if (s.value = i, i && o.multiple) {
1620
+ const f = o.modelValue;
1621
+ t.value = Array.isArray(f) ? [...f] : f ? [f] : [], k();
684
1622
  }
685
- }, x = () => {
686
- var _;
687
- if (!l.filterable || !r.value) return M();
688
- const n = e.value, p = ((_ = n == null ? void 0 : n.optionsArray) == null ? void 0 : _.value) ?? (n == null ? void 0 : n.optionsArray) ?? [];
689
- return Array.isArray(p) ? p.filter((v) => v.visible && !v.isDisabled).map((v) => v.value) : M();
690
- }, S = (n) => {
691
- w.value = !1;
692
- const p = x();
693
- if (n)
694
- o.value = [.../* @__PURE__ */ new Set([...o.value, ...p])];
1623
+ }, w = () => {
1624
+ var S;
1625
+ if (!o.filterable || !s.value) return A();
1626
+ const i = e.value, f = ((S = i == null ? void 0 : i.optionsArray) == null ? void 0 : S.value) ?? (i == null ? void 0 : i.optionsArray) ?? [];
1627
+ return Array.isArray(f) ? f.filter((v) => v.visible && !v.isDisabled).map((v) => v.value) : A();
1628
+ }, _ = (i) => {
1629
+ C.value = !1;
1630
+ const f = w();
1631
+ if (i)
1632
+ t.value = [.../* @__PURE__ */ new Set([...t.value, ...f])];
695
1633
  else {
696
- const _ = new Set(p);
697
- o.value = o.value.filter((v) => !_.has(v));
1634
+ const S = new Set(f);
1635
+ t.value = t.value.filter((v) => !S.has(v));
698
1636
  }
699
- }, $ = () => {
700
- var n, p;
701
- l.multiple && (g("update:modelValue", o.value), g("change", o.value), (p = (n = e.value) == null ? void 0 : n.blur) == null || p.call(n));
702
- }, M = () => {
703
- const n = l.valueKey;
704
- return (l.options || []).map((p) => typeof p == "object" ? p[n] : p);
705
- }, m = () => {
706
- const n = x(), p = new Set(o.value ?? []), _ = n.filter((z) => p.has(z)).length, v = n.length;
707
- d.value = v > 0 && _ === v, w.value = _ > 0 && _ < v;
708
- }, c = V(() => l.multiple && r.value ? o.value : l.modelValue), t = V(() => {
1637
+ }, T = () => {
1638
+ var i, f;
1639
+ o.multiple && ($("update:modelValue", t.value), $("change", t.value), (f = (i = e.value) == null ? void 0 : i.blur) == null || f.call(i));
1640
+ }, A = () => {
1641
+ const i = o.valueKey;
1642
+ return (o.options || []).map((f) => typeof f == "object" ? f[i] : f);
1643
+ }, k = () => {
1644
+ const i = w(), f = new Set(t.value ?? []), S = i.filter((N) => f.has(N)).length, v = i.length;
1645
+ u.value = v > 0 && S === v, C.value = S > 0 && S < v;
1646
+ }, d = O(() => o.multiple && s.value ? t.value : o.modelValue), a = O(() => {
709
1647
  const {
710
- modelValue: n,
711
- valueKey: p,
712
- labelKey: _,
1648
+ modelValue: i,
1649
+ valueKey: f,
1650
+ labelKey: S,
713
1651
  selectAllTxt: v,
714
- confirmTxt: z,
715
- nowrap: N,
1652
+ confirmTxt: N,
1653
+ nowrap: I,
716
1654
  ...P
717
- } = l, G = P.props ?? {};
1655
+ } = o, Z = P.props ?? {};
718
1656
  return {
719
1657
  ...P,
720
1658
  props: {
721
- ...G,
722
- value: p,
723
- label: _
1659
+ ...Z,
1660
+ value: f,
1661
+ label: S
724
1662
  }
725
1663
  };
726
- }), s = V(
727
- () => l.nowrap ? {
1664
+ }), l = O(
1665
+ () => o.nowrap ? {
728
1666
  collapseTags: !0,
729
1667
  collapseTagsTooltip: !0,
730
1668
  maxCollapseTags: 1,
731
1669
  tagTooltip: { popperStyle: { maxWidth: "400px" } }
732
1670
  } : {}
733
- ), f = V(() => ({
734
- ...s.value,
735
- ...ge(),
736
- ...t.value
737
- })), O = V(() => {
738
- const n = l.multiple && r.value ? o.value : l.modelValue, p = Array.isArray(n) ? n : n ? [n] : [];
739
- if (!l.filterable || !r.value) return p.length;
740
- const _ = x();
741
- return p.filter((v) => _.includes(v)).length;
742
- }), C = V(() => x().length);
743
- return le(o, () => m(), { deep: !0 }), le(
744
- () => l.modelValue,
745
- (n) => {
746
- if (l.multiple && r.value) {
747
- const p = Array.isArray(n) ? [...n] : n ? [n] : [];
748
- JSON.stringify(p) !== JSON.stringify(o.value) && (o.value = p, m());
1671
+ ), c = O(() => ({
1672
+ ...l.value,
1673
+ ...ve(),
1674
+ ...a.value
1675
+ })), h = O(() => {
1676
+ const i = o.multiple && s.value ? t.value : o.modelValue, f = Array.isArray(i) ? i : i ? [i] : [];
1677
+ if (!o.filterable || !s.value) return f.length;
1678
+ const S = w();
1679
+ return f.filter((v) => S.includes(v)).length;
1680
+ }), x = O(() => w().length);
1681
+ return ne(t, () => k(), { deep: !0 }), ne(
1682
+ () => o.modelValue,
1683
+ (i) => {
1684
+ if (o.multiple && s.value) {
1685
+ const f = Array.isArray(i) ? [...i] : i ? [i] : [];
1686
+ JSON.stringify(f) !== JSON.stringify(t.value) && (t.value = f, k());
749
1687
  }
750
1688
  }
751
- ), (n, p) => {
752
- const _ = K("el-checkbox"), v = K("el-button"), z = K("el-select");
753
- return y(), D(z, se({
1689
+ ), (i, f) => {
1690
+ const S = E("el-checkbox"), v = E("el-button"), N = E("el-select");
1691
+ return b(), B(N, oe({
754
1692
  ref_key: "selectRef",
755
1693
  ref: e,
756
- "model-value": a(c),
1694
+ "model-value": n(d),
757
1695
  "tag-effect": "plain",
758
1696
  class: "MvcSelect"
759
- }, a(f), {
760
- "onUpdate:modelValue": k,
761
- onVisibleChange: u
762
- }), fe({
763
- default: I(() => [
764
- q(n.$slots, "default")
1697
+ }, n(c), {
1698
+ "onUpdate:modelValue": y,
1699
+ onVisibleChange: g
1700
+ }), ie({
1701
+ default: V(() => [
1702
+ R(i.$slots, "default")
765
1703
  ]),
766
1704
  _: 2
767
1705
  }, [
768
- l.filterable ? {
1706
+ o.filterable ? {
769
1707
  name: "header",
770
- fn: I(() => [
771
- i("div", Lt, [
772
- l.multiple ? (y(), D(_, {
1708
+ fn: V(() => [
1709
+ r("div", Ro, [
1710
+ o.multiple ? (b(), B(S, {
773
1711
  key: 0,
774
- modelValue: a(d),
775
- "onUpdate:modelValue": p[0] || (p[0] = (N) => Se(d) ? d.value = N : null),
776
- indeterminate: a(w),
1712
+ modelValue: n(u),
1713
+ "onUpdate:modelValue": f[0] || (f[0] = (I) => je(u) ? u.value = I : null),
1714
+ indeterminate: n(C),
777
1715
  class: "h24",
778
- onChange: S
1716
+ onChange: _
779
1717
  }, {
780
- default: I(() => [
781
- Q(A(h.selectAllTxt), 1)
1718
+ default: V(() => [
1719
+ W(L(p.selectAllTxt), 1)
782
1720
  ]),
783
1721
  _: 1
784
- }, 8, ["modelValue", "indeterminate"])) : (y(), T("span", Bt)),
785
- i("span", Pt, A(a(O)) + "/" + A(a(C)), 1)
1722
+ }, 8, ["modelValue", "indeterminate"])) : (b(), M("span", Ho)),
1723
+ r("span", Uo, L(n(h)) + "/" + L(n(x)), 1)
786
1724
  ])
787
1725
  ]),
788
1726
  key: "0"
789
1727
  } : void 0,
790
- l.multiple ? {
1728
+ o.multiple ? {
791
1729
  name: "footer",
792
- fn: I(() => [
793
- i("div", Ft, [
794
- E(v, {
1730
+ fn: V(() => [
1731
+ r("div", Go, [
1732
+ z(v, {
795
1733
  type: "primary",
796
1734
  size: "small",
797
- onClick: $
1735
+ onClick: T
798
1736
  }, {
799
- default: I(() => [
800
- Q(A(h.confirmTxt), 1)
1737
+ default: V(() => [
1738
+ W(L(p.confirmTxt), 1)
801
1739
  ]),
802
1740
  _: 1
803
1741
  })
@@ -808,10 +1746,10 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
808
1746
  ]), 1040, ["model-value"]);
809
1747
  };
810
1748
  }
811
- }), Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1749
+ }), qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
812
1750
  __proto__: null,
813
- default: Dt
814
- }, Symbol.toStringTag, { value: "Module" })), Ht = { class: "flexMode hb vc" }, Ut = { key: 1 }, Jt = { class: "tag" }, qt = { class: "flexMode hr" }, Gt = /* @__PURE__ */ Object.assign({
1751
+ default: Jo
1752
+ }, Symbol.toStringTag, { value: "Module" })), Wo = { class: "flexMode hb vc" }, Yo = { key: 1 }, Zo = { class: "tag" }, Qo = { class: "flexMode hr" }, Xo = /* @__PURE__ */ Object.assign({
815
1753
  name: "MvcSelectV2",
816
1754
  inheritAttrs: !1
817
1755
  }, {
@@ -855,133 +1793,133 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
855
1793
  }
856
1794
  },
857
1795
  emits: ["update:modelValue", "change"],
858
- setup(h, { emit: b }) {
859
- const l = h, e = J(null), o = J([]), r = J(!1), d = J(!1), w = J(!1), g = b, k = (n) => {
860
- l.multiple ? (o.value = Array.isArray(n) ? [...n] : [], m()) : (g("update:modelValue", n), g("change", n));
861
- }, u = (n) => {
862
- if (r.value = n, n && l.multiple) {
863
- const p = l.modelValue;
864
- o.value = Array.isArray(p) ? [...p] : p ? [p] : [], m();
1796
+ setup(p, { emit: m }) {
1797
+ const o = p, e = G(null), t = G([]), s = G(!1), u = G(!1), C = G(!1), $ = m, y = (i) => {
1798
+ o.multiple ? (t.value = Array.isArray(i) ? [...i] : [], k()) : ($("update:modelValue", i), $("change", i));
1799
+ }, g = (i) => {
1800
+ if (s.value = i, i && o.multiple) {
1801
+ const f = o.modelValue;
1802
+ t.value = Array.isArray(f) ? [...f] : f ? [f] : [], k();
865
1803
  }
866
- }, x = () => {
1804
+ }, w = () => {
867
1805
  var v;
868
- if (!l.filterable || !r.value) return M();
869
- const n = e.value, p = ((v = n == null ? void 0 : n.filteredOptions) == null ? void 0 : v.value) ?? (n == null ? void 0 : n.filteredOptions) ?? [];
870
- if (!Array.isArray(p)) return M();
871
- const _ = l.valueKey;
872
- return p.filter((z) => z.type !== "Group" && !z.disabled).map((z) => typeof z == "object" ? z[_] : z);
873
- }, S = (n) => {
874
- w.value = !1;
875
- const p = x();
876
- if (n)
877
- o.value = [.../* @__PURE__ */ new Set([...o.value, ...p])];
1806
+ if (!o.filterable || !s.value) return A();
1807
+ const i = e.value, f = ((v = i == null ? void 0 : i.filteredOptions) == null ? void 0 : v.value) ?? (i == null ? void 0 : i.filteredOptions) ?? [];
1808
+ if (!Array.isArray(f)) return A();
1809
+ const S = o.valueKey;
1810
+ return f.filter((N) => N.type !== "Group" && !N.disabled).map((N) => typeof N == "object" ? N[S] : N);
1811
+ }, _ = (i) => {
1812
+ C.value = !1;
1813
+ const f = w();
1814
+ if (i)
1815
+ t.value = [.../* @__PURE__ */ new Set([...t.value, ...f])];
878
1816
  else {
879
- const _ = new Set(p);
880
- o.value = o.value.filter((v) => !_.has(v));
1817
+ const S = new Set(f);
1818
+ t.value = t.value.filter((v) => !S.has(v));
881
1819
  }
882
- }, $ = () => {
883
- var n, p;
884
- l.multiple && (g("update:modelValue", o.value), g("change", o.value), (p = (n = e.value) == null ? void 0 : n.blur) == null || p.call(n));
885
- }, M = () => {
886
- const n = l.valueKey;
887
- return (l.options || []).map((p) => typeof p == "object" ? p[n] : p);
888
- }, m = () => {
889
- const n = x(), p = new Set(o.value ?? []), _ = n.filter((z) => p.has(z)).length, v = n.length;
890
- d.value = v > 0 && _ === v, w.value = _ > 0 && _ < v;
891
- }, c = V(() => l.multiple && r.value ? o.value : l.modelValue), t = V(() => {
1820
+ }, T = () => {
1821
+ var i, f;
1822
+ o.multiple && ($("update:modelValue", t.value), $("change", t.value), (f = (i = e.value) == null ? void 0 : i.blur) == null || f.call(i));
1823
+ }, A = () => {
1824
+ const i = o.valueKey;
1825
+ return (o.options || []).map((f) => typeof f == "object" ? f[i] : f);
1826
+ }, k = () => {
1827
+ const i = w(), f = new Set(t.value ?? []), S = i.filter((N) => f.has(N)).length, v = i.length;
1828
+ u.value = v > 0 && S === v, C.value = S > 0 && S < v;
1829
+ }, d = O(() => o.multiple && s.value ? t.value : o.modelValue), a = O(() => {
892
1830
  const {
893
- modelValue: n,
894
- valueKey: p,
895
- labelKey: _,
1831
+ modelValue: i,
1832
+ valueKey: f,
1833
+ labelKey: S,
896
1834
  selectAllTxt: v,
897
- confirmTxt: z,
898
- nowrap: N,
1835
+ confirmTxt: N,
1836
+ nowrap: I,
899
1837
  ...P
900
- } = l, G = P.props ?? {};
1838
+ } = o, Z = P.props ?? {};
901
1839
  return {
902
1840
  ...P,
903
1841
  props: {
904
- ...G,
905
- value: p,
906
- label: _
1842
+ ...Z,
1843
+ value: f,
1844
+ label: S
907
1845
  }
908
1846
  };
909
- }), s = V(
910
- () => l.nowrap ? {
1847
+ }), l = O(
1848
+ () => o.nowrap ? {
911
1849
  collapseTags: !0,
912
1850
  collapseTagsTooltip: !0,
913
1851
  maxCollapseTags: 1,
914
1852
  tagTooltip: { popperStyle: { maxWidth: "400px" } }
915
1853
  } : {}
916
- ), f = V(() => ({
917
- ...s.value,
918
- ...ge(),
919
- ...t.value
920
- })), O = V(() => {
921
- const n = l.multiple && r.value ? o.value : l.modelValue, p = Array.isArray(n) ? n : n ? [n] : [];
922
- if (!l.filterable || !r.value) return p.length;
923
- const _ = x();
924
- return p.filter((v) => _.includes(v)).length;
925
- }), C = V(() => x().length);
926
- return le(o, () => m(), { deep: !0 }), le(
927
- () => l.modelValue,
928
- (n) => {
929
- if (l.multiple && r.value) {
930
- const p = Array.isArray(n) ? [...n] : n ? [n] : [];
931
- JSON.stringify(p) !== JSON.stringify(o.value) && (o.value = p, m());
1854
+ ), c = O(() => ({
1855
+ ...l.value,
1856
+ ...ve(),
1857
+ ...a.value
1858
+ })), h = O(() => {
1859
+ const i = o.multiple && s.value ? t.value : o.modelValue, f = Array.isArray(i) ? i : i ? [i] : [];
1860
+ if (!o.filterable || !s.value) return f.length;
1861
+ const S = w();
1862
+ return f.filter((v) => S.includes(v)).length;
1863
+ }), x = O(() => w().length);
1864
+ return ne(t, () => k(), { deep: !0 }), ne(
1865
+ () => o.modelValue,
1866
+ (i) => {
1867
+ if (o.multiple && s.value) {
1868
+ const f = Array.isArray(i) ? [...i] : i ? [i] : [];
1869
+ JSON.stringify(f) !== JSON.stringify(t.value) && (t.value = f, k());
932
1870
  }
933
1871
  }
934
- ), (n, p) => {
935
- const _ = K("el-checkbox"), v = K("el-button"), z = K("el-select-v2");
936
- return y(), D(z, se({
1872
+ ), (i, f) => {
1873
+ const S = E("el-checkbox"), v = E("el-button"), N = E("el-select-v2");
1874
+ return b(), B(N, oe({
937
1875
  ref_key: "selectRef",
938
1876
  ref: e,
939
- "model-value": a(c),
1877
+ "model-value": n(d),
940
1878
  class: "MvcSelectV2"
941
- }, a(f), {
942
- "onUpdate:modelValue": k,
943
- onVisibleChange: u
944
- }), fe({ _: 2 }, [
945
- l.filterable ? {
1879
+ }, n(c), {
1880
+ "onUpdate:modelValue": y,
1881
+ onVisibleChange: g
1882
+ }), ie({ _: 2 }, [
1883
+ o.filterable ? {
946
1884
  name: "header",
947
- fn: I(() => [
948
- i("div", Ht, [
949
- l.multiple ? (y(), D(_, {
1885
+ fn: V(() => [
1886
+ r("div", Wo, [
1887
+ o.multiple ? (b(), B(S, {
950
1888
  key: 0,
951
- modelValue: a(d),
952
- "onUpdate:modelValue": p[0] || (p[0] = (N) => Se(d) ? d.value = N : null),
953
- indeterminate: a(w),
1889
+ modelValue: n(u),
1890
+ "onUpdate:modelValue": f[0] || (f[0] = (I) => je(u) ? u.value = I : null),
1891
+ indeterminate: n(C),
954
1892
  class: "h24",
955
- onChange: S
1893
+ onChange: _
956
1894
  }, {
957
- default: I(() => [
958
- Q(A(h.selectAllTxt), 1)
1895
+ default: V(() => [
1896
+ W(L(p.selectAllTxt), 1)
959
1897
  ]),
960
1898
  _: 1
961
- }, 8, ["modelValue", "indeterminate"])) : (y(), T("span", Ut)),
962
- i("span", Jt, A(a(O)) + "/" + A(a(C)), 1)
1899
+ }, 8, ["modelValue", "indeterminate"])) : (b(), M("span", Yo)),
1900
+ r("span", Zo, L(n(h)) + "/" + L(n(x)), 1)
963
1901
  ])
964
1902
  ]),
965
1903
  key: "0"
966
1904
  } : void 0,
967
- n.$slots.default ? {
1905
+ i.$slots.default ? {
968
1906
  name: "default",
969
- fn: I((N) => [
970
- q(n.$slots, "default", ue(de(N)))
1907
+ fn: V((I) => [
1908
+ R(i.$slots, "default", de(fe(I)))
971
1909
  ]),
972
1910
  key: "1"
973
1911
  } : void 0,
974
- l.multiple ? {
1912
+ o.multiple ? {
975
1913
  name: "footer",
976
- fn: I(() => [
977
- i("div", qt, [
978
- E(v, {
1914
+ fn: V(() => [
1915
+ r("div", Qo, [
1916
+ z(v, {
979
1917
  type: "primary",
980
1918
  size: "small",
981
- onClick: $
1919
+ onClick: T
982
1920
  }, {
983
- default: I(() => [
984
- Q(A(h.confirmTxt), 1)
1921
+ default: V(() => [
1922
+ W(L(p.confirmTxt), 1)
985
1923
  ]),
986
1924
  _: 1
987
1925
  })
@@ -992,10 +1930,10 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
992
1930
  ]), 1040, ["model-value"]);
993
1931
  };
994
1932
  }
995
- }), Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1933
+ }), en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
996
1934
  __proto__: null,
997
- default: Gt
998
- }, Symbol.toStringTag, { value: "Module" })), Yt = Ce({
1935
+ default: Xo
1936
+ }, Symbol.toStringTag, { value: "Module" })), tn = Ie({
999
1937
  name: "MvcTableColumnFilter",
1000
1938
  props: {
1001
1939
  tableName: {
@@ -1011,87 +1949,87 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1011
1949
  default: !1
1012
1950
  }
1013
1951
  },
1014
- setup: (h, b) => {
1015
- var w;
1016
- const l = H({
1952
+ setup: (p, m) => {
1953
+ var C;
1954
+ const o = H({
1017
1955
  options: [],
1018
1956
  slots: []
1019
- }), e = h.tableName + "_Column";
1020
- let o = [];
1957
+ }), e = p.tableName + "_Column";
1958
+ let t = [];
1021
1959
  (() => {
1022
- const g = b.slots.default()[0].children, k = {
1960
+ const $ = m.slots.default()[0].children, y = {
1023
1961
  normal: [],
1024
1962
  mmp: [],
1025
1963
  asa: [],
1026
1964
  fixed: [],
1027
1965
  columns: []
1028
- }, u = h.tableName ? JSON.parse(localStorage.getItem(e)) : null, x = [void 0];
1029
- g.forEach(($) => {
1030
- window.$getType($.type) === "Symbol" ? o = o.concat($.children) : o.push($);
1031
- }), o.forEach(($, M) => {
1032
- var m;
1033
- if (window.$getType($.type), ((m = $.type) == null ? void 0 : m.name) === "ElTableColumn") {
1034
- let c = {
1035
- ...$.props,
1036
- sort: M,
1037
- nomove: $.props.nomove || $.props.nomove === "" || $.props.type === "selection" || $.props.label === "Operation",
1966
+ }, g = p.tableName ? JSON.parse(localStorage.getItem(e)) : null, w = [void 0];
1967
+ $.forEach((T) => {
1968
+ window.$getType(T.type) === "Symbol" ? t = t.concat(T.children) : t.push(T);
1969
+ }), t.forEach((T, A) => {
1970
+ var k;
1971
+ if (window.$getType(T.type), ((k = T.type) == null ? void 0 : k.name) === "ElTableColumn") {
1972
+ let d = {
1973
+ ...T.props,
1974
+ sort: A,
1975
+ nomove: T.props.nomove || T.props.nomove === "" || T.props.type === "selection" || T.props.label === "Operation",
1038
1976
  resizable: !0,
1039
- visible: $.props.visible !== !1
1977
+ visible: T.props.visible !== !1
1040
1978
  };
1041
- if (c.labelKey || (c.labelKey = c.label), c.label = window.$l(c.labelKey), h.column && (u != null && u.length) && x.indexOf($.props.prop) === -1) {
1042
- const { data: t } = u.filter1((s) => s.prop === $.props.prop);
1043
- t && (c.sort = t.sort, c.fixed = t.fixed, c.visible = t.visible);
1979
+ if (d.labelKey || (d.labelKey = d.label), d.label = window.$l(d.labelKey), p.column && (g != null && g.length) && w.indexOf(T.props.prop) === -1) {
1980
+ const { data: a } = g.filter1((l) => l.prop === T.props.prop);
1981
+ a && (d.sort = a.sort, d.fixed = a.fixed, d.visible = a.visible);
1044
1982
  }
1045
- $.props.fixed && k.fixed.push(c), $.props.type === "mmp" ? k.mmp.push(c) : $.props.type === "asa" ? k.asa.push(c) : k.normal.push(c), $.props = c;
1983
+ T.props.fixed && y.fixed.push(d), T.props.type === "mmp" ? y.mmp.push(d) : T.props.type === "asa" ? y.asa.push(d) : y.normal.push(d), T.props = d;
1046
1984
  }
1047
- }), l.columnInfo = k;
1048
- let S = [...k.normal, ...k.mmp, ...k.asa];
1049
- h.tableName && (S = S.sort(($, M) => $.sort - M.sort), localStorage.setItem(e, JSON.stringify(S)));
1985
+ }), o.columnInfo = y;
1986
+ let _ = [...y.normal, ...y.mmp, ...y.asa];
1987
+ p.tableName && (_ = _.sort((T, A) => T.sort - A.sort), localStorage.setItem(e, JSON.stringify(_)));
1050
1988
  })();
1051
- let d = [];
1052
- if (o.forEach((g) => {
1053
- window.$getType(g) !== "String" && g.props.visible && d.push(g);
1054
- }), (w = h.group) != null && w.label) {
1055
- const g = {
1056
- label: "Group By " + h.group.label,
1989
+ let u = [];
1990
+ if (t.forEach(($) => {
1991
+ window.$getType($) !== "String" && $.props.visible && u.push($);
1992
+ }), (C = p.group) != null && C.label) {
1993
+ const $ = {
1994
+ label: "Group By " + p.group.label,
1057
1995
  // prop: props.group.value,
1058
- width: h.group.width,
1996
+ width: p.group.width,
1059
1997
  fixed: "left",
1060
1998
  visible: !0,
1061
1999
  resizable: !0
1062
2000
  };
1063
- d[0].props.type === "selection" ? d.splice(1, 0, {
1064
- ...d[1],
1065
- props: g
1066
- }) : d.unshift({
1067
- ...d[0],
1068
- props: g
2001
+ u[0].props.type === "selection" ? u.splice(1, 0, {
2002
+ ...u[1],
2003
+ props: $
2004
+ }) : u.unshift({
2005
+ ...u[0],
2006
+ props: $
1069
2007
  });
1070
2008
  }
1071
- return d = d.sort((g, k) => g.props.sort - k.props.sort), () => d;
2009
+ return u = u.sort(($, y) => $.props.sort - y.props.sort), () => u;
1072
2010
  }
1073
- }), Zt = { class: "hp100 flexMode" }, Qt = { class: "w200 hp100 border-r fs14" }, Xt = { class: "flexMode vc h36 p8 bg-gray3 border-b txt-nowrap" }, el = { class: "p4" }, tl = ["onClick"], ll = {
2011
+ }), on = { class: "hp100 flexMode" }, nn = { class: "w200 hp100 border-r fs14" }, ln = { class: "flexMode vc h36 p8 bg-gray3 border-b txt-nowrap" }, sn = { class: "p4" }, an = ["onClick"], rn = {
1074
2012
  class: "flexMode vs hp100",
1075
2013
  style: { width: "calc(100% - 200px)" }
1076
- }, ol = { class: "wp50 border-r fs14" }, nl = { class: "flexMode vc g8 h36 p8 bg-gray3 border-b txt-nowrap" }, sl = { class: "tagArea blue small" }, al = { class: "p4" }, rl = {
2014
+ }, cn = { class: "wp50 border-r fs14" }, un = { class: "flexMode vc g8 h36 p8 bg-gray3 border-b txt-nowrap" }, dn = { class: "tagArea blue small" }, pn = { class: "p4" }, mn = {
1077
2015
  key: 0,
1078
2016
  class: "absCenter fs12 txt-dark5 txt-nowrap"
1079
- }, il = { class: "flexMode vc g8" }, cl = ["txt", "onClick"], ul = { class: "wp50 border-r fs14" }, dl = { class: "flexMode vc g8 h36 p8 bg-gray3 border-b txt-nowrap" }, pl = { class: "tagArea blue small" }, ml = {
2017
+ }, fn = { class: "flexMode vc g8" }, gn = ["txt", "onClick"], hn = { class: "wp50 border-r fs14" }, bn = { class: "flexMode vc g8 h36 p8 bg-gray3 border-b txt-nowrap" }, yn = { class: "tagArea blue small" }, vn = {
1080
2018
  class: "relative p4",
1081
2019
  style: { height: "calc(100% - 36px)" }
1082
- }, fl = {
2020
+ }, _n = {
1083
2021
  class: "relative",
1084
2022
  style: { height: "30%" }
1085
- }, gl = {
2023
+ }, wn = {
1086
2024
  key: 0,
1087
2025
  class: "absCenter fs12 txt-dark5 txt-nowrap"
1088
- }, hl = { class: "columnItem flexMode vc hb h40 g8 p4-8 mb4 radius4" }, yl = { class: "flexMode vc g8 txt-nowrap" }, bl = { class: "flexMode vc g8" }, vl = ["txt", "onClick"], _l = {
2026
+ }, $n = { class: "columnItem flexMode vc hb h40 g8 p4-8 mb4 radius4" }, xn = { class: "flexMode vc g8 txt-nowrap" }, Sn = { class: "flexMode vc g8" }, Cn = ["txt", "onClick"], kn = {
1089
2027
  class: "relative",
1090
2028
  style: { height: "calc(70% - 10px)" }
1091
- }, $l = {
2029
+ }, Tn = {
1092
2030
  key: 0,
1093
2031
  class: "absCenter fs12 txt-dark5 txt-nowrap"
1094
- }, xl = { class: "columnItem flexMode vc hb h40 g8 p4-8 mb4 radius4" }, Cl = { class: "flexMode vc g8 txt-nowrap" }, Sl = { class: "flexMode vc" }, wl = ["txt", "onClick"], kl = ["txt", "onClick"], Tl = /* @__PURE__ */ Object.assign({
2032
+ }, An = { class: "columnItem flexMode vc hb h40 g8 p4-8 mb4 radius4" }, Mn = { class: "flexMode vc g8 txt-nowrap" }, Vn = { class: "flexMode vc" }, On = ["txt", "onClick"], Ln = ["txt", "onClick"], In = /* @__PURE__ */ Object.assign({
1095
2033
  name: "MvcTableColumnConfig",
1096
2034
  inheritAttrs: !1
1097
2035
  }, {
@@ -1103,8 +2041,8 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1103
2041
  }
1104
2042
  },
1105
2043
  emits: "close",
1106
- setup(h, { emit: b }) {
1107
- const l = h, e = H({
2044
+ setup(p, { emit: m }) {
2045
+ const o = p, e = H({
1108
2046
  loading: !1,
1109
2047
  type: "normal",
1110
2048
  columns: {
@@ -1119,40 +2057,40 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1119
2057
  columnType: {},
1120
2058
  mounted: !1
1121
2059
  });
1122
- oe(() => {
1123
- r();
2060
+ ee(() => {
2061
+ s();
1124
2062
  });
1125
- const o = b, r = () => {
1126
- o("mounted");
1127
- const t = JSON.parse(localStorage.getItem(`${l.tableName}_Column`)), s = {};
1128
- t.forEach((f) => {
1129
- f.type && (s[f.type] = !0), f.visible ? f.type === "selection" ? e.selection.push(f) : f.type === "operation" ? e.operation.push(f) : f.label && (f.fixed ? e.fixed.push(f) : e.visible.push(f)) : f.type === "mmp" ? e.columns.mmp.push(f) : f.type === "asa" ? e.columns.asa.push(f) : e.columns.normal.push(f);
1130
- }), e.columnType = s;
1131
- }, d = (t) => {
1132
- e.type = t;
1133
- }, w = (t, s) => {
1134
- t.visible = !0, e.visible.unshift(t), t.type ? e.columns[t.type].splice(s, 1) : e.columns.normal.splice(s, 1);
1135
- }, g = (t, s) => {
1136
- e.fixed.unshift(t), e.visible.splice(s, 1);
1137
- }, k = (t, s) => {
1138
- e.visible.unshift(t), e.fixed.splice(s, 1);
1139
- }, u = (t, s) => {
1140
- e.visible.splice(s, 1), t.type ? e.columns[t.type].unshift(t) : e.columns.normal.unshift(t);
1141
- }, x = async () => {
2063
+ const t = m, s = () => {
2064
+ t("mounted");
2065
+ const a = JSON.parse(localStorage.getItem(`${o.tableName}_Column`)), l = {};
2066
+ a.forEach((c) => {
2067
+ c.type && (l[c.type] = !0), c.visible ? c.type === "selection" ? e.selection.push(c) : c.type === "operation" ? e.operation.push(c) : c.label && (c.fixed ? e.fixed.push(c) : e.visible.push(c)) : c.type === "mmp" ? e.columns.mmp.push(c) : c.type === "asa" ? e.columns.asa.push(c) : e.columns.normal.push(c);
2068
+ }), e.columnType = l;
2069
+ }, u = (a) => {
2070
+ e.type = a;
2071
+ }, C = (a, l) => {
2072
+ a.visible = !0, e.visible.unshift(a), a.type ? e.columns[a.type].splice(l, 1) : e.columns.normal.splice(l, 1);
2073
+ }, $ = (a, l) => {
2074
+ e.fixed.unshift(a), e.visible.splice(l, 1);
2075
+ }, y = (a, l) => {
2076
+ e.visible.unshift(a), e.fixed.splice(l, 1);
2077
+ }, g = (a, l) => {
2078
+ e.visible.splice(l, 1), a.type ? e.columns[a.type].unshift(a) : e.columns.normal.unshift(a);
2079
+ }, w = async () => {
1142
2080
  e.loading = !0, window.$pm(() => {
1143
- const { fixed: t, visible: s, columns: f, selection: O, operation: C } = e;
1144
- let n = [];
1145
- Object.keys(f).map((_) => {
1146
- n = n.concat(f[_]);
1147
- }), t.forEach((_) => _.fixed = "left"), n.forEach((_) => _.visible = !1);
1148
- const p = O.concat(t, s, n, C);
1149
- p.forEach((_, v) => _.sort = v), localStorage.setItem(`${l.tableName}_Column`, JSON.stringify(p)), e.loading = !1, o("close"), o("init-column");
2081
+ const { fixed: a, visible: l, columns: c, selection: h, operation: x } = e;
2082
+ let i = [];
2083
+ Object.keys(c).map((S) => {
2084
+ i = i.concat(c[S]);
2085
+ }), a.forEach((S) => S.fixed = "left"), i.forEach((S) => S.visible = !1);
2086
+ const f = h.concat(a, l, i, x);
2087
+ f.forEach((S, v) => S.sort = v), localStorage.setItem(`${o.tableName}_Column`, JSON.stringify(f)), e.loading = !1, t("close"), t("init-column");
1150
2088
  });
1151
- }, S = () => {
1152
- e.loading = !0, localStorage.removeItem(`${l.tableName}_Column`), window.$pm(() => {
1153
- e.loading = !1, o("close"), o("init-column");
2089
+ }, _ = () => {
2090
+ e.loading = !0, localStorage.removeItem(`${o.tableName}_Column`), window.$pm(() => {
2091
+ e.loading = !1, t("close"), t("init-column");
1154
2092
  }, 4);
1155
- }, $ = V(() => window.config.options.drawerHeight - 36 - 64), M = V(() => ($.value * 0.3).toFixed(0)), m = V(() => ($.value * 0.7 - 10).toFixed(0)), c = V(() => [
2093
+ }, T = O(() => window.config.options.drawerHeight - 36 - 64), A = O(() => (T.value * 0.3).toFixed(0)), k = O(() => (T.value * 0.7 - 10).toFixed(0)), d = O(() => [
1156
2094
  {
1157
2095
  label: "Base Info",
1158
2096
  value: "normal"
@@ -1168,52 +2106,52 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1168
2106
  hide: !e.columnType.mmp
1169
2107
  }
1170
2108
  ]);
1171
- return (t, s) => {
1172
- const f = K("el-scrollbar"), O = K("DrawerArea");
1173
- return y(), D(O, {
1174
- loading: a(e).loading,
2109
+ return (a, l) => {
2110
+ const c = E("el-scrollbar"), h = E("DrawerArea");
2111
+ return b(), B(h, {
2112
+ loading: n(e).loading,
1175
2113
  noscroll: "",
1176
2114
  "cancel-txt": "Reset",
1177
2115
  "cancel-icon": "im-sync",
1178
2116
  class: "MvcTableColumnConfig",
1179
- onCancel: S,
1180
- onSubmit: x
2117
+ onCancel: _,
2118
+ onSubmit: w
1181
2119
  }, {
1182
- default: I(() => [
1183
- i("div", Zt, [
1184
- i("div", Qt, [
1185
- i("div", Xt, A(t.$l("Column Type")), 1),
1186
- i("div", el, [
1187
- (y(!0), T(te, null, ne(a(c), (C) => (y(), T("div", {
1188
- key: C.value,
1189
- class: R(["typeItem p8-16 mb4 radius4 txt-nowrap", [a(e).type === C.value && "active", C.hide && "hide"]]),
1190
- onClick: (n) => d(C.value)
1191
- }, A(C.label), 11, tl))), 128))
2120
+ default: V(() => [
2121
+ r("div", on, [
2122
+ r("div", nn, [
2123
+ r("div", ln, L(a.$l("Column Type")), 1),
2124
+ r("div", sn, [
2125
+ (b(!0), M(Y, null, se(n(d), (x) => (b(), M("div", {
2126
+ key: x.value,
2127
+ class: F(["typeItem p8-16 mb4 radius4 txt-nowrap", [n(e).type === x.value && "active", x.hide && "hide"]]),
2128
+ onClick: (i) => u(x.value)
2129
+ }, L(x.label), 11, an))), 128))
1192
2130
  ])
1193
2131
  ]),
1194
- i("div", ll, [
1195
- i("div", ol, [
1196
- i("div", nl, [
1197
- i("span", null, A(t.$l("Columns")), 1),
1198
- i("span", sl, A(a(e).columns[a(e).type].length), 1)
2132
+ r("div", rn, [
2133
+ r("div", cn, [
2134
+ r("div", un, [
2135
+ r("span", null, L(a.$l("Columns")), 1),
2136
+ r("span", dn, L(n(e).columns[n(e).type].length), 1)
1199
2137
  ]),
1200
- E(f, { style: { height: "calc(100% - 36px)" } }, {
1201
- default: I(() => [
1202
- i("div", al, [
1203
- a(e).columns[a(e).type].length === 0 ? (y(), T("span", rl, A(t.$l("No Columns")), 1)) : B("", !0),
1204
- (y(!0), T(te, null, ne(a(e).columns[a(e).type], (C, n) => (y(), T("div", {
1205
- key: C.prop,
2138
+ z(c, { style: { height: "calc(100% - 36px)" } }, {
2139
+ default: V(() => [
2140
+ r("div", pn, [
2141
+ n(e).columns[n(e).type].length === 0 ? (b(), M("span", mn, L(a.$l("No Columns")), 1)) : K("", !0),
2142
+ (b(!0), M(Y, null, se(n(e).columns[n(e).type], (x, i) => (b(), M("div", {
2143
+ key: x.prop,
1206
2144
  class: "columnItem flexMode vc hb h40 g8 p4-8 mb4 radius4 txt-nowrap"
1207
2145
  }, [
1208
- i("span", null, A(t.$l(C.label)), 1),
1209
- i("div", il, [
1210
- i("div", {
2146
+ r("span", null, L(a.$l(x.label)), 1),
2147
+ r("div", fn, [
2148
+ r("div", {
1211
2149
  class: "tipbtn left",
1212
- txt: t.$l("Visible"),
1213
- onClick: (p) => w(C, n)
1214
- }, [...s[0] || (s[0] = [
1215
- i("i", { class: "imicon im-plus fs16" }, null, -1)
1216
- ])], 8, cl)
2150
+ txt: a.$l("Visible"),
2151
+ onClick: (f) => C(x, i)
2152
+ }, [...l[0] || (l[0] = [
2153
+ r("i", { class: "imicon im-plus fs16" }, null, -1)
2154
+ ])], 8, gn)
1217
2155
  ])
1218
2156
  ]))), 128))
1219
2157
  ])
@@ -1221,36 +2159,36 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1221
2159
  _: 1
1222
2160
  })
1223
2161
  ]),
1224
- i("div", ul, [
1225
- i("div", dl, [
1226
- i("span", null, A(t.$l("Visible Columns")), 1),
1227
- i("span", pl, A(a(e).visible.length), 1)
2162
+ r("div", hn, [
2163
+ r("div", bn, [
2164
+ r("span", null, L(a.$l("Visible Columns")), 1),
2165
+ r("span", yn, L(n(e).visible.length), 1)
1228
2166
  ]),
1229
- i("div", ml, [
1230
- i("div", fl, [
1231
- a(e).fixed.length === 0 ? (y(), T("span", gl, A(t.$l("No Fixed Columns")), 1)) : B("", !0),
1232
- E(f, { height: a(M) }, {
1233
- default: I(() => [
1234
- E(a(ve), {
1235
- list: a(e).fixed,
1236
- "item-key": (C) => C,
2167
+ r("div", vn, [
2168
+ r("div", _n, [
2169
+ n(e).fixed.length === 0 ? (b(), M("span", wn, L(a.$l("No Fixed Columns")), 1)) : K("", !0),
2170
+ z(c, { height: n(A) }, {
2171
+ default: V(() => [
2172
+ z(n(Se), {
2173
+ list: n(e).fixed,
2174
+ "item-key": (x) => x,
1237
2175
  handle: ".im-handle",
1238
2176
  "ghost-class": "ghost"
1239
2177
  }, {
1240
- item: I(({ element: C, index: n }) => [
1241
- i("div", hl, [
1242
- i("div", yl, [
1243
- s[1] || (s[1] = i("i", { class: "imicon im-handle cursor-grab" }, null, -1)),
1244
- i("span", null, A(t.$l(C.label)), 1)
2178
+ item: V(({ element: x, index: i }) => [
2179
+ r("div", $n, [
2180
+ r("div", xn, [
2181
+ l[1] || (l[1] = r("i", { class: "imicon im-handle cursor-grab" }, null, -1)),
2182
+ r("span", null, L(a.$l(x.label)), 1)
1245
2183
  ]),
1246
- i("div", bl, [
1247
- i("div", {
2184
+ r("div", Sn, [
2185
+ r("div", {
1248
2186
  class: "tipbtn red left",
1249
- txt: t.$l("Unfixed"),
1250
- onClick: (p) => k(C, n)
1251
- }, [...s[2] || (s[2] = [
1252
- i("i", { class: "imicon im-download1 fs14" }, null, -1)
1253
- ])], 8, vl)
2187
+ txt: a.$l("Unfixed"),
2188
+ onClick: (f) => y(x, i)
2189
+ }, [...l[2] || (l[2] = [
2190
+ r("i", { class: "imicon im-download1 fs14" }, null, -1)
2191
+ ])], 8, Cn)
1254
2192
  ])
1255
2193
  ])
1256
2194
  ]),
@@ -1260,41 +2198,41 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1260
2198
  _: 1
1261
2199
  }, 8, ["height"])
1262
2200
  ]),
1263
- s[6] || (s[6] = i("div", { class: "p4-0" }, [
1264
- i("div", { class: "border-t" })
2201
+ l[6] || (l[6] = r("div", { class: "p4-0" }, [
2202
+ r("div", { class: "border-t" })
1265
2203
  ], -1)),
1266
- i("div", _l, [
1267
- a(e).visible.length === 0 ? (y(), T("span", $l, A(t.$l("No Columns")), 1)) : B("", !0),
1268
- E(f, { height: a(m) }, {
1269
- default: I(() => [
1270
- E(a(ve), {
1271
- list: a(e).visible,
1272
- "item-key": (C) => C,
2204
+ r("div", kn, [
2205
+ n(e).visible.length === 0 ? (b(), M("span", Tn, L(a.$l("No Columns")), 1)) : K("", !0),
2206
+ z(c, { height: n(k) }, {
2207
+ default: V(() => [
2208
+ z(n(Se), {
2209
+ list: n(e).visible,
2210
+ "item-key": (x) => x,
1273
2211
  options: { lockAxis: "y" },
1274
2212
  handle: ".im-handle",
1275
2213
  "ghost-class": "ghost"
1276
2214
  }, {
1277
- item: I(({ element: C, index: n }) => [
1278
- i("div", xl, [
1279
- i("div", Cl, [
1280
- s[3] || (s[3] = i("i", { class: "imicon im-handle cursor-grab" }, null, -1)),
1281
- i("span", null, A(t.$l(C.label)), 1)
2215
+ item: V(({ element: x, index: i }) => [
2216
+ r("div", An, [
2217
+ r("div", Mn, [
2218
+ l[3] || (l[3] = r("i", { class: "imicon im-handle cursor-grab" }, null, -1)),
2219
+ r("span", null, L(a.$l(x.label)), 1)
1282
2220
  ]),
1283
- i("div", Sl, [
1284
- i("div", {
2221
+ r("div", Vn, [
2222
+ r("div", {
1285
2223
  class: "tipbtn left",
1286
- txt: t.$l("Fixed"),
1287
- onClick: (p) => g(C, n)
1288
- }, [...s[4] || (s[4] = [
1289
- i("i", { class: "imicon im-download1 fs14 rotateZ180" }, null, -1)
1290
- ])], 8, wl),
1291
- i("div", {
2224
+ txt: a.$l("Fixed"),
2225
+ onClick: (f) => $(x, i)
2226
+ }, [...l[4] || (l[4] = [
2227
+ r("i", { class: "imicon im-download1 fs14 rotateZ180" }, null, -1)
2228
+ ])], 8, On),
2229
+ r("div", {
1292
2230
  class: "tipbtn red left",
1293
- txt: t.$l("Hide"),
1294
- onClick: (p) => u(C, n)
1295
- }, [...s[5] || (s[5] = [
1296
- i("i", { class: "imicon im-close fs14" }, null, -1)
1297
- ])], 8, kl)
2231
+ txt: a.$l("Hide"),
2232
+ onClick: (f) => g(x, i)
2233
+ }, [...l[5] || (l[5] = [
2234
+ r("i", { class: "imicon im-close fs14" }, null, -1)
2235
+ ])], 8, Ln)
1298
2236
  ])
1299
2237
  ])
1300
2238
  ]),
@@ -1313,10 +2251,10 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1313
2251
  }, 8, ["loading"]);
1314
2252
  };
1315
2253
  }
1316
- }), Ml = /* @__PURE__ */ X(Tl, [["__scopeId", "data-v-01691821"]]), Al = { class: "p16 border-b" }, Vl = { class: "flexMode vc g8" }, Ol = {
2254
+ }), jn = /* @__PURE__ */ J(In, [["__scopeId", "data-v-01691821"]]), zn = { class: "p16 border-b" }, En = { class: "flexMode vc g8" }, Nn = {
1317
2255
  key: 0,
1318
2256
  class: "flexMode vc g8"
1319
- }, jl = { class: "flexMode g16 hr vc" }, Il = { class: "TheEnd p16" }, Nl = { class: "sticky flexMode vc hb p4-8 mt16 mb8 fs14 txt-dark9 z9 backdrop border-l4-primary bg-gray3 radius4" }, zl = { class: "fw700" }, El = { class: "flexMode vc g8" }, Kl = /* @__PURE__ */ Object.assign({
2257
+ }, Kn = { class: "flexMode g16 hr vc" }, Fn = { class: "TheEnd p16" }, Dn = { class: "sticky flexMode vc hb p4-8 mt16 mb8 fs14 txt-dark9 z9 backdrop border-l4-primary bg-gray3 radius4" }, Bn = { class: "fw700" }, Pn = { class: "flexMode vc g8" }, Rn = /* @__PURE__ */ Object.assign({
1320
2258
  name: "MvcTableColumnDownload",
1321
2259
  inheritAttrs: !1
1322
2260
  }, {
@@ -1336,8 +2274,8 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1336
2274
  }
1337
2275
  },
1338
2276
  emits: ["mounted"],
1339
- setup(h, { emit: b }) {
1340
- const l = h, e = H({
2277
+ setup(p, { emit: m }) {
2278
+ const o = p, e = H({
1341
2279
  loading: !1,
1342
2280
  columns: [],
1343
2281
  checked: [],
@@ -1345,101 +2283,101 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1345
2283
  onlySelection: !1,
1346
2284
  mounted: !1
1347
2285
  });
1348
- oe(() => {
1349
- r();
2286
+ ee(() => {
2287
+ s();
1350
2288
  });
1351
- const o = b, r = () => {
1352
- o("mounted"), d(), w();
1353
- }, d = () => {
1354
- const c = JSON.parse(localStorage.getItem(`${l.tableName}_Column`)), t = ["selection", "operation"];
1355
- e.columns = c.filter((s) => !t.includes(s.type) && s.label);
1356
- }, w = () => {
1357
- l.selection.length && (e.onlySelection = !0);
1358
- }, g = (c, t) => {
1359
- c ? t.children.forEach((s) => {
1360
- s.visible = !0;
1361
- }) : t.children.forEach((s) => {
1362
- s.visible = !1;
2289
+ const t = m, s = () => {
2290
+ t("mounted"), u(), C();
2291
+ }, u = () => {
2292
+ const d = JSON.parse(localStorage.getItem(`${o.tableName}_Column`)), a = ["selection", "operation"];
2293
+ e.columns = d.filter((l) => !a.includes(l.type) && l.label);
2294
+ }, C = () => {
2295
+ o.selection.length && (e.onlySelection = !0);
2296
+ }, $ = (d, a) => {
2297
+ d ? a.children.forEach((l) => {
2298
+ l.visible = !0;
2299
+ }) : a.children.forEach((l) => {
2300
+ l.visible = !1;
1363
2301
  });
1364
- }, k = () => {
1365
- window.$copy(x());
1366
- }, u = async () => {
2302
+ }, y = () => {
2303
+ window.$copy(w());
2304
+ }, g = async () => {
1367
2305
  e.loading = !0;
1368
2306
  try {
1369
- const c = x("download");
1370
- let t = e.fileName || S.value;
1371
- t && !t.toLowerCase().endsWith(".csv") && (t = `${t}.csv`), await Ee({ content: c, filename: t, bom: !0 });
2307
+ const d = w("download");
2308
+ let a = e.fileName || _.value;
2309
+ a && !a.toLowerCase().endsWith(".csv") && (a = `${a}.csv`), await Qe({ content: d, filename: a, bom: !0 });
1372
2310
  } finally {
1373
2311
  e.loading = !1;
1374
2312
  }
1375
- }, x = (c) => {
1376
- const t = e.onlySelection ? l.selection : l.list, s = {}, f = [];
2313
+ }, w = (d) => {
2314
+ const a = e.onlySelection ? o.selection : o.list, l = {}, c = [];
1377
2315
  e.columns.filter((v) => v.visible).forEach((v) => {
1378
- f.push(window.$l(v.label)), s[v.prop] = !0;
2316
+ c.push(window.$l(v.label)), l[v.prop] = !0;
1379
2317
  });
1380
- let O = "", C = [], n = c === "download" ? "," : " ";
1381
- (e.useHead || c) && (O = f.join(n) + `
2318
+ let h = "", x = [], i = d === "download" ? "," : " ";
2319
+ (e.useHead || d) && (h = c.join(i) + `
1382
2320
  `);
1383
- let p = [], _;
1384
- return Object.keys(s).forEach((v, z) => {
1385
- v.includes("country") && (_ = z);
1386
- const N = [];
1387
- t.forEach((P) => {
1388
- P[v] !== void 0 && N.push(P[v]);
1389
- }), p.push(N);
1390
- }), p.forEach((v, z) => {
1391
- !e.useCountryCode && _ === z ? v.forEach((N, P) => {
1392
- let G = N;
1393
- window.$getType(N) === "Array" ? G = N.map((ie) => m[ie.toUpperCase()].label.$l()).join(",") : window.$getType(N) === "String" ? G = N.split(",").map((ie) => m[ie.toUpperCase()].label.$l()).join(",") : G = JSON.stringify(N), C[P] ? C[P] += G + n : C[P] = G + n;
1394
- }) : v.forEach((N, P) => {
1395
- C[P] ? C[P] += N + n : C[P] = N + n;
2321
+ let f = [], S;
2322
+ return Object.keys(l).forEach((v, N) => {
2323
+ v.includes("country") && (S = N);
2324
+ const I = [];
2325
+ a.forEach((P) => {
2326
+ P[v] !== void 0 && I.push(P[v]);
2327
+ }), f.push(I);
2328
+ }), f.forEach((v, N) => {
2329
+ !e.useCountryCode && S === N ? v.forEach((I, P) => {
2330
+ let Z = I;
2331
+ window.$getType(I) === "Array" ? Z = I.map((ue) => k[ue.toUpperCase()].label.$l()).join(",") : window.$getType(I) === "String" ? Z = I.split(",").map((ue) => k[ue.toUpperCase()].label.$l()).join(",") : Z = JSON.stringify(I), x[P] ? x[P] += Z + i : x[P] = Z + i;
2332
+ }) : v.forEach((I, P) => {
2333
+ x[P] ? x[P] += I + i : x[P] = I + i;
1396
2334
  });
1397
- }), `${O}${C.join(`
2335
+ }), `${h}${x.join(`
1398
2336
  `)}`;
1399
- }, S = V(() => {
1400
- const c = window.$m().format("YYYYMMDDHHmmss");
1401
- return `${l.tableName}_${c}`;
1402
- }), $ = V(() => {
1403
- const c = {};
1404
- return e.columns.forEach((t) => {
1405
- const s = t.type ? t.type : "normal", f = {
1406
- label: M[s],
1407
- type: s,
2337
+ }, _ = O(() => {
2338
+ const d = window.$m().format("YYYYMMDDHHmmss");
2339
+ return `${o.tableName}_${d}`;
2340
+ }), T = O(() => {
2341
+ const d = {};
2342
+ return e.columns.forEach((a) => {
2343
+ const l = a.type ? a.type : "normal", c = {
2344
+ label: A[l],
2345
+ type: l,
1408
2346
  visible: 0
1409
2347
  };
1410
- c[s] ? (c[s].children.push(t), t.visible && c[s].visible++) : (f.children = [t], t.visible && f.visible++, c[s] = f);
1411
- }), Object.keys(c).forEach((t) => {
1412
- const s = c[t].visible === c[t].children.length, f = c[t].visible === 0;
1413
- s ? (c[t].checkstatus = !0, c[t].indeterminate = !1) : f ? (c[t].checkstatus = !1, c[t].indeterminate = !1) : (c[t].checkstatus = !1, c[t].indeterminate = !0);
1414
- }), c;
1415
- }), M = {
2348
+ d[l] ? (d[l].children.push(a), a.visible && d[l].visible++) : (c.children = [a], a.visible && c.visible++, d[l] = c);
2349
+ }), Object.keys(d).forEach((a) => {
2350
+ const l = d[a].visible === d[a].children.length, c = d[a].visible === 0;
2351
+ l ? (d[a].checkstatus = !0, d[a].indeterminate = !1) : c ? (d[a].checkstatus = !1, d[a].indeterminate = !1) : (d[a].checkstatus = !1, d[a].indeterminate = !0);
2352
+ }), d;
2353
+ }), A = {
1416
2354
  asa: "Asa Metrics",
1417
2355
  normal: "Base Info",
1418
2356
  mmp: "MMP Metrics"
1419
2357
  };
1420
2358
  "Check All".$l(), "Cancel All".$l();
1421
- const m = useMap("asa.countryAll.obj");
1422
- return (c, t) => {
1423
- const s = K("el-checkbox"), f = K("el-button"), O = K("MvcAlert"), C = K("el-switch"), n = K("Input"), p = K("DrawerArea");
1424
- return y(), D(p, se(c.$attrs, { class: "MvcTableColumnDownload" }), {
1425
- cancel: I(() => [
1426
- E(n, {
1427
- modelValue: a(e).fileName,
1428
- "onUpdate:modelValue": t[3] || (t[3] = (_) => a(e).fileName = _),
2359
+ const k = useMap("asa.countryAll.obj");
2360
+ return (d, a) => {
2361
+ const l = E("el-checkbox"), c = E("el-button"), h = E("MvcAlert"), x = E("el-switch"), i = E("Input"), f = E("DrawerArea");
2362
+ return b(), B(f, oe(d.$attrs, { class: "MvcTableColumnDownload" }), {
2363
+ cancel: V(() => [
2364
+ z(i, {
2365
+ modelValue: n(e).fileName,
2366
+ "onUpdate:modelValue": a[3] || (a[3] = (S) => n(e).fileName = S),
1429
2367
  icon: "catalog",
1430
- placeholder: a(S),
2368
+ placeholder: n(_),
1431
2369
  class: "w600"
1432
2370
  }, {
1433
- append: I(() => [
1434
- E(f, {
1435
- loading: a(e).loading,
1436
- onClick: u
2371
+ append: V(() => [
2372
+ z(c, {
2373
+ loading: n(e).loading,
2374
+ onClick: g
1437
2375
  }, {
1438
- icon: I(() => [...t[5] || (t[5] = [
1439
- i("i", { class: "imicon im-download1" }, null, -1)
2376
+ icon: V(() => [...a[5] || (a[5] = [
2377
+ r("i", { class: "imicon im-download1" }, null, -1)
1440
2378
  ])]),
1441
- default: I(() => [
1442
- Q(" " + A(c.$l("Download")), 1)
2379
+ default: V(() => [
2380
+ W(" " + L(d.$l("Download")), 1)
1443
2381
  ]),
1444
2382
  _: 1
1445
2383
  }, 8, ["loading"])
@@ -1447,80 +2385,80 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1447
2385
  _: 1
1448
2386
  }, 8, ["modelValue", "placeholder"])
1449
2387
  ]),
1450
- submit: I(() => [...t[6] || (t[6] = [])]),
1451
- default: I(() => [
1452
- i("div", Al, [
1453
- E(O, null, {
1454
- default: I(() => [
1455
- i("div", Vl, [
1456
- i("span", null, A(c.$l("Total")), 1),
1457
- i("span", null, A(l.list.length), 1)
2388
+ submit: V(() => [...a[6] || (a[6] = [])]),
2389
+ default: V(() => [
2390
+ r("div", zn, [
2391
+ z(h, null, {
2392
+ default: V(() => [
2393
+ r("div", En, [
2394
+ r("span", null, L(d.$l("Total")), 1),
2395
+ r("span", null, L(o.list.length), 1)
1458
2396
  ]),
1459
- l.selection.length ? (y(), T("div", Ol, [
1460
- i("span", null, A(c.$l("Selection")), 1),
1461
- i("span", null, A(l.selection.length), 1),
1462
- E(s, {
1463
- modelValue: a(e).onlySelection,
1464
- "onUpdate:modelValue": t[0] || (t[0] = (_) => a(e).onlySelection = _),
1465
- label: c.$l("Only Selection")
2397
+ o.selection.length ? (b(), M("div", Nn, [
2398
+ r("span", null, L(d.$l("Selection")), 1),
2399
+ r("span", null, L(o.selection.length), 1),
2400
+ z(l, {
2401
+ modelValue: n(e).onlySelection,
2402
+ "onUpdate:modelValue": a[0] || (a[0] = (S) => n(e).onlySelection = S),
2403
+ label: d.$l("Only Selection")
1466
2404
  }, null, 8, ["modelValue", "label"])
1467
- ])) : B("", !0),
1468
- i("div", jl, [
1469
- E(f, { onClick: k }, {
1470
- icon: I(() => [...t[4] || (t[4] = [
1471
- i("i", { class: "imicon im-copy" }, null, -1)
2405
+ ])) : K("", !0),
2406
+ r("div", Kn, [
2407
+ z(c, { onClick: y }, {
2408
+ icon: V(() => [...a[4] || (a[4] = [
2409
+ r("i", { class: "imicon im-copy" }, null, -1)
1472
2410
  ])]),
1473
- default: I(() => [
1474
- Q(" " + A(c.$l("Copy to Clipboard")), 1)
2411
+ default: V(() => [
2412
+ W(" " + L(d.$l("Copy to Clipboard")), 1)
1475
2413
  ]),
1476
2414
  _: 1
1477
2415
  }),
1478
- E(s, {
1479
- modelValue: a(e).useHead,
1480
- "onUpdate:modelValue": t[1] || (t[1] = (_) => a(e).useHead = _),
1481
- label: c.$l("With Table Head")
2416
+ z(l, {
2417
+ modelValue: n(e).useHead,
2418
+ "onUpdate:modelValue": a[1] || (a[1] = (S) => n(e).useHead = S),
2419
+ label: d.$l("With Table Head")
1482
2420
  }, null, 8, ["modelValue", "label"])
1483
2421
  ])
1484
2422
  ]),
1485
2423
  _: 1
1486
2424
  })
1487
2425
  ]),
1488
- i("div", Il, [
1489
- (y(!0), T(te, null, ne(a($), (_) => (y(), T("div", {
1490
- key: _.type
2426
+ r("div", Fn, [
2427
+ (b(!0), M(Y, null, se(n(T), (S) => (b(), M("div", {
2428
+ key: S.type
1491
2429
  }, [
1492
- i("div", Nl, [
1493
- i("span", zl, A(_.label), 1),
1494
- E(s, {
1495
- modelValue: _.checkstatus,
1496
- "onUpdate:modelValue": (v) => _.checkstatus = v,
1497
- indeterminate: _.indeterminate,
1498
- label: c.$l("Check"),
1499
- onChange: (v) => g(v, _)
2430
+ r("div", Dn, [
2431
+ r("span", Bn, L(S.label), 1),
2432
+ z(l, {
2433
+ modelValue: S.checkstatus,
2434
+ "onUpdate:modelValue": (v) => S.checkstatus = v,
2435
+ indeterminate: S.indeterminate,
2436
+ label: d.$l("Check"),
2437
+ onChange: (v) => $(v, S)
1500
2438
  }, null, 8, ["modelValue", "onUpdate:modelValue", "indeterminate", "label", "onChange"])
1501
2439
  ]),
1502
- (y(!0), T(te, null, ne(_.children, (v, z) => (y(), D(s, {
2440
+ (b(!0), M(Y, null, se(S.children, (v, N) => (b(), B(l, {
1503
2441
  modelValue: v.visible,
1504
- "onUpdate:modelValue": (N) => v.visible = N,
1505
- key: z,
2442
+ "onUpdate:modelValue": (I) => v.visible = I,
2443
+ key: N,
1506
2444
  label: v.label,
1507
2445
  value: v.value,
1508
2446
  class: "fullCheckbox p8-12 mb4 radius2 hover-txt-primary hover-bg-gray3"
1509
2447
  }, {
1510
- default: I(() => {
1511
- var N;
2448
+ default: V(() => {
2449
+ var I;
1512
2450
  return [
1513
- i("div", El, [
1514
- i("span", null, A(v.label), 1),
1515
- (N = v.prop) != null && N.includes("country") ? (y(), D(C, {
2451
+ r("div", Pn, [
2452
+ r("span", null, L(v.label), 1),
2453
+ (I = v.prop) != null && I.includes("country") ? (b(), B(x, {
1516
2454
  key: 0,
1517
- modelValue: a(e).useCountryCode,
1518
- "onUpdate:modelValue": t[2] || (t[2] = (P) => a(e).useCountryCode = P),
2455
+ modelValue: n(e).useCountryCode,
2456
+ "onUpdate:modelValue": a[2] || (a[2] = (P) => n(e).useCountryCode = P),
1519
2457
  "inline-prompt": "",
1520
2458
  "active-text": "Use Alpha-2 Code",
1521
2459
  "inactive-text": "Use Country Name",
1522
2460
  class: "primarySwitch"
1523
- }, null, 8, ["modelValue"])) : B("", !0)
2461
+ }, null, 8, ["modelValue"])) : K("", !0)
1524
2462
  ])
1525
2463
  ];
1526
2464
  }),
@@ -1533,13 +2471,13 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1533
2471
  }, 16);
1534
2472
  };
1535
2473
  }
1536
- }), Ll = { class: "MvcTable" }, Bl = {
2474
+ }), Hn = { class: "MvcTable" }, Un = {
1537
2475
  key: 0,
1538
2476
  class: "flexMode vc"
1539
- }, Pl = { class: "tableArea relative radius ctx-auto" }, Fl = {
2477
+ }, Gn = { class: "tableArea relative radius ctx-auto" }, Jn = {
1540
2478
  key: 1,
1541
2479
  class: "flexMode vc h56 p16 xscroll nobar fadeout"
1542
- }, Dl = /* @__PURE__ */ Object.assign({
2480
+ }, qn = /* @__PURE__ */ Object.assign({
1543
2481
  name: "MvcTable",
1544
2482
  inheritAttrs: !1
1545
2483
  }, {
@@ -1624,11 +2562,11 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1624
2562
  }
1625
2563
  },
1626
2564
  emits: ["selection-change", "refresh"],
1627
- setup(h, { expose: b, emit: l }) {
1628
- const e = h, o = H({
2565
+ setup(p, { expose: m, emit: o }) {
2566
+ const e = p, t = H({
1629
2567
  loading: !0,
1630
2568
  selection: []
1631
- }), r = H({
2569
+ }), s = H({
1632
2570
  list: [],
1633
2571
  total: 0,
1634
2572
  page: 1,
@@ -1637,190 +2575,190 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1637
2575
  summaryType: "remote",
1638
2576
  nopagination: !1,
1639
2577
  params: {}
1640
- }), d = H({
2578
+ }), u = H({
1641
2579
  tabelKey: 0,
1642
2580
  current: "",
1643
2581
  list: [
1644
2582
  {
1645
2583
  title: "Table Column Customization",
1646
2584
  size: 1024,
1647
- cpt: ye(Ml)
2585
+ cpt: me(jn)
1648
2586
  },
1649
2587
  {
1650
2588
  title: "Download from Current Table",
1651
- cpt: ye(Kl)
2589
+ cpt: me(Rn)
1652
2590
  }
1653
2591
  ]
1654
- }), w = J(null), { proxy: g } = re();
1655
- Ie(() => {
1656
- u();
1657
- }), oe(() => {
1658
- x();
2592
+ }), C = G(null), { proxy: $ } = ae();
2593
+ We(() => {
2594
+ g();
2595
+ }), ee(() => {
2596
+ w();
1659
2597
  });
1660
- const k = l, u = () => {
1661
- o.loading = e.defaultLoading, e.pageSize && (r.pageSize = e.pageSize);
1662
- }, x = () => {
1663
- _(), e.defer === !1 && $();
1664
- }, S = (j) => {
1665
- $(j);
1666
- }, $ = async (j = {}) => {
1667
- if (j.refresh && o.loading)
2598
+ const y = o, g = () => {
2599
+ t.loading = e.defaultLoading, e.pageSize && (s.pageSize = e.pageSize);
2600
+ }, w = () => {
2601
+ S(), e.defer === !1 && T();
2602
+ }, _ = (j) => {
2603
+ T(j);
2604
+ }, T = async (j = {}) => {
2605
+ if (j.refresh && t.loading)
1668
2606
  return;
1669
- o.loading = !0;
1670
- const L = {
1671
- pageSize: j.pageSize || r.pageSize,
1672
- pageStart: j.pageStart || r.page
2607
+ t.loading = !0;
2608
+ const D = {
2609
+ pageSize: j.pageSize || s.pageSize,
2610
+ pageStart: j.pageStart || s.page
1673
2611
  };
1674
- j.refresh && (L.remote = !0);
1675
- const { list: W = [], total: F, summary: U } = await e.loadData(L) || {};
1676
- r.list = W.map((Z, ee) => (Z.index = ee, Z)), F === void 0 ? (r.total = r.list.length, r.nopagination = !0) : (r.total = F, r.nopagination = !1), window.config.table.scrollToTop && c(), M(U), o.loading = !1;
1677
- }, M = (j) => {
1678
- j ? r.summary = j : r.summary = !1;
1679
- }, m = (j) => {
1680
- if (r.summaryType === "locale")
2612
+ j.refresh && (D.remote = !0);
2613
+ const { list: Q = [], total: U, summary: q } = await e.loadData(D) || {};
2614
+ s.list = Q.map((te, le) => (te.index = le, te)), U === void 0 ? (s.total = s.list.length, s.nopagination = !0) : (s.total = U, s.nopagination = !1), window.config.table.scrollToTop && d(), A(q), t.loading = !1;
2615
+ }, A = (j) => {
2616
+ j ? s.summary = j : s.summary = !1;
2617
+ }, k = (j) => {
2618
+ if (s.summaryType === "locale")
1681
2619
  return [];
1682
- if (r.summaryType === "remote") {
1683
- const L = (F, U) => {
1684
- if (F != null)
1685
- return typeof F == "function" ? F(U) : F[U];
1686
- }, W = (F) => {
1687
- var Z, ee;
1688
- const U = L(e.summaryMetric, F);
1689
- return U !== void 0 ? U : L((ee = (Z = globalThis.$config) == null ? void 0 : Z.table) == null ? void 0 : ee.summaryMetric, F);
2620
+ if (s.summaryType === "remote") {
2621
+ const D = (U, q) => {
2622
+ if (U != null)
2623
+ return typeof U == "function" ? U(q) : U[q];
2624
+ }, Q = (U) => {
2625
+ var te, le;
2626
+ const q = D(e.summaryMetric, U);
2627
+ return q !== void 0 ? q : D((le = (te = globalThis.$config) == null ? void 0 : te.table) == null ? void 0 : le.summaryMetric, U);
1690
2628
  };
1691
- return Ke(j, r.summary, { resolveMetric: W });
2629
+ return Xe(j, s.summary, { resolveMetric: Q });
1692
2630
  }
1693
2631
  return [];
1694
- }, c = () => {
1695
- w.value.$refs.scrollBarRef.setScrollTop(0);
1696
- }, t = () => {
1697
- $({
2632
+ }, d = () => {
2633
+ C.value.$refs.scrollBarRef.setScrollTop(0);
2634
+ }, a = () => {
2635
+ T({
1698
2636
  pageStart: 1
1699
2637
  });
1700
- }, s = () => {
1701
- $();
1702
- }, f = (j) => {
1703
- if (o.selection = j, k("selection-change", j), o.shiftKey) {
1704
- const L = j[j.length - 2], W = j[j.length - 1], F = r.list.filter1((Y) => Y.id === L.id).index || 0, U = r.list.filter1((Y) => Y.id === W.id).index;
1705
- let Z = F, ee = U;
1706
- F > U && (Z = U, ee = F);
1707
- for (let Y = Z; Y <= ee; Y++)
1708
- g.$refs.body.toggleRowSelection(r.list[Y], !0);
2638
+ }, l = () => {
2639
+ T();
2640
+ }, c = (j) => {
2641
+ if (t.selection = j, y("selection-change", j), t.shiftKey) {
2642
+ const D = j[j.length - 2], Q = j[j.length - 1], U = s.list.filter1((X) => X.id === D.id).index || 0, q = s.list.filter1((X) => X.id === Q.id).index;
2643
+ let te = U, le = q;
2644
+ U > q && (te = q, le = U);
2645
+ for (let X = te; X <= le; X++)
2646
+ $.$refs.body.toggleRowSelection(s.list[X], !0);
1709
2647
  }
1710
- }, O = () => {
1711
- o.loading || ($({ refresh: !0 }), k("refresh"));
1712
- }, C = () => {
1713
- d.current = 0;
1714
- }, n = () => {
1715
- d.current = 1;
1716
- }, p = () => {
1717
- o.tableKey++;
1718
- }, _ = () => {
1719
- document.addEventListener("keydown", v), document.addEventListener("keyup", z);
2648
+ }, h = () => {
2649
+ t.loading || (T({ refresh: !0 }), y("refresh"));
2650
+ }, x = () => {
2651
+ u.current = 0;
2652
+ }, i = () => {
2653
+ u.current = 1;
2654
+ }, f = () => {
2655
+ t.tableKey++;
2656
+ }, S = () => {
2657
+ document.addEventListener("keydown", v), document.addEventListener("keyup", N);
1720
2658
  }, v = (j) => {
1721
- j.keyCode === 16 && (o.shiftKey = !0);
1722
- }, z = (j) => {
1723
- j.keyCode === 16 && (o.shiftKey = !1);
1724
- }, N = () => {
1725
- document.removeEventListener("keydown", v), document.removeEventListener("keyup", z);
1726
- }, P = ({ i: j, row: L }) => {
1727
- r.list[j] = L;
1728
- }, G = V(() => {
2659
+ j.keyCode === 16 && (t.shiftKey = !0);
2660
+ }, N = (j) => {
2661
+ j.keyCode === 16 && (t.shiftKey = !1);
2662
+ }, I = () => {
2663
+ document.removeEventListener("keydown", v), document.removeEventListener("keyup", N);
2664
+ }, P = ({ i: j, row: D }) => {
2665
+ s.list[j] = D;
2666
+ }, Z = O(() => {
1729
2667
  let j = e.height || window.config.options.pageHeight;
1730
2668
  return e.noheader === !1 && (j -= 64), e.nofooter === !1 && (j -= 56), j -= e.minusHeight, j;
1731
- }), ie = V(() => !!r.summary), we = V(() => r.nopagination === !0 ? "total" : "total,->,prev,pager,next,sizes"), ae = V(() => {
2669
+ }), ue = O(() => !!s.summary), Ee = O(() => s.nopagination === !0 ? "total" : "total,->,prev,pager,next,sizes"), re = O(() => {
1732
2670
  if (e.tool) {
1733
- const { column: j = !0, download: L = !0, refresh: W = !0 } = e.tool;
2671
+ const { column: j = !0, download: D = !0, refresh: Q = !0 } = e.tool;
1734
2672
  return {
1735
2673
  column: j,
1736
- download: L,
1737
- refresh: W
2674
+ download: D,
2675
+ refresh: Q
1738
2676
  };
1739
2677
  } else
1740
2678
  return !1;
1741
2679
  });
1742
2680
  return ce(() => {
1743
- N();
1744
- }), b({
1745
- initTable: S,
2681
+ I();
2682
+ }), m({
2683
+ initTable: _,
1746
2684
  editRow: P
1747
- }), (j, L) => {
1748
- const W = K("el-button"), F = K("Loading"), U = K("el-table"), Z = K("el-pagination"), ee = K("Drawer");
1749
- return y(), T("div", Ll, [
1750
- e.noheader === !1 ? (y(), T("div", {
2685
+ }), (j, D) => {
2686
+ const Q = E("el-button"), U = E("Loading"), q = E("el-table"), te = E("el-pagination"), le = E("Drawer");
2687
+ return b(), M("div", Hn, [
2688
+ e.noheader === !1 ? (b(), M("div", {
1751
2689
  key: 0,
1752
- class: R(["flexMode hb g12 p16 bg-white", e.autoHeader ? "minh64" : "h64"])
2690
+ class: F(["flexMode hb g12 p16 bg-white", e.autoHeader ? "minh64" : "h64"])
1753
2691
  }, [
1754
- i("div", {
1755
- class: R(["flexMode vc flexGrow maxwp100", e.headerClass])
2692
+ r("div", {
2693
+ class: F(["flexMode vc flexGrow maxwp100", e.headerClass])
1756
2694
  }, [
1757
- q(j.$slots, "header", {}, void 0, !0)
2695
+ R(j.$slots, "header", {}, void 0, !0)
1758
2696
  ], 2),
1759
- a(ae) ? (y(), T("div", Bl, [
1760
- a(ae).refresh ? (y(), D(W, {
2697
+ n(re) ? (b(), M("div", Un, [
2698
+ n(re).refresh ? (b(), B(Q, {
1761
2699
  key: 0,
1762
- onClick: O
2700
+ onClick: h
1763
2701
  }, {
1764
- icon: I(() => [...L[2] || (L[2] = [
1765
- i("i", { class: "imicon im-sync" }, null, -1)
2702
+ icon: V(() => [...D[2] || (D[2] = [
2703
+ r("i", { class: "imicon im-sync" }, null, -1)
1766
2704
  ])]),
1767
- default: I(() => [
1768
- Q(" " + A(j.$l("Refresh")), 1)
2705
+ default: V(() => [
2706
+ W(" " + L(j.$l("Refresh")), 1)
1769
2707
  ]),
1770
2708
  _: 1
1771
- })) : B("", !0),
1772
- a(ae).column ? (y(), D(W, {
2709
+ })) : K("", !0),
2710
+ n(re).column ? (b(), B(Q, {
1773
2711
  key: 1,
1774
- onClick: C
2712
+ onClick: x
1775
2713
  }, {
1776
- icon: I(() => [...L[3] || (L[3] = [
1777
- i("i", { class: "imicon im-column" }, null, -1)
2714
+ icon: V(() => [...D[3] || (D[3] = [
2715
+ r("i", { class: "imicon im-column" }, null, -1)
1778
2716
  ])]),
1779
- default: I(() => [
1780
- Q(" " + A(j.$l("Columns")), 1)
2717
+ default: V(() => [
2718
+ W(" " + L(j.$l("Columns")), 1)
1781
2719
  ]),
1782
2720
  _: 1
1783
- })) : B("", !0),
1784
- a(ae).download ? (y(), D(W, {
2721
+ })) : K("", !0),
2722
+ n(re).download ? (b(), B(Q, {
1785
2723
  key: 2,
1786
- onClick: n
2724
+ onClick: i
1787
2725
  }, {
1788
- icon: I(() => [...L[4] || (L[4] = [
1789
- i("i", { class: "imicon im-download1" }, null, -1)
2726
+ icon: V(() => [...D[4] || (D[4] = [
2727
+ r("i", { class: "imicon im-download1" }, null, -1)
1790
2728
  ])]),
1791
- default: I(() => [
1792
- Q(" " + A(j.$l("Download")), 1)
2729
+ default: V(() => [
2730
+ W(" " + L(j.$l("Download")), 1)
1793
2731
  ]),
1794
2732
  _: 1
1795
- })) : B("", !0)
1796
- ])) : B("", !0)
1797
- ], 2)) : B("", !0),
1798
- i("div", Pl, [
1799
- E(F, {
1800
- loading: a(o).loading
2733
+ })) : K("", !0)
2734
+ ])) : K("", !0)
2735
+ ], 2)) : K("", !0),
2736
+ r("div", Gn, [
2737
+ z(U, {
2738
+ loading: n(t).loading
1801
2739
  }, null, 8, ["loading"]),
1802
- (y(), D(U, {
2740
+ (b(), B(q, {
1803
2741
  ref_key: "body",
1804
- ref: w,
1805
- key: a(o).tableKey,
1806
- height: a(G),
1807
- data: a(r).list,
2742
+ ref: C,
2743
+ key: n(t).tableKey,
2744
+ height: n(Z),
2745
+ data: n(s).list,
1808
2746
  "default-expand-all": e.defaultExpandAll,
1809
2747
  "row-key": e.rowKey,
1810
2748
  stripe: "",
1811
2749
  border: "",
1812
- "show-summary": a(ie),
1813
- "summary-method": m,
2750
+ "show-summary": n(ue),
2751
+ "summary-method": k,
1814
2752
  class: "MainTable",
1815
- onSelectionChange: f
2753
+ onSelectionChange: c
1816
2754
  }, {
1817
- default: I(() => [
1818
- E(a(Yt), se({
2755
+ default: V(() => [
2756
+ z(n(tn), oe({
1819
2757
  "table-name": e.tableName,
1820
- column: a(ae) ? a(ae).column : !1
2758
+ column: n(re) ? n(re).column : !1
1821
2759
  }, j.$attrs), {
1822
- default: I(() => [
1823
- q(j.$slots, "default", {}, void 0, !0)
2760
+ default: V(() => [
2761
+ R(j.$slots, "default", {}, void 0, !0)
1824
2762
  ]),
1825
2763
  _: 3
1826
2764
  }, 16, ["table-name", "column"])
@@ -1828,37 +2766,37 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1828
2766
  _: 3
1829
2767
  }, 8, ["height", "data", "default-expand-all", "row-key", "show-summary"]))
1830
2768
  ]),
1831
- e.nofooter === !1 ? (y(), T("div", Fl, [
1832
- E(Z, {
1833
- "current-page": a(r).page,
1834
- "onUpdate:currentPage": L[0] || (L[0] = (Y) => a(r).page = Y),
2769
+ e.nofooter === !1 ? (b(), M("div", Jn, [
2770
+ z(te, {
2771
+ "current-page": n(s).page,
2772
+ "onUpdate:currentPage": D[0] || (D[0] = (X) => n(s).page = X),
1835
2773
  background: "",
1836
- total: a(r).total,
1837
- "default-page-size": a(r).pageSize,
2774
+ total: n(s).total,
2775
+ "default-page-size": n(s).pageSize,
1838
2776
  "page-sizes": e.pageSizes,
1839
2777
  "pager-count": 5,
1840
- layout: a(we),
2778
+ layout: n(Ee),
1841
2779
  class: "wp100",
1842
- onSizeChange: t,
1843
- onCurrentChange: s
2780
+ onSizeChange: a,
2781
+ onCurrentChange: l
1844
2782
  }, null, 8, ["current-page", "total", "default-page-size", "page-sizes", "layout"])
1845
- ])) : B("", !0),
1846
- E(ee, {
1847
- current: a(d).current,
1848
- "onUpdate:current": L[1] || (L[1] = (Y) => a(d).current = Y),
2783
+ ])) : K("", !0),
2784
+ z(le, {
2785
+ current: n(u).current,
2786
+ "onUpdate:current": D[1] || (D[1] = (X) => n(u).current = X),
1849
2787
  "table-name": e.tableName,
1850
- drawer: a(d).list,
1851
- list: a(r).list,
1852
- selection: a(o).selection,
1853
- onInitColumn: p
2788
+ drawer: n(u).list,
2789
+ list: n(s).list,
2790
+ selection: n(t).selection,
2791
+ onInitColumn: f
1854
2792
  }, null, 8, ["current", "table-name", "drawer", "list", "selection"])
1855
2793
  ]);
1856
2794
  };
1857
2795
  }
1858
- }), Rl = /* @__PURE__ */ X(Dl, [["__scopeId", "data-v-e72098dd"]]), Hl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2796
+ }), Wn = /* @__PURE__ */ J(qn, [["__scopeId", "data-v-e72098dd"]]), Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1859
2797
  __proto__: null,
1860
- default: Rl
1861
- }, Symbol.toStringTag, { value: "Module" })), Ul = { class: "panelWrap" }, Jl = /* @__PURE__ */ Object.assign({
2798
+ default: Wn
2799
+ }, Symbol.toStringTag, { value: "Module" })), Zn = { class: "panelWrap" }, Qn = /* @__PURE__ */ Object.assign({
1862
2800
  name: "MvcTabs",
1863
2801
  inheritAttrs: !1
1864
2802
  }, {
@@ -1881,6 +2819,14 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1881
2819
  type: String,
1882
2820
  default: "label"
1883
2821
  },
2822
+ iconKey: {
2823
+ type: String,
2824
+ default: "icon"
2825
+ },
2826
+ iconClass: {
2827
+ type: String,
2828
+ default: "imicon"
2829
+ },
1884
2830
  componentKey: {
1885
2831
  type: String,
1886
2832
  default: "component"
@@ -1896,42 +2842,44 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1896
2842
  }
1897
2843
  },
1898
2844
  emits: ["update:modelValue", "change"],
1899
- setup(h, { emit: b }) {
1900
- const l = h, e = b, o = ge(), r = (u) => u == null ? u : ["Object", "Array"].includes(globalThis.$getType(u)) ? u[l.valueKey] : u, d = (u) => {
1901
- e("update:modelValue", u);
1902
- const x = l.options.find((S) => r(S) === u);
1903
- e("change", u, x);
1904
- }, w = V(
1905
- () => l.options.find((u) => r(u) === l.modelValue)
1906
- ), g = V(() => {
1907
- const u = w.value;
1908
- if (!(!u || !["Object", "Array"].includes(globalThis.$getType(u))))
1909
- return u[l.componentKey];
1910
- }), k = V(() => {
1911
- const u = w.value;
1912
- return !u || !["Object", "Array"].includes(globalThis.$getType(u)) ? {} : u[l.panePropsKey] ?? {};
2845
+ setup(p, { emit: m }) {
2846
+ const o = p, e = m, t = ve(), s = (g) => g == null ? g : ["Object", "Array"].includes(globalThis.$getType(g)) ? g[o.valueKey] : g, u = (g) => {
2847
+ e("update:modelValue", g);
2848
+ const w = o.options.find((_) => s(_) === g);
2849
+ e("change", g, w);
2850
+ }, C = O(
2851
+ () => o.options.find((g) => s(g) === o.modelValue)
2852
+ ), $ = O(() => {
2853
+ const g = C.value;
2854
+ if (!(!g || !["Object", "Array"].includes(globalThis.$getType(g))))
2855
+ return g[o.componentKey];
2856
+ }), y = O(() => {
2857
+ const g = C.value;
2858
+ return !g || !["Object", "Array"].includes(globalThis.$getType(g)) ? {} : g[o.panePropsKey] ?? {};
1913
2859
  });
1914
- return (u, x) => {
1915
- const S = K("BtnGroup");
1916
- return y(), T("div", se({ class: "MvcTabs flexMode flexV g12" }, a(o)), [
1917
- E(S, {
1918
- "model-value": l.modelValue,
1919
- options: l.options,
1920
- "value-key": l.valueKey,
1921
- "label-key": l.labelKey,
1922
- disabled: l.disabled,
1923
- "onUpdate:modelValue": d
1924
- }, null, 8, ["model-value", "options", "value-key", "label-key", "disabled"]),
1925
- i("div", Ul, [
1926
- a(g) ? (y(), D(Ne(a(g)), ue(se({ key: 0 }, a(k))), null, 16)) : B("", !0)
2860
+ return (g, w) => {
2861
+ const _ = E("BtnGroup");
2862
+ return b(), M("div", oe({ class: "MvcTabs flexMode flexV g12" }, n(t)), [
2863
+ z(_, {
2864
+ "model-value": o.modelValue,
2865
+ options: o.options,
2866
+ "value-key": o.valueKey,
2867
+ "label-key": o.labelKey,
2868
+ "icon-key": o.iconKey,
2869
+ "icon-class": o.iconClass,
2870
+ disabled: o.disabled,
2871
+ "onUpdate:modelValue": u
2872
+ }, null, 8, ["model-value", "options", "value-key", "label-key", "icon-key", "icon-class", "disabled"]),
2873
+ r("div", Zn, [
2874
+ n($) ? (b(), B(Oe(n($)), de(oe({ key: 0 }, n(y))), null, 16)) : K("", !0)
1927
2875
  ])
1928
2876
  ], 16);
1929
2877
  };
1930
2878
  }
1931
- }), ql = /* @__PURE__ */ X(Jl, [["__scopeId", "data-v-62303cd8"]]), Gl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2879
+ }), Xn = /* @__PURE__ */ J(Qn, [["__scopeId", "data-v-292f6bba"]]), el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1932
2880
  __proto__: null,
1933
- default: ql
1934
- }, Symbol.toStringTag, { value: "Module" })), Wl = /* @__PURE__ */ Object.assign({
2881
+ default: Xn
2882
+ }, Symbol.toStringTag, { value: "Module" })), tl = /* @__PURE__ */ Object.assign({
1935
2883
  name: "MvcTextarea",
1936
2884
  inheritAttrs: !1
1937
2885
  }, {
@@ -1952,12 +2900,12 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1952
2900
  output: {
1953
2901
  type: String,
1954
2902
  default: "string",
1955
- validator: (h) => ["string", "array"].includes(h)
2903
+ validator: (p) => ["string", "array"].includes(p)
1956
2904
  },
1957
2905
  resize: {
1958
2906
  type: String,
1959
2907
  default: "vertical",
1960
- validator: (h) => ["none", "vertical"].includes(h)
2908
+ validator: (p) => ["none", "vertical"].includes(p)
1961
2909
  }
1962
2910
  },
1963
2911
  emits: [
@@ -1967,90 +2915,95 @@ const Le = ({ router: h, useAdmin: b, adminPermission: l, noaccess: e }) => {
1967
2915
  "blur",
1968
2916
  "focus"
1969
2917
  ],
1970
- setup(h, { emit: b }) {
1971
- const l = h, e = J(null);
1972
- let o = null;
1973
- const r = H({
2918
+ setup(p, { emit: m }) {
2919
+ const o = p, e = G(null);
2920
+ let t = null;
2921
+ const s = H({
1974
2922
  val: "",
1975
2923
  isComposing: !1
1976
- }), d = b, { proxy: w } = re();
1977
- oe(() => {
1978
- var s, f;
1979
- const t = (s = e.value) == null ? void 0 : s.$el;
1980
- o = (f = t == null ? void 0 : t.querySelector) == null ? void 0 : f.call(t, "textarea"), o && (o.addEventListener("compositionstart", g), o.addEventListener("compositionend", k));
2924
+ }), u = m, { proxy: C } = ae();
2925
+ ee(() => {
2926
+ var l, c;
2927
+ const a = (l = e.value) == null ? void 0 : l.$el;
2928
+ t = (c = a == null ? void 0 : a.querySelector) == null ? void 0 : c.call(a, "textarea"), t && (t.addEventListener("compositionstart", $), t.addEventListener("compositionend", y));
1981
2929
  });
1982
- const g = () => {
1983
- r.isComposing = !0;
1984
- }, k = () => {
1985
- r.isComposing = !1, me(() => $(r.val));
1986
- }, u = (t) => {
1987
- r.isComposing || $(t);
1988
- }, x = (t) => {
1989
- const s = String(t ?? "").split(/\r?\n/);
1990
- return l.output === "array" ? s : s.join(",");
1991
- }, S = (t) => Array.isArray(t) ? t.join(`
1992
- `) : String(t ?? "").replace(/,/g, `
1993
- `), $ = (t) => {
1994
- const s = x(t);
1995
- d("update:modelValue", s), d("input", s);
1996
- }, M = V(() => {
1997
- if (!l.height) return w.$attrs["input-style"];
1998
- const t = typeof l.height == "number" ? `${l.height}px` : l.height;
1999
- return { ...w.$attrs["input-style"] && typeof w.$attrs["input-style"] == "object" ? { ...w.$attrs["input-style"] } : {}, height: t, minHeight: t };
2000
- }), m = V(() => !!(w.$attrs.maxlength || c.value)), c = V(() => w.$attrs.max);
2001
- return le(
2002
- () => l.modelValue,
2003
- (t) => {
2004
- const s = S(t);
2005
- r.val !== s && (r.val = s);
2930
+ const $ = () => {
2931
+ s.isComposing = !0;
2932
+ }, y = () => {
2933
+ s.isComposing = !1, ge(() => T(s.val));
2934
+ }, g = (a) => {
2935
+ s.isComposing || T(a);
2936
+ }, w = (a) => {
2937
+ const l = String(a ?? "").split(/\r?\n/);
2938
+ return o.output === "array" ? l : l.join(",");
2939
+ }, _ = (a) => Array.isArray(a) ? a.join(`
2940
+ `) : String(a ?? "").replace(/,/g, `
2941
+ `), T = (a) => {
2942
+ const l = w(a);
2943
+ u("update:modelValue", l), u("input", l);
2944
+ }, A = O(() => {
2945
+ if (!o.height) return C.$attrs["input-style"];
2946
+ const a = typeof o.height == "number" ? `${o.height}px` : o.height;
2947
+ return { ...C.$attrs["input-style"] && typeof C.$attrs["input-style"] == "object" ? { ...C.$attrs["input-style"] } : {}, height: a, minHeight: a };
2948
+ }), k = O(() => !!(C.$attrs.maxlength || d.value)), d = O(() => C.$attrs.max);
2949
+ return ne(
2950
+ () => o.modelValue,
2951
+ (a) => {
2952
+ const l = _(a);
2953
+ s.val !== l && (s.val = l);
2006
2954
  },
2007
2955
  { immediate: !0 }
2008
2956
  ), ce(() => {
2009
- o && (o.removeEventListener("compositionstart", g), o.removeEventListener("compositionend", k), o = null);
2010
- }), (t, s) => {
2011
- const f = K("el-input");
2012
- return y(), D(f, se({
2957
+ t && (t.removeEventListener("compositionstart", $), t.removeEventListener("compositionend", y), t = null);
2958
+ }), (a, l) => {
2959
+ const c = E("el-input");
2960
+ return b(), B(c, oe({
2013
2961
  ref_key: "inputRef",
2014
2962
  ref: e,
2015
2963
  type: "textarea",
2016
- modelValue: a(r).val,
2017
- "onUpdate:modelValue": s[0] || (s[0] = (O) => a(r).val = O),
2018
- rows: l.rows,
2019
- style: t.$attrs.style,
2020
- "input-style": a(M),
2021
- "show-word-limit": a(m),
2022
- maxlength: a(c),
2964
+ modelValue: n(s).val,
2965
+ "onUpdate:modelValue": l[0] || (l[0] = (h) => n(s).val = h),
2966
+ rows: o.rows,
2967
+ style: a.$attrs.style,
2968
+ "input-style": n(A),
2969
+ "show-word-limit": n(k),
2970
+ maxlength: n(d),
2023
2971
  class: "MvcTextarea"
2024
- }, t.$attrs, { onInput: u }), null, 16, ["modelValue", "rows", "style", "input-style", "show-word-limit", "maxlength"]);
2972
+ }, a.$attrs, { onInput: g }), null, 16, ["modelValue", "rows", "style", "input-style", "show-word-limit", "maxlength"]);
2025
2973
  };
2026
2974
  }
2027
- }), Yl = /* @__PURE__ */ X(Wl, [["__scopeId", "data-v-4dba94bf"]]), Zl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2975
+ }), ol = /* @__PURE__ */ J(tl, [["__scopeId", "data-v-4dba94bf"]]), nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2028
2976
  __proto__: null,
2029
- default: Yl
2030
- }, Symbol.toStringTag, { value: "Module" })), _e = /* @__PURE__ */ Object.assign({ "../component/BtnGroup/index.vue": Re, "../component/Form/index.vue": qe, "../component/Frame/index.vue": $t, "../component/Icon/index.vue": wt, "../component/Input/index.vue": Tt, "../component/Page/index.vue": Kt, "../component/Select/index.vue": Rt, "../component/SelectV2/index.vue": Wt, "../component/Table/index.vue": Hl, "../component/Tabs/index.vue": Gl, "../component/Textarea/index.vue": Zl }), Ql = (h) => {
2031
- for (let b in _e) {
2032
- let l = b.match(/\.\.\/component\/(.*)\/index.vue/)[1];
2033
- h.component(l, _e[b].default);
2977
+ default: ol
2978
+ }, Symbol.toStringTag, { value: "Module" })), ke = /* @__PURE__ */ Object.assign({ "../component/BtnGroup/index.vue": mt, "../component/Drawer/index.vue": vt, "../component/DrawerArea/index.vue": Ct, "../component/Form/index.vue": Vt, "../component/Frame/index.vue": ro, "../component/Icon/index.vue": po, "../component/Input/index.vue": fo, "../component/Loading/index.vue": yo, "../component/Login/index.vue": Lo, "../component/Page/index.vue": Po, "../component/Select/index.vue": qo, "../component/SelectV2/index.vue": en, "../component/Table/index.vue": Yn, "../component/Tabs/index.vue": el, "../component/Textarea/index.vue": nl }), ll = (p) => {
2979
+ for (let m in ke) {
2980
+ let o = m.match(/\.\.\/component\/(.*)\/index.vue/)[1];
2981
+ p.component(o, ke[m].default);
2034
2982
  }
2035
- }, Xl = {
2983
+ }, sl = {
2036
2984
  name: "Matt Avias Frame",
2037
2985
  copyright: "©2026",
2038
- version: "1.0.10",
2986
+ version: "1.0.13",
2039
2987
  author: "Matt Avias",
2040
2988
  date: "2026-02-26",
2989
+ /** 默认语言 key,与 `$getLang`、localStorage `lang` 一致;业务在 app.use(mvframe, { config }) 里覆盖 */
2990
+ lang: "en_us",
2041
2991
  /** Table 等表格默认;业务在 app.use(mvframe, { config }) 里覆盖 */
2042
2992
  table: {
2043
2993
  /** 同 Table 的 summary-metric:{ [prop]: { unit, precision, currency } } 或 (prop) => metric */
2044
2994
  summaryMetric: null
2045
2995
  }
2046
- }, eo = (h, b = {}) => {
2996
+ }, al = (p, m = {}) => {
2047
2997
  globalThis.$config = {
2048
- ...Xl,
2049
- ...b
2998
+ ...sl,
2999
+ ...m
2050
3000
  };
2051
- }, co = (h, b) => {
2052
- h.use(eo, b.config).use(Ql).use(ke).use(Te).use(Ve, b.pinia).use(Be, b.vueRouter);
3001
+ }, bl = (p, m) => {
3002
+ p.use(al, m.config).use(ze).use(ll).use(Ne).use(Ke).use(Fe, m.pinia).use(ct, m.vueRouter).use(et, m.lang);
2053
3003
  };
2054
3004
  export {
2055
- co as default
3005
+ gl as builtinLocales,
3006
+ bl as default,
3007
+ hl as getBuiltinLangMaps,
3008
+ rt as normalizeBuiltinLocale
2056
3009
  };