@chewel611/naive-ui-plus 0.0.28 → 0.0.30

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,285 +1,240 @@
1
- import { useDialog as Ne, useMessage as fe, NCard as Ae, NDataTable as Ge, NModal as De, NSpace as ke, NButton as K, NTooltip as ze, NIcon as M, NDropdown as Z, NAvatar as Le, NBreadcrumb as Je, NBreadcrumbItem as Ze, NDivider as Qe, useThemeVars as et, NMenu as tt, NLayout as Ee, NLayoutSider as at, NFlex as nt, NLayoutHeader as ot, NLayoutContent as lt, NBackTop as st, NConfigProvider as rt, dateZhCN as ct, zhCN as it, NDialogProvider as ut, NNotificationProvider as dt, NMessageProvider as ft, NText as gt, NEmpty as pt, NSpin as ht, NResult as Ce } from "naive-ui";
2
- import { defineComponent as I, ref as $, computed as F, unref as a, onMounted as Q, openBlock as p, createBlock as S, withCtx as l, createElementVNode as b, createElementBlock as R, renderSlot as j, createCommentVNode as N, createVNode as r, normalizeStyle as de, createTextVNode as Y, toDisplayString as H, h as W, toRaw as J, reactive as xe, normalizeClass as ae, withDirectives as mt, vShow as vt, nextTick as ne, inject as Ie, Fragment as Me, renderList as _t, resolveDynamicComponent as we, withModifiers as Pe, resolveComponent as Be, KeepAlive as yt, useCssVars as bt, watch as We, provide as wt, mergeProps as Pt, onBeforeMount as kt } from "vue";
3
- import { PlusSquareOutlined as Lt, DeleteOutlined as Ct, ReloadOutlined as Se, MoreOutlined as xt, MenuUnfoldOutlined as St, MenuFoldOutlined as Tt, FullscreenOutlined as $t, FullscreenExitOutlined as Ot, CloseOutlined as Re, ColumnWidthOutlined as Et, MinusOutlined as Mt, LeftOutlined as Rt, RightOutlined as Nt, DownOutlined as At, AlertOutlined as Dt } from "@vicons/antd";
4
- import { cloneDeep as zt } from "lodash";
5
- import { defineStore as Te } from "pinia";
6
- import { useRouter as oe, useRoute as le } from "vue-router";
7
- import It from "element-resize-detector";
8
- import Bt from "vuedraggable";
9
- const je = (t) => {
10
- Object.keys(t).forEach((n) => {
11
- const i = t[n];
12
- Array.isArray(i) ? t[n] = [] : i !== null && typeof i == "object" ? je(i) : t[n] = void 0;
13
- });
14
- }, Wt = { class: "text-lg font-medium" }, jt = { id: "data-content" }, Ht = {
1
+ import { useDialog as $e, useMessage as ue, NCard as Oe, NDataTable as Me, NSpace as _e, NTooltip as Ee, NIcon as D, NDropdown as G, NButton as ve, NAvatar as be, NBreadcrumb as Ie, NBreadcrumbItem as Be, NDivider as He, useThemeVars as We, NMenu as Ue, NLayout as xe, NLayoutSider as je, NFlex as qe, NLayoutHeader as Fe, NLayoutContent as Ve, NBackTop as Ke, NConfigProvider as Ye, dateZhCN as Xe, zhCN as Je, NDialogProvider as Ze, NNotificationProvider as Ge, NMessageProvider as Qe, NModal as et, NText as tt, NEmpty as at, NSpin as nt, NResult as ye } from "naive-ui";
2
+ import { defineComponent as B, ref as N, computed as K, unref as a, onMounted as Q, openBlock as h, createBlock as C, withCtx as o, createElementVNode as b, createElementBlock as M, renderSlot as Y, createCommentVNode as I, createVNode as l, toDisplayString as q, h as U, toRaw as Ce, reactive as we, normalizeClass as oe, withDirectives as ot, vShow as st, nextTick as se, inject as Re, Fragment as Se, renderList as lt, resolveDynamicComponent as he, withModifiers as me, resolveComponent as Ne, KeepAlive as ct, useCssVars as rt, watch as ze, normalizeStyle as De, provide as it, mergeProps as ut, createTextVNode as pe, onBeforeMount as dt } from "vue";
3
+ import { PlusSquareOutlined as ft, DeleteOutlined as gt, ReloadOutlined as Pe, MoreOutlined as pt, MenuUnfoldOutlined as ht, MenuFoldOutlined as mt, FullscreenOutlined as _t, FullscreenExitOutlined as vt, CloseOutlined as Te, ColumnWidthOutlined as bt, MinusOutlined as yt, LeftOutlined as wt, RightOutlined as Pt, DownOutlined as kt, AlertOutlined as Lt } from "@vicons/antd";
4
+ import { defineStore as ke } from "pinia";
5
+ import { useRouter as le, useRoute as ce } from "vue-router";
6
+ import xt from "element-resize-detector";
7
+ import Ct from "vuedraggable";
8
+ const St = { class: "text-lg font-medium" }, Tt = { id: "data-content" }, $t = {
15
9
  key: 0,
16
10
  class: "rounded-lg bg-gray-50 flex flex-row gap-2 items-center justify-end p-4 mb-4"
17
- }, Ut = { key: 1 }, qt = { key: 2 }, Ft = /* @__PURE__ */ I({
11
+ }, Ot = /* @__PURE__ */ B({
18
12
  __name: "PTable",
19
13
  props: {
20
14
  title: {},
21
15
  idField: { default: "id" },
22
- item: { default: {} },
23
16
  columns: {},
24
- modalWidth: { default: 800 },
25
- hiddenAdd: { type: Boolean, default: !1 },
26
- hiddenEdit: { type: Boolean, default: !1 },
27
- hiddenDelete: { type: Boolean, default: !1 },
28
17
  onLoad: {},
29
- onGet: {},
30
- onOpenModal: {},
31
- onCloseModal: {},
32
- onSave: {},
33
- onDelete: {}
18
+ onDelete: {},
19
+ onAdd: {},
20
+ onEdit: {}
34
21
  },
35
- setup(t, { expose: n }) {
36
- const i = $(null), y = Ne(), h = fe(), u = $(!1), k = $([]), _ = $([]), T = $(null), O = $(!1), c = $(!1), w = $(!1), d = $({}), C = $({
22
+ setup(e, { expose: n }) {
23
+ const i = N(null), _ = $e(), g = ue(), c = N(!1), P = N([]), m = N([]), T = N({
37
24
  page: 1,
38
25
  itemCount: 0,
39
26
  pageSize: 10,
40
27
  pageSizes: [10, 20, 30, 50],
41
28
  showSizePicker: !0,
42
- onChange: async (g) => {
43
- C.value.page = g, await q();
29
+ onChange: async (w) => {
30
+ T.value.page = w, await O();
44
31
  },
45
- onUpdatePageSize: async (g) => {
46
- C.value.pageSize = g, await q();
32
+ onUpdatePageSize: async (w) => {
33
+ T.value.pageSize = w, await O();
47
34
  }
48
- }), m = t, f = (g) => {
49
- const e = (o) => {
50
- const s = [];
51
- return g && g.forEach((L) => {
52
- L.key !== "edit" && L.key !== "delete" && s.push({
53
- label: L.name,
54
- key: L.key,
55
- props: { onClick: () => L.action(o) }
35
+ }), L = e, s = (w) => {
36
+ const k = (x) => {
37
+ const E = [];
38
+ return w && w.forEach((H) => {
39
+ H.key !== "edit" && H.key !== "delete" && E.push({
40
+ label: H.name,
41
+ key: H.key,
42
+ props: { onClick: () => H.action(x) }
56
43
  });
57
- }), s;
44
+ }), E;
58
45
  };
59
46
  return {
60
47
  title: "操作",
61
48
  key: "actions",
62
49
  width: 100,
63
50
  fixed: "right",
64
- render: (o) => {
65
- let s = [];
66
- if (m.hiddenEdit || s.push({
51
+ render: (x) => {
52
+ let E = [];
53
+ if (L.onEdit && E.push({
67
54
  label: "编辑",
68
55
  key: "edit",
69
- props: { onClick: () => ge(o) }
70
- }), m.hiddenDelete || s.push({
56
+ props: { onClick: async () => await L.onEdit(x) }
57
+ }), L.onDelete && E.push({
71
58
  label: "删除",
72
59
  key: "delete",
73
- props: { onClick: () => A(o) }
74
- }), s = [...s, ...e(o)], !(s.length <= 0))
75
- return W(
76
- Z,
60
+ props: { onClick: () => $(x) }
61
+ }), E = [...E, ...k(x)], !(E.length <= 0))
62
+ return U(
63
+ G,
77
64
  {
78
- options: s,
65
+ options: E,
79
66
  placement: "bottom-start"
80
67
  },
81
68
  {
82
- default: () => W(
83
- K,
69
+ default: () => U(
70
+ ve,
84
71
  { size: "small", type: "primary" },
85
- { default: () => ["操作", W(M, () => W(xt))] }
72
+ { default: () => ["操作", U(D, () => U(pt))] }
86
73
  )
87
74
  }
88
75
  );
89
76
  }
90
77
  };
91
- }, P = F(() => {
92
- const g = m.columns.filter((o) => o.key != "action").map((o) => ({
93
- title: o.title,
94
- key: o.key,
95
- width: o.width,
96
- fixed: o.fixed ?? !1,
97
- render: o.render,
98
- ellipsis: o.ellipsis ? { tooltip: !0 } : !1
99
- })), e = m.columns.reduce(
100
- (o, s) => s.key === "action" ? s : o,
78
+ }, y = K(() => {
79
+ const w = L.columns.filter((x) => x.key != "action").map((x) => ({
80
+ title: x.title,
81
+ key: x.key,
82
+ width: x.width,
83
+ fixed: x.fixed ?? !1,
84
+ render: x.render,
85
+ ellipsis: x.ellipsis ? { tooltip: !0 } : !1
86
+ })), k = L.columns.reduce(
87
+ (x, E) => E.key === "action" ? E : x,
101
88
  void 0
102
89
  )?.action;
103
- return e && e?.length > 0 || !m.hiddenDelete || !m.hiddenEdit ? [
90
+ return k && k?.length > 0 || L.onEdit || L.onDelete ? [
104
91
  { type: "selection", fixed: "left" },
105
- ...g,
106
- f(e)
107
- ] : [{ type: "selection", fixed: "left" }, ...g];
108
- }), v = async () => {
109
- await q();
110
- }, A = (g) => {
111
- x([g]);
112
- }, E = () => {
113
- const g = G();
114
- x(g);
115
- }, x = (g) => {
116
- g && g.length > 0 && y.warning({
92
+ ...w,
93
+ s(k)
94
+ ] : [{ type: "selection", fixed: "left" }, ...w];
95
+ }), r = async () => await O(), $ = (w) => u([w]), z = () => {
96
+ const w = v();
97
+ u(w);
98
+ }, u = (w) => {
99
+ w && w.length > 0 && _.warning({
117
100
  title: "警告",
118
101
  content: "删除数据不可恢复, 确认删除吗?",
119
102
  positiveText: "确定",
120
103
  negativeText: "取消",
121
104
  onPositiveClick: async () => {
122
- if (m.onDelete)
105
+ if (L.onDelete)
123
106
  try {
124
- await m.onDelete(g) ? (q(), h.success("删除成功")) : h.error("删除失败");
125
- } catch (e) {
126
- h.error(e.message);
107
+ await L.onDelete(w) ? (O(), g.success("删除成功")) : g.error("删除失败");
108
+ } catch (k) {
109
+ g.error(k.message);
127
110
  }
128
111
  }
129
112
  });
130
- }, ee = () => {
131
- T.value = null, ce();
132
- }, ge = async (g) => {
133
- T.value = zt(g), ce(T.value, async () => {
134
- m.onGet && (T.value = await m.onGet(g[m.idField])), Object.assign(m.item, T.value);
135
- });
136
- }, re = async () => {
137
- if (m.onSave)
138
- try {
139
- w.value = !0, (O.value ? await m.onSave(void 0, J(m.item)) : await m.onSave(T.value[m.idField], J(m.item))) && (X(), await q());
140
- } catch (g) {
141
- h.error(g.message);
142
- } finally {
143
- w.value = !1;
144
- }
145
- }, ce = async (g, e) => {
146
- m.onOpenModal?.(g), await e?.(), g ? (O.value = !1, c.value = !0) : (c.value = !1, O.value = !0);
147
- }, X = () => {
148
- T.value = null, je(m.item), Object.assign(m.item, { ...J(d.value) }), m.onCloseModal?.(m.item), O.value = !1, c.value = !1;
149
- }, G = () => k.value ? _.value.filter((e) => k.value.includes(e.id)).map((e) => J(e)) : [], pe = () => G()[0], he = () => J(_.value), q = async () => {
150
- if (!u.value) {
151
- u.value = !0;
113
+ }, v = () => P.value ? m.value.filter((k) => P.value.includes(k.id)).map((k) => Ce(k)) : [], p = () => v()[0], A = () => Ce(m.value), O = async () => {
114
+ if (!c.value) {
115
+ c.value = !0;
152
116
  try {
153
- if (m.onLoad) {
154
- var { data: g, total: e } = await m.onLoad(
155
- C.value.page,
156
- C.value.pageSize
117
+ if (L.onLoad) {
118
+ var { data: w, total: k } = await L.onLoad(
119
+ T.value.page,
120
+ T.value.pageSize
157
121
  );
158
- _.value = g, C.value.itemCount = e;
122
+ m.value = w, T.value.itemCount = k;
159
123
  }
160
- } catch (o) {
161
- h.error(o.message);
124
+ } catch (x) {
125
+ g.error(x.message);
162
126
  } finally {
163
- u.value = !1;
127
+ c.value = !1;
164
128
  }
165
129
  }
166
- }, me = F(() => {
167
- const g = a(i);
168
- if (!g) return;
169
- const e = g?.$el, o = e.querySelector(".n-data-table-thead "), { bottomIncludeBody: s } = te(o), L = 48;
170
- let D = 12, z = 24;
171
- const V = e.querySelector(
130
+ }, S = K(() => {
131
+ const w = a(i);
132
+ if (!w) return;
133
+ const k = w?.$el, x = k.querySelector(".n-data-table-thead "), { bottomIncludeBody: E } = de(x), H = 48;
134
+ let j = 12, Z = 24;
135
+ const X = k.querySelector(
172
136
  ".n-data-table__pagination"
173
137
  );
174
- if (V) {
175
- const _e = V.offsetHeight;
176
- D += _e || 0;
138
+ if (X) {
139
+ const J = X.offsetHeight;
140
+ j += J || 0;
177
141
  } else
178
- D += 28;
179
- return s - (L + D + z);
180
- }), ie = (g) => !g || !g.getBoundingClientRect ? 0 : g.getBoundingClientRect(), te = (g) => {
181
- const e = document.documentElement, o = e.scrollLeft, s = e.scrollTop, L = e.clientLeft, D = e.clientTop, z = window.pageXOffset, V = window.pageYOffset, ue = ie(g), {
182
- left: _e,
183
- top: Ue,
184
- width: qe,
185
- height: Fe
186
- } = ue, Ve = (z || o) - (L || 0), Ke = (V || s) - (D || 0), Ye = _e + z, Xe = Ue + V, ye = Ye - Ve, be = Xe - Ke, $e = window.document.documentElement.clientWidth, Oe = window.document.documentElement.clientHeight;
142
+ j += 28;
143
+ return E - (H + j + Z);
144
+ }), ee = (w) => !w || !w.getBoundingClientRect ? 0 : w.getBoundingClientRect(), de = (w) => {
145
+ const k = document.documentElement, x = k.scrollLeft, E = k.scrollTop, H = k.clientLeft, j = k.clientTop, Z = window.pageXOffset, X = window.pageYOffset, te = ee(w), {
146
+ left: J,
147
+ top: fe,
148
+ width: ge,
149
+ height: t
150
+ } = te, d = (Z || x) - (H || 0), f = (X || E) - (j || 0), R = J + Z, V = fe + X, ae = R - d, ne = V - f, ie = window.document.documentElement.clientWidth, Le = window.document.documentElement.clientHeight;
187
151
  return {
188
- left: ye,
189
- top: be,
190
- right: $e - qe - ye,
191
- bottom: Oe - Fe - be,
192
- rightIncludeBody: $e - ye,
193
- bottomIncludeBody: Oe - be
152
+ left: ae,
153
+ top: ne,
154
+ right: ie - ge - ae,
155
+ bottom: Le - t - ne,
156
+ rightIncludeBody: ie - ae,
157
+ bottomIncludeBody: Le - ne
194
158
  };
195
- }, ve = () => {
196
- d.value = { ...J(m.item) };
197
159
  };
198
- return Q(async () => {
199
- ve(), await q();
200
- }), n({
201
- getData: he,
202
- getSelectedRow: pe,
203
- getSelectedRows: G,
204
- closeModal: X,
205
- refreshData: q,
160
+ return Q(async () => await O()), n({
161
+ getData: A,
162
+ getSelectedRow: p,
163
+ getSelectedRows: v,
164
+ refreshData: O,
206
165
  resetPage: () => {
207
- C.value.page = 1;
166
+ T.value.page = 1;
208
167
  }
209
- }), (g, e) => {
210
- const o = ze, s = ke, L = Ge, D = De;
211
- return p(), S(a(Ae), {
212
- bordered: !1,
213
- "content-class": "!p-0",
214
- "header-class": "!px-0 !pt-0"
215
- }, {
216
- header: l(() => [
217
- r(s, {
168
+ }), (w, k) => {
169
+ const x = Ee, E = _e, H = Me;
170
+ return h(), C(a(Oe), { bordered: !1 }, {
171
+ header: o(() => [
172
+ l(E, {
218
173
  justify: "space-between",
219
174
  align: "center",
220
175
  class: "w-full"
221
176
  }, {
222
- default: l(() => [
223
- b("span", Wt, H(t.title), 1),
224
- r(s, null, {
225
- default: l(() => [
226
- t.hiddenAdd ? N("", !0) : (p(), S(o, {
177
+ default: o(() => [
178
+ b("span", St, q(e.title), 1),
179
+ l(E, null, {
180
+ default: o(() => [
181
+ L.onAdd ? (h(), C(x, {
227
182
  key: 0,
228
183
  trigger: "hover"
229
184
  }, {
230
- trigger: l(() => [
231
- r(a(M), {
185
+ trigger: o(() => [
186
+ l(a(D), {
232
187
  size: "18",
233
188
  class: "mr-1 cursor-pointer hover:text-blue-600",
234
- onClick: ee
189
+ onClick: L.onAdd
235
190
  }, {
236
- default: l(() => [
237
- r(a(Lt))
191
+ default: o(() => [
192
+ l(a(ft))
238
193
  ]),
239
194
  _: 1
240
- })
195
+ }, 8, ["onClick"])
241
196
  ]),
242
- default: l(() => [
243
- e[3] || (e[3] = b("span", null, "新增", -1))
197
+ default: o(() => [
198
+ k[1] || (k[1] = b("span", null, "新增", -1))
244
199
  ]),
245
200
  _: 1
246
- })),
247
- t.hiddenDelete ? N("", !0) : (p(), S(o, {
201
+ })) : I("", !0),
202
+ L.onDelete ? (h(), C(x, {
248
203
  key: 1,
249
204
  trigger: "hover"
250
205
  }, {
251
- trigger: l(() => [
252
- r(a(M), {
206
+ trigger: o(() => [
207
+ l(a(D), {
253
208
  size: "18",
254
209
  class: "mr-1 cursor-pointer hover:text-blue-600",
255
- onClick: E
210
+ onClick: z
256
211
  }, {
257
- default: l(() => [
258
- r(a(Ct))
212
+ default: o(() => [
213
+ l(a(gt))
259
214
  ]),
260
215
  _: 1
261
216
  })
262
217
  ]),
263
- default: l(() => [
264
- e[4] || (e[4] = b("span", null, "删除", -1))
218
+ default: o(() => [
219
+ k[2] || (k[2] = b("span", null, "删除", -1))
265
220
  ]),
266
221
  _: 1
267
- })),
268
- r(o, { trigger: "hover" }, {
269
- trigger: l(() => [
270
- r(a(M), {
222
+ })) : I("", !0),
223
+ l(x, { trigger: "hover" }, {
224
+ trigger: o(() => [
225
+ l(a(D), {
271
226
  size: "18",
272
227
  class: "cursor-pointer hover:text-blue-600",
273
- onClick: v
228
+ onClick: r
274
229
  }, {
275
- default: l(() => [
276
- r(a(Se))
230
+ default: o(() => [
231
+ l(a(Pe))
277
232
  ]),
278
233
  _: 1
279
234
  })
280
235
  ]),
281
- default: l(() => [
282
- e[5] || (e[5] = b("span", null, "刷新", -1))
236
+ default: o(() => [
237
+ k[3] || (k[3] = b("span", null, "刷新", -1))
283
238
  ]),
284
239
  _: 1
285
240
  })
@@ -290,123 +245,39 @@ const je = (t) => {
290
245
  _: 1
291
246
  })
292
247
  ]),
293
- default: l(() => [
294
- b("div", jt, [
295
- g.$slots.toolbar ? (p(), R("div", Ht, [
296
- j(g.$slots, "toolbar")
297
- ])) : N("", !0),
298
- r(L, {
248
+ default: o(() => [
249
+ b("div", Tt, [
250
+ w.$slots.toolbar ? (h(), M("div", $t, [
251
+ Y(w.$slots, "toolbar")
252
+ ])) : I("", !0),
253
+ l(H, {
299
254
  remote: "",
300
255
  ref_key: "$table",
301
256
  ref: i,
302
- "checked-row-keys": k.value,
303
- "onUpdate:checkedRowKeys": e[0] || (e[0] = (z) => k.value = z),
304
- "max-height": me.value,
305
- loading: u.value,
257
+ "checked-row-keys": P.value,
258
+ "onUpdate:checkedRowKeys": k[0] || (k[0] = (j) => P.value = j),
259
+ "max-height": S.value,
260
+ loading: c.value,
306
261
  bordered: !1,
307
262
  "single-line": !1,
308
- columns: P.value,
309
- data: _.value,
310
- pagination: C.value,
311
- "row-key": (z) => z[t.idField]
312
- }, null, 8, ["checked-row-keys", "max-height", "loading", "columns", "data", "pagination", "row-key"]),
313
- g.$slots.addModal ? (p(), R("div", Ut, [
314
- r(D, {
315
- title: "新增",
316
- preset: "card",
317
- show: O.value,
318
- "onUpdate:show": e[1] || (e[1] = (z) => O.value = z),
319
- "header-class": "bg-gray-50",
320
- closable: !1,
321
- "close-on-esc": !1,
322
- "mask-closable": !1,
323
- draggable: !0,
324
- style: de({ width: `${t.modalWidth}px` })
325
- }, {
326
- action: l(() => [
327
- r(s, { justify: "end" }, {
328
- default: l(() => [
329
- r(a(K), {
330
- type: "primary",
331
- loading: w.value,
332
- onClick: re
333
- }, {
334
- default: l(() => [...e[6] || (e[6] = [
335
- Y("保存", -1)
336
- ])]),
337
- _: 1
338
- }, 8, ["loading"]),
339
- r(a(K), { onClick: X }, {
340
- default: l(() => [...e[7] || (e[7] = [
341
- Y("取消", -1)
342
- ])]),
343
- _: 1
344
- })
345
- ]),
346
- _: 1
347
- })
348
- ]),
349
- default: l(() => [
350
- j(g.$slots, "addModal")
351
- ]),
352
- _: 3
353
- }, 8, ["show", "style"])
354
- ])) : N("", !0),
355
- g.$slots.editModal ? (p(), R("div", qt, [
356
- r(D, {
357
- title: "编辑",
358
- show: c.value,
359
- "onUpdate:show": e[2] || (e[2] = (z) => c.value = z),
360
- preset: "card",
361
- "header-class": "bg-gray-50",
362
- closable: !1,
363
- "close-on-esc": !1,
364
- "mask-closable": !1,
365
- draggable: !0,
366
- style: de({ width: `${t.modalWidth}px` })
367
- }, {
368
- action: l(() => [
369
- r(s, { justify: "end" }, {
370
- default: l(() => [
371
- r(a(K), {
372
- type: "primary",
373
- loading: w.value,
374
- onClick: re
375
- }, {
376
- default: l(() => [...e[8] || (e[8] = [
377
- Y("保存", -1)
378
- ])]),
379
- _: 1
380
- }, 8, ["loading"]),
381
- r(a(K), { onClick: X }, {
382
- default: l(() => [...e[9] || (e[9] = [
383
- Y("取消", -1)
384
- ])]),
385
- _: 1
386
- })
387
- ]),
388
- _: 1
389
- })
390
- ]),
391
- default: l(() => [
392
- j(g.$slots, "editModal")
393
- ]),
394
- _: 3
395
- }, 8, ["show", "style"])
396
- ])) : N("", !0)
263
+ columns: y.value,
264
+ data: m.value,
265
+ pagination: T.value,
266
+ "row-key": (j) => j[e.idField]
267
+ }, null, 8, ["checked-row-keys", "max-height", "loading", "columns", "data", "pagination", "row-key"])
397
268
  ])
398
269
  ]),
399
270
  _: 3
400
271
  });
401
272
  };
402
273
  }
403
- }), B = (t) => {
404
- const n = t;
274
+ }), W = (e) => {
275
+ const n = e;
405
276
  return n.install = function(i) {
406
- i.component(n.__name, t);
407
- }, t;
408
- }, Vt = B(Ft), Kt = ["Redirect", "RedirectSon", "login"], se = Te("p-layout", () => {
409
- const t = xe({
277
+ i.component(n.__name, e);
278
+ }, e;
279
+ }, Et = W(Ot), Rt = ["Redirect", "RedirectSon", "login"], re = ke("p-layout", () => {
280
+ const e = we({
410
281
  collapsed: !1,
411
282
  title: "输入项目名称",
412
283
  logo: "https://picsum.photos/id/1/100/100",
@@ -418,164 +289,164 @@ const je = (t) => {
418
289
  enableLanguage: !1
419
290
  });
420
291
  return {
421
- state: t,
422
- initTabs: (f) => {
423
- f.sort((P, v) => (v.meta.affix ? 1 : 0) - (P.meta.affix ? 1 : 0)), t.tabs = f;
292
+ state: e,
293
+ initTabs: (u) => {
294
+ u.sort((v, p) => (p.meta.affix ? 1 : 0) - (v.meta.affix ? 1 : 0)), e.tabs = u;
424
295
  },
425
- addTab: (f) => Kt.includes(f.name) ? !1 : (t.tabs?.some(
426
- (v) => v.fullPath == f.fullPath
427
- ) || t.tabs?.push(f), !0),
428
- closeCurrentTab: (f) => {
429
- const P = t.tabs.findIndex(
430
- (v) => v.fullPath == f.fullPath
296
+ addTab: (u) => Rt.includes(u.name) ? !1 : (e.tabs?.some(
297
+ (p) => p.fullPath == u.fullPath
298
+ ) || e.tabs?.push(u), !0),
299
+ closeCurrentTab: (u) => {
300
+ const v = e.tabs.findIndex(
301
+ (p) => p.fullPath == u.fullPath
431
302
  );
432
- t.tabs.splice(P, 1);
303
+ e.tabs.splice(v, 1);
433
304
  },
434
305
  closeAllTabs: () => {
435
- t.tabs = t.tabs.filter((f) => f?.meta?.affix ?? !1);
306
+ e.tabs = e.tabs.filter((u) => u?.meta?.affix ?? !1);
436
307
  },
437
- closeOtherTabs: (f) => {
438
- t.tabs = t.tabs.filter(
439
- (P) => P.fullPath == f.fullPath || (P?.meta?.affix ?? !1)
308
+ closeOtherTabs: (u) => {
309
+ e.tabs = e.tabs.filter(
310
+ (v) => v.fullPath == u.fullPath || (v?.meta?.affix ?? !1)
440
311
  );
441
312
  },
442
- closeLeftTabs: (f) => {
443
- const P = t.tabs.findIndex(
444
- (v) => v.fullPath == f.fullPath
313
+ closeLeftTabs: (u) => {
314
+ const v = e.tabs.findIndex(
315
+ (p) => p.fullPath == u.fullPath
445
316
  );
446
- t.tabs = t.tabs.filter(
447
- (v, A) => A >= P || (v?.meta?.affix ?? !1)
317
+ e.tabs = e.tabs.filter(
318
+ (p, A) => A >= v || (p?.meta?.affix ?? !1)
448
319
  );
449
320
  },
450
- closeRightTabs: (f) => {
451
- const P = t.tabs.findIndex(
452
- (v) => v.fullPath == f.fullPath
321
+ closeRightTabs: (u) => {
322
+ const v = e.tabs.findIndex(
323
+ (p) => p.fullPath == u.fullPath
453
324
  );
454
- t.tabs = t.tabs.filter(
455
- (v, A) => A <= P || (v?.meta?.affix ?? !1)
325
+ e.tabs = e.tabs.filter(
326
+ (p, A) => A <= v || (p?.meta?.affix ?? !1)
456
327
  );
457
328
  },
458
329
  collapse: () => {
459
- t.collapsed = !t.collapsed;
330
+ e.collapsed = !e.collapsed;
460
331
  },
461
- setTitle: (f) => {
462
- t.title = f;
332
+ setTitle: (u) => {
333
+ e.title = u;
463
334
  },
464
- setLogo: (f) => {
465
- t.logo = f;
335
+ setLogo: (u) => {
336
+ e.logo = u;
466
337
  },
467
- setUser: (f, P) => {
468
- t.uid = f, t.uname = P;
338
+ setUser: (u, v) => {
339
+ e.uid = u, e.uname = v;
469
340
  },
470
- setSettingPages: (f) => {
471
- t.settingPages = f;
341
+ setSettingPages: (u) => {
342
+ e.settingPages = u;
472
343
  },
473
- setLogout: (f) => {
474
- t.logout = f;
344
+ setLogout: (u) => {
345
+ e.logout = u;
475
346
  },
476
- enableLanguage: (f) => {
477
- t.enableLanguage = f;
347
+ enableLanguage: (u) => {
348
+ e.enableLanguage = u;
478
349
  }
479
350
  };
480
- }), Yt = { class: "logo" }, Xt = /* @__PURE__ */ I({
351
+ }), Nt = { class: "logo" }, zt = /* @__PURE__ */ B({
481
352
  __name: "PLogo",
482
- setup(t) {
483
- const n = se();
484
- return (i, y) => (p(), R("div", Yt, [
485
- r(a(Le), {
353
+ setup(e) {
354
+ const n = re();
355
+ return (i, _) => (h(), M("div", Nt, [
356
+ l(a(be), {
486
357
  color: "var(--color-logo)",
487
358
  size: 32,
488
359
  src: a(n).state.logo,
489
- class: ae({ "mr-2": !a(n).state.collapsed })
360
+ class: oe({ "mr-2": !a(n).state.collapsed })
490
361
  }, null, 8, ["src", "class"]),
491
- mt(b("h1", { class: "font-bold ease-in-out ml-2 logo-size" }, H(a(n).state.title), 513), [
492
- [vt, !a(n).state.collapsed]
362
+ ot(b("h1", { class: "font-bold ease-in-out ml-2 logo-size" }, q(a(n).state.title), 513), [
363
+ [st, !a(n).state.collapsed]
493
364
  ])
494
365
  ]));
495
366
  }
496
- }), U = (t, n) => {
497
- const i = t.__vccOpts || t;
498
- for (const [y, h] of n)
499
- i[y] = h;
367
+ }), F = (e, n) => {
368
+ const i = e.__vccOpts || e;
369
+ for (const [_, g] of n)
370
+ i[_] = g;
500
371
  return i;
501
- }, Gt = /* @__PURE__ */ U(Xt, [["__scopeId", "data-v-e48aeefa"]]), Jt = {
372
+ }, Dt = /* @__PURE__ */ F(zt, [["__scopeId", "data-v-e48aeefa"]]), At = {
502
373
  translationApiUrl: "https://translate.zvo.cn/api",
503
374
  defaultLanguage: "chinese",
504
375
  currentLanguage: "",
505
376
  options: [],
506
377
  initLanguages: async () => [],
507
- selectLanguage: async (t) => {
378
+ selectLanguage: async (e) => {
508
379
  }
509
- }, Zt = Te("language", () => {
510
- const t = $(Jt), n = async () => (t.value.options.length === 0 && (t.value.options = await t.value.initLanguages()), t.value.options);
380
+ }, Mt = ke("language", () => {
381
+ const e = N(At), n = async () => (e.value.options.length === 0 && (e.value.options = await e.value.initLanguages()), e.value.options);
511
382
  return {
512
- select: async (c) => {
513
- if (t.value.currentLanguage === c)
383
+ select: async (s) => {
384
+ if (e.value.currentLanguage === s)
514
385
  return;
515
- const w = (await n()).find(
516
- (d) => d.key === c
386
+ const y = (await n()).find(
387
+ (r) => r.key === s
517
388
  );
518
- w && (t.value.currentLanguage = w.key, t.value.selectLanguage(w));
389
+ y && (e.value.currentLanguage = y.key, e.value.selectLanguage(y));
519
390
  },
520
- selectLanguageCallback: async (c) => {
521
- t.value.selectLanguage = c;
391
+ selectLanguageCallback: async (s) => {
392
+ e.value.selectLanguage = s;
522
393
  },
523
- initLanguagesCallback: async (c) => {
524
- t.value.initLanguages = c;
394
+ initLanguagesCallback: async (s) => {
395
+ e.value.initLanguages = s;
525
396
  },
526
397
  getLanguages: n,
527
398
  getCurrentLanguage: async () => {
528
- if (t.value.currentLanguage)
399
+ if (e.value.currentLanguage)
529
400
  return (await n()).find(
530
- (c) => c.key === t.value.currentLanguage
401
+ (s) => s.key === e.value.currentLanguage
531
402
  );
532
403
  },
533
- setTranslationApiUrl: (c) => {
534
- t.value.translationApiUrl = c;
404
+ setTranslationApiUrl: (s) => {
405
+ e.value.translationApiUrl = s;
535
406
  },
536
- getTranslationApiUrl: () => t.value.translationApiUrl,
537
- getDefaultLanguage: () => t.value.defaultLanguage ? t.value.defaultLanguage : "chinese_simplified",
538
- setDefaultLanguage: (c) => {
539
- (c === "Chinese" || c === "chinese") && (c = "chinese_simplified"), t.value.defaultLanguage = c;
407
+ getTranslationApiUrl: () => e.value.translationApiUrl,
408
+ getDefaultLanguage: () => e.value.defaultLanguage ? e.value.defaultLanguage : "chinese_simplified",
409
+ setDefaultLanguage: (s) => {
410
+ (s === "Chinese" || s === "chinese") && (s = "chinese_simplified"), e.value.defaultLanguage = s;
540
411
  }
541
412
  };
542
- }), Qt = { key: 1 }, He = /* @__PURE__ */ I({
413
+ }), It = { key: 1 }, Ae = /* @__PURE__ */ B({
543
414
  __name: "PLanguage",
544
- setup(t) {
415
+ setup(e) {
545
416
  const {
546
417
  select: n,
547
418
  getLanguages: i,
548
- getCurrentLanguage: y,
549
- getDefaultLanguage: h,
550
- getTranslationApiUrl: u
551
- } = Zt(), k = $(), _ = $([]), T = async (c) => await n(c), O = async () => {
552
- const c = window.translate;
553
- c && (c.selectLanguageTag.show = !1, c.selectLanguageTag.languages = (await i()).map((w) => w.key).join(","), c.ignore.class.push("ignore-translate-flag"), c.ignore.id.push("ignore-translation"), c.language.setLocal(h()), c.request.api.translate = "api/v1/translation", c.request.api.connectTest = "api/v1/translation/connect-test", c.request.api.init = "api/v1/translation/init", c.request.api.language = "api/v1/translation/language", c.request.setHost(u()), c.request.listener.start(), c.listener.start(), c.whole.enableAll(), c.execute());
419
+ getCurrentLanguage: _,
420
+ getDefaultLanguage: g,
421
+ getTranslationApiUrl: c
422
+ } = Mt(), P = N(), m = N([]), T = async (s) => await n(s), L = async () => {
423
+ const s = window.translate;
424
+ s && (s.selectLanguageTag.show = !1, s.selectLanguageTag.languages = (await i()).map((y) => y.key).join(","), s.ignore.class.push("ignore-translate-flag"), s.ignore.id.push("ignore-translation"), s.language.setLocal(g()), s.request.api.translate = "api/v1/translation", s.request.api.connectTest = "api/v1/translation/connect-test", s.request.api.init = "api/v1/translation/init", s.request.api.language = "api/v1/translation/language", s.request.setHost(c()), s.request.listener.start(), s.listener.start(), s.whole.enableAll(), s.execute());
554
425
  };
555
426
  return Q(async () => {
556
- await ne(), await O(), k.value = await y(), _.value = await i();
557
- }), (c, w) => {
558
- const d = M, C = K;
559
- return _.value.length > 0 ? (p(), S(a(Z), {
427
+ await se(), await L(), P.value = await _(), m.value = await i();
428
+ }), (s, y) => {
429
+ const r = D, $ = ve;
430
+ return m.value.length > 0 ? (h(), C(a(G), {
560
431
  key: 0,
561
432
  id: "ignore-translation",
562
433
  placement: "bottom-start",
563
434
  trigger: "hover",
564
435
  class: "flex flex-col justify-center h-full ignore",
565
436
  onSelect: T,
566
- options: _.value
437
+ options: m.value
567
438
  }, {
568
- default: l(() => [
569
- r(C, {
439
+ default: o(() => [
440
+ l($, {
570
441
  quaternary: "",
571
442
  type: "info"
572
443
  }, {
573
- default: l(() => [
574
- k.value ? (p(), R("label", Qt, H(k.value?.label), 1)) : (p(), S(d, {
444
+ default: o(() => [
445
+ P.value ? (h(), M("label", It, q(P.value?.label), 1)) : (h(), C(r, {
575
446
  key: 0,
576
447
  size: "18"
577
448
  }, {
578
- default: l(() => [...w[0] || (w[0] = [
449
+ default: o(() => [...y[0] || (y[0] = [
579
450
  b("svg", {
580
451
  xmlns: "http://www.w3.org/2000/svg",
581
452
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
@@ -598,57 +469,57 @@ const je = (t) => {
598
469
  })
599
470
  ]),
600
471
  _: 1
601
- }, 8, ["options"])) : N("", !0);
472
+ }, 8, ["options"])) : I("", !0);
602
473
  };
603
474
  }
604
- }), ea = { class: "layout-header" }, ta = { class: "layout-header-left" }, aa = { class: "link-text" }, na = {
475
+ }), Bt = { class: "layout-header" }, Ht = { class: "layout-header-left" }, Wt = { class: "link-text" }, Ut = {
605
476
  key: 1,
606
477
  class: "link-text"
607
- }, oa = { class: "layout-header-right" }, la = {
478
+ }, jt = { class: "layout-header-right" }, qt = {
608
479
  key: 0,
609
480
  class: "layout-header-trigger-min"
610
- }, sa = { class: "layout-header-trigger layout-header-trigger-min" }, ra = { class: "layout-header-trigger layout-header-trigger-min" }, ca = { class: "avatar" }, ia = /* @__PURE__ */ I({
481
+ }, Ft = { class: "layout-header-trigger layout-header-trigger-min" }, Vt = { class: "layout-header-trigger layout-header-trigger-min" }, Kt = { class: "avatar" }, Yt = /* @__PURE__ */ B({
611
482
  __name: "PHeader",
612
- setup(t) {
613
- const n = fe(), i = Ne(), y = se(), h = oe(), u = le(), k = Ie("reloadPage"), _ = (f) => h.push({ name: f }), T = F(() => O(u.matched)), O = (f) => f.map((P) => {
614
- const v = {
615
- key: P.name,
616
- label: P.meta.title,
617
- icon: P.meta.icon,
618
- meta: P.meta,
619
- disabled: P.path === "/",
483
+ setup(e) {
484
+ const n = ue(), i = $e(), _ = re(), g = le(), c = ce(), P = Re("reloadPage"), m = (u) => g.push({ name: u }), T = K(() => L(c.matched)), L = (u) => u.map((v) => {
485
+ const p = {
486
+ key: v.name,
487
+ label: v.meta.title,
488
+ icon: v.meta.icon,
489
+ meta: v.meta,
490
+ disabled: v.path === "/",
620
491
  children: void 0
621
492
  };
622
- return P.children && P.children.length > 0 && (v.children = O(
623
- P.children
624
- )), v;
625
- }), c = $(!1), w = () => {
626
- document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(), c.value = !1) : (document.documentElement.requestFullscreen(), c.value = !0);
627
- }, d = F(() => {
628
- const f = [];
629
- return f.push({
493
+ return v.children && v.children.length > 0 && (p.children = L(
494
+ v.children
495
+ )), p;
496
+ }), s = N(!1), y = () => {
497
+ document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(), s.value = !1) : (document.documentElement.requestFullscreen(), s.value = !0);
498
+ }, r = K(() => {
499
+ const u = [];
500
+ return u.push({
630
501
  label: "退出登录",
631
502
  key: "logout"
632
- }), y.state.settingPages && y.state.settingPages.length > 0 && y.state.settingPages.forEach((P) => {
633
- f.push({
634
- label: P.title,
635
- key: P.route
503
+ }), _.state.settingPages && _.state.settingPages.length > 0 && _.state.settingPages.forEach((v) => {
504
+ u.push({
505
+ label: v.title,
506
+ key: v.route
636
507
  });
637
- }), f;
638
- }), C = (f) => {
639
- f === "logout" ? m() : h.push({ name: f });
640
- }, m = () => {
508
+ }), u;
509
+ }), $ = (u) => {
510
+ u === "logout" ? z() : g.push({ name: u });
511
+ }, z = () => {
641
512
  i.info({
642
513
  title: "提示",
643
514
  content: "您确定要退出登录吗",
644
515
  positiveText: "确定",
645
516
  negativeText: "取消",
646
517
  onPositiveClick: async () => {
647
- if (y.state.logout)
518
+ if (_.state.logout)
648
519
  try {
649
- await y.state.logout(), localStorage.removeItem("TABS-ROUTES"), n.error("退出成功");
650
- } catch (f) {
651
- console.error(f), n.error("退出登录失败");
520
+ await _.state.logout(), localStorage.removeItem("TABS-ROUTES"), n.error("退出成功");
521
+ } catch (u) {
522
+ console.error(u), n.error("退出登录失败");
652
523
  } finally {
653
524
  location.reload();
654
525
  }
@@ -659,112 +530,112 @@ const je = (t) => {
659
530
  }
660
531
  });
661
532
  };
662
- return (f, P) => {
663
- const v = ze, A = Qe, E = Le;
664
- return p(), R("div", ea, [
665
- b("div", ta, [
533
+ return (u, v) => {
534
+ const p = Ee, A = He, O = be;
535
+ return h(), M("div", Bt, [
536
+ b("div", Ht, [
666
537
  b("div", {
667
538
  class: "ml-1 layout-header-trigger layout-header-trigger-min",
668
- onClick: P[0] || (P[0] = //@ts-ignore
669
- (...x) => a(y).collapse && a(y).collapse(...x))
539
+ onClick: v[0] || (v[0] = //@ts-ignore
540
+ (...S) => a(_).collapse && a(_).collapse(...S))
670
541
  }, [
671
- a(y).state.collapsed ? (p(), S(a(M), {
542
+ a(_).state.collapsed ? (h(), C(a(D), {
672
543
  key: 0,
673
544
  size: "18"
674
545
  }, {
675
- default: l(() => [
676
- r(a(St))
546
+ default: o(() => [
547
+ l(a(ht))
677
548
  ]),
678
549
  _: 1
679
- })) : (p(), S(a(M), {
550
+ })) : (h(), C(a(D), {
680
551
  key: 1,
681
552
  size: "18"
682
553
  }, {
683
- default: l(() => [
684
- r(a(Tt))
554
+ default: o(() => [
555
+ l(a(mt))
685
556
  ]),
686
557
  _: 1
687
558
  }))
688
559
  ]),
689
560
  b("div", {
690
561
  class: "mr-1 layout-header-trigger layout-header-trigger-min",
691
- onClick: P[1] || (P[1] = //@ts-ignore
692
- (...x) => a(k) && a(k)(...x))
562
+ onClick: v[1] || (v[1] = //@ts-ignore
563
+ (...S) => a(P) && a(P)(...S))
693
564
  }, [
694
- r(a(M), { size: "18" }, {
695
- default: l(() => [
696
- r(a(Se))
565
+ l(a(D), { size: "18" }, {
566
+ default: o(() => [
567
+ l(a(Pe))
697
568
  ]),
698
569
  _: 1
699
570
  })
700
571
  ]),
701
- r(a(Je), null, {
702
- default: l(() => [
703
- (p(!0), R(Me, null, _t(T.value, (x) => (p(), R(Me, {
704
- key: x.label
572
+ l(a(Ie), null, {
573
+ default: o(() => [
574
+ (h(!0), M(Se, null, lt(T.value, (S) => (h(), M(Se, {
575
+ key: S.label
705
576
  }, [
706
- x.label ? (p(), S(a(Ze), { key: 0 }, {
707
- default: l(() => [
708
- x.children && x.children.length ? (p(), S(a(Z), {
577
+ S.label ? (h(), C(a(Be), { key: 0 }, {
578
+ default: o(() => [
579
+ S.children && S.children.length ? (h(), C(a(G), {
709
580
  key: 0,
710
- options: x.children,
711
- onSelect: _
581
+ options: S.children,
582
+ onSelect: m
712
583
  }, {
713
- default: l(() => [
714
- b("span", aa, [
715
- x.icon ? (p(), S(we(x.icon), { key: 0 })) : N("", !0),
716
- b("span", null, H(x.label), 1)
584
+ default: o(() => [
585
+ b("span", Wt, [
586
+ S.icon ? (h(), C(he(S.icon), { key: 0 })) : I("", !0),
587
+ b("span", null, q(S.label), 1)
717
588
  ])
718
589
  ]),
719
590
  _: 2
720
- }, 1032, ["options"])) : (p(), R("span", na, [
721
- x.icon ? (p(), S(we(x.icon), { key: 0 })) : N("", !0),
722
- b("span", null, H(x.label), 1)
591
+ }, 1032, ["options"])) : (h(), M("span", Ut, [
592
+ S.icon ? (h(), C(he(S.icon), { key: 0 })) : I("", !0),
593
+ b("span", null, q(S.label), 1)
723
594
  ]))
724
595
  ]),
725
596
  _: 2
726
- }, 1024)) : N("", !0)
597
+ }, 1024)) : I("", !0)
727
598
  ], 64))), 128))
728
599
  ]),
729
600
  _: 1
730
601
  })
731
602
  ]),
732
- b("div", oa, [
733
- a(y).state.enableLanguage ? (p(), R("div", la, [
734
- r(He)
735
- ])) : N("", !0),
736
- b("div", sa, [
737
- r(v, { placement: "bottom" }, {
738
- trigger: l(() => [
739
- r(a(M), {
603
+ b("div", jt, [
604
+ a(_).state.enableLanguage ? (h(), M("div", qt, [
605
+ l(Ae)
606
+ ])) : I("", !0),
607
+ b("div", Ft, [
608
+ l(p, { placement: "bottom" }, {
609
+ trigger: o(() => [
610
+ l(a(D), {
740
611
  size: "18",
741
- onClick: Pe(w, ["stop"])
612
+ onClick: me(y, ["stop"])
742
613
  }, {
743
- default: l(() => [
744
- c.value ? (p(), S(a(Ot), { key: 1 })) : (p(), S(a($t), { key: 0 }))
614
+ default: o(() => [
615
+ s.value ? (h(), C(a(vt), { key: 1 })) : (h(), C(a(_t), { key: 0 }))
745
616
  ]),
746
617
  _: 1
747
618
  })
748
619
  ]),
749
- default: l(() => [
750
- P[2] || (P[2] = b("span", null, "全屏", -1))
620
+ default: o(() => [
621
+ v[2] || (v[2] = b("span", null, "全屏", -1))
751
622
  ]),
752
623
  _: 1
753
624
  })
754
625
  ]),
755
- b("div", ra, [
756
- r(a(Z), {
626
+ b("div", Vt, [
627
+ l(a(G), {
757
628
  trigger: "hover",
758
- onSelect: C,
759
- options: d.value
629
+ onSelect: $,
630
+ options: r.value
760
631
  }, {
761
- default: l(() => [
762
- b("div", ca, [
763
- b("span", null, H(a(y).state.uname), 1),
764
- r(A, { vertical: "" }),
765
- r(E, {
632
+ default: o(() => [
633
+ b("div", Kt, [
634
+ b("span", null, q(a(_).state.uname), 1),
635
+ l(A, { vertical: "" }),
636
+ l(O, {
766
637
  round: "",
767
- src: a(y).state.avatar
638
+ src: a(_).state.avatar
768
639
  }, null, 8, ["src"])
769
640
  ])
770
641
  ]),
@@ -775,20 +646,20 @@ const je = (t) => {
775
646
  ]);
776
647
  };
777
648
  }
778
- }), ua = /* @__PURE__ */ U(ia, [["__scopeId", "data-v-563e4e55"]]), da = { class: "mt-1" }, fa = /* @__PURE__ */ I({
649
+ }), Xt = /* @__PURE__ */ F(Yt, [["__scopeId", "data-v-563e4e55"]]), Jt = { class: "mt-1" }, Zt = /* @__PURE__ */ B({
779
650
  __name: "PContent",
780
651
  props: {
781
652
  loading: { type: Boolean, default: !1 }
782
653
  },
783
- setup(t) {
654
+ setup(e) {
784
655
  return (n, i) => {
785
- const y = Be("RouterView");
786
- return p(), R("div", da, [
787
- t.loading ? N("", !0) : (p(), S(y, { key: 0 }, {
788
- default: l(({ Component: h, route: u }) => [
789
- (p(), S(yt, null, [
790
- (p(), S(we(h), {
791
- key: u.fullPath
656
+ const _ = Ne("RouterView");
657
+ return h(), M("div", Jt, [
658
+ e.loading ? I("", !0) : (h(), C(_, { key: 0 }, {
659
+ default: o(({ Component: g, route: c }) => [
660
+ (h(), C(ct, null, [
661
+ (h(), C(he(g), {
662
+ key: c.fullPath
792
663
  }))
793
664
  ], 1024))
794
665
  ]),
@@ -797,259 +668,259 @@ const je = (t) => {
797
668
  ]);
798
669
  };
799
670
  }
800
- }), ga = { class: "tabs-view-main" }, pa = ["id", "onClick", "onContextmenu"], ha = { class: "tabs-close" }, ma = { class: "tabs-close-btn" }, va = /* @__PURE__ */ I({
671
+ }), Gt = { class: "tabs-view-main" }, Qt = ["id", "onClick", "onContextmenu"], ea = { class: "tabs-close" }, ta = { class: "tabs-close-btn" }, aa = /* @__PURE__ */ B({
801
672
  __name: "PTabs",
802
- setup(t) {
803
- bt((e) => ({
673
+ setup(e) {
674
+ rt((t) => ({
804
675
  v141ddb06: i.value,
805
- cf709148: y.value
676
+ cf709148: _.value
806
677
  }));
807
- const n = et(), i = F(() => n.value.cardColor), y = F(() => n.value.textColor1), h = fe(), u = le(), k = oe(), _ = $(null), T = $(null), O = $(!1), c = se(), w = F(() => c.state.tabs), d = xe({
808
- activeKey: u.fullPath,
678
+ const n = We(), i = K(() => n.value.cardColor), _ = K(() => n.value.textColor1), g = ue(), c = ce(), P = le(), m = N(null), T = N(null), L = N(!1), s = re(), y = K(() => s.state.tabs), r = we({
679
+ activeKey: c.fullPath,
809
680
  scrollable: !0,
810
681
  dropdownX: 0,
811
682
  dropdownY: 0,
812
683
  showDropdown: !1,
813
684
  isMultiHeaderFixed: !0,
814
685
  multiTabsSetting: !0
815
- }), C = ["Login", "Redirect", "ErrorPage"], m = (e) => {
816
- const { fullPath: o, hash: s, meta: L, name: D, params: z, path: V, query: ue } = e;
817
- return { fullPath: o, hash: s, meta: L, name: D, params: z, path: V, query: ue };
818
- }, f = F(() => {
819
- const s = c.state.collapsed ? "64px" : "272px";
686
+ }), $ = ["Login", "Redirect", "ErrorPage"], z = (t) => {
687
+ const { fullPath: d, hash: f, meta: R, name: V, params: ae, path: ne, query: ie } = t;
688
+ return { fullPath: d, hash: f, meta: R, name: V, params: ae, path: ne, query: ie };
689
+ }, u = K(() => {
690
+ const f = s.state.collapsed ? "64px" : "272px";
820
691
  return {
821
- left: s,
822
- width: `calc(100% - ${s})`
692
+ left: f,
693
+ width: `calc(100% - ${f})`
823
694
  };
824
- }), P = F(() => {
825
- const e = w.value.length <= 1;
695
+ }), v = K(() => {
696
+ const t = y.value.length <= 1;
826
697
  return [
827
698
  {
828
699
  label: "刷新当前",
829
700
  key: "1",
830
- icon: () => W(M, null, { default: () => W(Se) })
701
+ icon: () => U(D, null, { default: () => U(Pe) })
831
702
  },
832
703
  {
833
704
  label: "关闭当前",
834
705
  key: "2",
835
- disabled: O.value || e,
836
- icon: () => W(M, null, { default: () => W(Re) })
706
+ disabled: L.value || t,
707
+ icon: () => U(D, null, { default: () => U(Te) })
837
708
  },
838
709
  {
839
710
  label: "关闭其他",
840
711
  key: "3",
841
- disabled: e,
842
- icon: () => W(M, null, { default: () => W(Et) })
712
+ disabled: t,
713
+ icon: () => U(D, null, { default: () => U(bt) })
843
714
  },
844
715
  {
845
716
  label: "关闭全部",
846
717
  key: "4",
847
- disabled: e,
848
- icon: () => W(M, null, { default: () => W(Mt) })
718
+ disabled: t,
719
+ icon: () => U(D, null, { default: () => U(yt) })
849
720
  }
850
721
  ];
851
- }), v = () => {
852
- let e = [];
853
- const o = m(u);
722
+ }), p = () => {
723
+ let t = [];
724
+ const d = z(c);
854
725
  try {
855
- if (c.state.cacheTabs) {
856
- const s = localStorage.getItem("TABS_ROUTES");
857
- e = s ? JSON.parse(s) : [o];
726
+ if (s.state.cacheTabs) {
727
+ const f = localStorage.getItem("TABS_ROUTES");
728
+ t = f ? JSON.parse(f) : [d];
858
729
  }
859
730
  } catch {
860
- e = [o];
731
+ t = [d];
861
732
  } finally {
862
- return e;
733
+ return t;
863
734
  }
864
- }, A = (e) => {
865
- const o = k.getRoutes();
866
- e.forEach((s) => {
867
- const L = o.find((D) => D.path === s.path);
868
- L && (s.meta = L.meta || s.meta, s.name = L.name || s.name);
869
- }), c.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(e));
870
- }, E = () => {
871
- const e = v();
872
- A(e), c.initTabs(e);
873
- }, x = async (e) => {
874
- if (await ne(), !_.value) return;
875
- const o = _.value.offsetWidth, s = _.value.scrollWidth;
876
- o < s ? (d.scrollable = !0, e && [..._.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((D) => {
877
- D.id === `tag${d.activeKey.split("/").join("/")}` && D.scrollIntoView && D.scrollIntoView();
878
- })) : d.scrollable = !1;
879
- }, ee = (e) => !(e.draggedContext.element.meta.affix || e.relatedContext.element.meta.affix), ge = () => {
880
- let e;
881
- e = It(), e.listenTo(T.value, () => x(!0));
882
- }, re = (e) => {
883
- const { fullPath: o } = e;
884
- if (o === u.fullPath || (d.activeKey = o, !e))
735
+ }, A = (t) => {
736
+ const d = P.getRoutes();
737
+ t.forEach((f) => {
738
+ const R = d.find((V) => V.path === f.path);
739
+ R && (f.meta = R.meta || f.meta, f.name = R.name || f.name);
740
+ }), s.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(t));
741
+ }, O = () => {
742
+ const t = p();
743
+ A(t), s.initTabs(t);
744
+ }, S = async (t) => {
745
+ if (await se(), !m.value) return;
746
+ const d = m.value.offsetWidth, f = m.value.scrollWidth;
747
+ d < f ? (r.scrollable = !0, t && [...m.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((V) => {
748
+ V.id === `tag${r.activeKey.split("/").join("/")}` && V.scrollIntoView && V.scrollIntoView();
749
+ })) : r.scrollable = !1;
750
+ }, ee = (t) => !(t.draggedContext.element.meta.affix || t.relatedContext.element.meta.affix), de = () => {
751
+ let t;
752
+ t = xt(), t.listenTo(T.value, () => S(!0));
753
+ }, w = (t) => {
754
+ const { fullPath: d } = t;
755
+ if (d === c.fullPath || (r.activeKey = d, !t))
885
756
  return;
886
- const { replace: s } = k;
887
- toString.call(e), s(e).catch(console.error);
888
- }, ce = (e, o) => {
889
- e.preventDefault(), O.value = o.path === "/home", d.showDropdown = !1, ne().then(() => {
890
- d.showDropdown = !0, d.dropdownX = e.clientX, d.dropdownY = e.clientY;
757
+ const { replace: f } = P;
758
+ toString.call(t), f(t).catch(console.error);
759
+ }, k = (t, d) => {
760
+ t.preventDefault(), L.value = d.path === "/home", r.showDropdown = !1, se().then(() => {
761
+ r.showDropdown = !0, r.dropdownX = t.clientX, r.dropdownY = t.clientY;
891
762
  });
892
- }, X = () => {
893
- if (u.meta.keepAlive) {
894
- var e = k.currentRoute.value.matched.find(
895
- (o) => o.name == u.name
763
+ }, x = () => {
764
+ if (c.meta.keepAlive) {
765
+ var t = P.currentRoute.value.matched.find(
766
+ (d) => d.name == c.name
896
767
  );
897
- e && e.components?.default?.name;
768
+ t && t.components?.default?.name;
898
769
  }
899
- }, G = (e) => {
900
- if (w.value.length === 1)
901
- return h.warning("这已经是最后一页,不能再关闭了!");
902
- if (X(), c.closeCurrentTab(e), d.activeKey === e.fullPath) {
903
- const o = w.value[Math.max(0, w.value.length - 1)];
904
- d.activeKey = o.fullPath, k.push(o);
770
+ }, E = (t) => {
771
+ if (y.value.length === 1)
772
+ return g.warning("这已经是最后一页,不能再关闭了!");
773
+ if (x(), s.closeCurrentTab(t), r.activeKey === t.fullPath) {
774
+ const d = y.value[Math.max(0, y.value.length - 1)];
775
+ r.activeKey = d.fullPath, P.push(d);
905
776
  }
906
- x();
907
- }, pe = (e) => {
908
- const { fullPath: o } = e, s = w.value.find((L) => L.fullPath == o);
909
- G(s);
910
- }, he = (e) => {
911
- c.closeOtherTabs(e), d.activeKey = e.fullPath, k.replace(e.fullPath), x();
912
- }, q = () => {
913
- c.closeAllTabs(), x();
914
- }, me = Ie("reloadPage"), ie = (e) => {
915
- switch (e) {
777
+ S();
778
+ }, H = (t) => {
779
+ const { fullPath: d } = t, f = y.value.find((R) => R.fullPath == d);
780
+ E(f);
781
+ }, j = (t) => {
782
+ s.closeOtherTabs(t), r.activeKey = t.fullPath, P.replace(t.fullPath), S();
783
+ }, Z = () => {
784
+ s.closeAllTabs(), S();
785
+ }, X = Re("reloadPage"), te = (t) => {
786
+ switch (t) {
916
787
  //刷新
917
788
  case "1":
918
- me();
789
+ X();
919
790
  break;
920
791
  //关闭
921
792
  case "2":
922
- G(u);
793
+ E(c);
923
794
  break;
924
795
  //关闭其他
925
796
  case "3":
926
- he(u);
797
+ j(c);
927
798
  break;
928
799
  //关闭所有
929
800
  case "4":
930
- q();
801
+ Z();
931
802
  break;
932
803
  }
933
- x(), d.showDropdown = !1;
934
- }, te = (e, o) => {
935
- const s = _.value.scrollLeft, L = o > 0 && s + o >= e || o < 0 && s + o <= e ? e : s + o;
936
- if (_.value && _.value.scrollTo(L, 0), L !== e)
937
- return window.requestAnimationFrame(() => te(e, o));
938
- }, ve = () => {
939
- const e = _.value.offsetWidth, o = _.value.scrollLeft;
940
- if (!o) return;
941
- const s = o > e ? o - e : 0;
942
- te(s, (s - o) / 20);
943
- }, g = () => {
944
- const e = _.value.offsetWidth, o = _.value.scrollWidth, s = _.value.scrollLeft;
945
- if (o - s <= e) return;
946
- const L = o - s > e * 2 ? s + e : o - e;
947
- te(L, (L - s) / 20);
804
+ S(), r.showDropdown = !1;
805
+ }, J = (t, d) => {
806
+ const f = m.value.scrollLeft, R = d > 0 && f + d >= t || d < 0 && f + d <= t ? t : f + d;
807
+ if (m.value && m.value.scrollTo(R, 0), R !== t)
808
+ return window.requestAnimationFrame(() => J(t, d));
809
+ }, fe = () => {
810
+ const t = m.value.offsetWidth, d = m.value.scrollLeft;
811
+ if (!d) return;
812
+ const f = d > t ? d - t : 0;
813
+ J(f, (f - d) / 20);
814
+ }, ge = () => {
815
+ const t = m.value.offsetWidth, d = m.value.scrollWidth, f = m.value.scrollLeft;
816
+ if (d - f <= t) return;
817
+ const R = d - f > t * 2 ? f + t : d - t;
818
+ J(R, (R - f) / 20);
948
819
  };
949
820
  return window.addEventListener("beforeunload", () => {
950
- localStorage.setItem("TABS_ROUTES", JSON.stringify(w.value));
821
+ localStorage.setItem("TABS_ROUTES", JSON.stringify(y.value));
951
822
  }), window.addEventListener(
952
823
  "scroll",
953
- (e) => {
954
- let o = e.target.scrollTop || document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
955
- d.isMultiHeaderFixed = o >= 64;
824
+ (t) => {
825
+ let d = t.target.scrollTop || document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
826
+ r.isMultiHeaderFixed = d >= 64;
956
827
  },
957
828
  !0
958
- ), We(
959
- () => u.fullPath,
960
- (e) => {
961
- C.includes(u.name) || (d.activeKey = e, c.addTab(m(u)), x(!0));
829
+ ), ze(
830
+ () => c.fullPath,
831
+ (t) => {
832
+ $.includes(c.name) || (r.activeKey = t, s.addTab(z(c)), S(!0));
962
833
  },
963
834
  { immediate: !0 }
964
- ), E(), Q(() => ge()), (e, o) => (p(), R("div", {
835
+ ), O(), Q(() => de()), (t, d) => (h(), M("div", {
965
836
  class: "box-border tabs-view tabs-view-fix tabs-view-default-background",
966
- style: de(f.value)
837
+ style: De(u.value)
967
838
  }, [
968
- b("div", ga, [
839
+ b("div", Gt, [
969
840
  b("div", {
970
841
  ref_key: "navWrap",
971
842
  ref: T,
972
- class: ae(["tabs-card", { "tabs-card-scrollable": d.scrollable }])
843
+ class: oe(["tabs-card", { "tabs-card-scrollable": r.scrollable }])
973
844
  }, [
974
845
  b("span", {
975
- class: ae(["tabs-card-prev", { "tabs-card-prev-hide": !d.scrollable }]),
976
- onClick: ve
846
+ class: oe(["tabs-card-prev", { "tabs-card-prev-hide": !r.scrollable }]),
847
+ onClick: fe
977
848
  }, [
978
- r(a(M), {
849
+ l(a(D), {
979
850
  size: "16",
980
851
  color: "#515a6e"
981
852
  }, {
982
- default: l(() => [
983
- r(a(Rt))
853
+ default: o(() => [
854
+ l(a(wt))
984
855
  ]),
985
856
  _: 1
986
857
  })
987
858
  ], 2),
988
859
  b("span", {
989
- class: ae(["tabs-card-next", { "tabs-card-next-hide": !d.scrollable }]),
990
- onClick: g
860
+ class: oe(["tabs-card-next", { "tabs-card-next-hide": !r.scrollable }]),
861
+ onClick: ge
991
862
  }, [
992
- r(a(M), {
863
+ l(a(D), {
993
864
  size: "16",
994
865
  color: "#515a6e"
995
866
  }, {
996
- default: l(() => [
997
- r(a(Nt))
867
+ default: o(() => [
868
+ l(a(Pt))
998
869
  ]),
999
870
  _: 1
1000
871
  })
1001
872
  ], 2),
1002
873
  b("div", {
1003
874
  ref_key: "navScroll",
1004
- ref: _,
875
+ ref: m,
1005
876
  class: "tabs-card-scroll"
1006
877
  }, [
1007
- r(a(Bt), {
1008
- list: w.value,
878
+ l(a(Ct), {
879
+ list: y.value,
1009
880
  animation: "300",
1010
881
  "item-key": "fullPath",
1011
882
  class: "flex",
1012
883
  move: ee
1013
884
  }, {
1014
- item: l(({ element: s }) => [
885
+ item: o(({ element: f }) => [
1015
886
  b("div", {
1016
- id: `tag${s.fullPath.split("/").join("/")}`,
1017
- class: ae(["tabs-card-scroll-item", { "active-item": d.activeKey === s.fullPath }]),
1018
- onClick: Pe((L) => re(s), ["stop"]),
1019
- onContextmenu: (L) => ce(L, s)
887
+ id: `tag${f.fullPath.split("/").join("/")}`,
888
+ class: oe(["tabs-card-scroll-item", { "active-item": r.activeKey === f.fullPath }]),
889
+ onClick: me((R) => w(f), ["stop"]),
890
+ onContextmenu: (R) => k(R, f)
1020
891
  }, [
1021
- b("span", null, H(s.meta.title), 1),
1022
- s.meta.affix ? N("", !0) : (p(), S(a(M), {
892
+ b("span", null, q(f.meta.title), 1),
893
+ f.meta.affix ? I("", !0) : (h(), C(a(D), {
1023
894
  key: 0,
1024
895
  size: "14",
1025
- onClick: Pe((L) => pe(s), ["stop"])
896
+ onClick: me((R) => H(f), ["stop"])
1026
897
  }, {
1027
- default: l(() => [
1028
- r(a(Re))
898
+ default: o(() => [
899
+ l(a(Te))
1029
900
  ]),
1030
901
  _: 1
1031
902
  }, 8, ["onClick"]))
1032
- ], 42, pa)
903
+ ], 42, Qt)
1033
904
  ]),
1034
905
  _: 1
1035
906
  }, 8, ["list"])
1036
907
  ], 512)
1037
908
  ], 2),
1038
- b("div", ha, [
1039
- r(a(Z), {
909
+ b("div", ea, [
910
+ l(a(G), {
1040
911
  trigger: "hover",
1041
- onSelect: ie,
912
+ onSelect: te,
1042
913
  placement: "bottom-end",
1043
- options: P.value
914
+ options: v.value
1044
915
  }, {
1045
- default: l(() => [
1046
- b("div", ma, [
1047
- r(a(M), {
916
+ default: o(() => [
917
+ b("div", ta, [
918
+ l(a(D), {
1048
919
  size: "16",
1049
920
  color: "#515a6e"
1050
921
  }, {
1051
- default: l(() => [
1052
- r(a(At))
922
+ default: o(() => [
923
+ l(a(kt))
1053
924
  ]),
1054
925
  _: 1
1055
926
  })
@@ -1058,115 +929,115 @@ const je = (t) => {
1058
929
  _: 1
1059
930
  }, 8, ["options"])
1060
931
  ]),
1061
- r(a(Z), {
1062
- show: d.showDropdown,
1063
- x: d.dropdownX,
1064
- y: d.dropdownY,
1065
- onClickoutside: o[0] || (o[0] = (s) => d.showDropdown = !1),
932
+ l(a(G), {
933
+ show: r.showDropdown,
934
+ x: r.dropdownX,
935
+ y: r.dropdownY,
936
+ onClickoutside: d[0] || (d[0] = (f) => r.showDropdown = !1),
1066
937
  placement: "bottom-start",
1067
- onSelect: ie,
1068
- options: P.value
938
+ onSelect: te,
939
+ options: v.value
1069
940
  }, null, 8, ["show", "x", "y", "options"])
1070
941
  ])
1071
942
  ], 4));
1072
943
  }
1073
- }), _a = /* @__PURE__ */ U(va, [["__scopeId", "data-v-48b3be2d"]]), ya = /* @__PURE__ */ I({
944
+ }), na = /* @__PURE__ */ F(aa, [["__scopeId", "data-v-48b3be2d"]]), oa = /* @__PURE__ */ B({
1074
945
  __name: "PMenus",
1075
- setup(t) {
1076
- const n = le(), i = oe(), y = se(), h = $(n.name), u = $(
1077
- n.matched && n.matched.length ? n.matched.map((d) => d.name) : []
1078
- ), k = $([]), _ = (d) => {
1079
- /http(s)?:/.test(d) ? window.open(d) : i.push({ name: d });
1080
- }, T = (d) => {
1081
- if (!d) return;
1082
- const C = d.find((m) => u.value.indexOf(m) === -1);
1083
- u.value = C ? [C] : [];
1084
- }, O = () => {
1085
- const d = n.matched;
1086
- u.value = d.map((m) => m.name);
1087
- const C = n.meta?.activeMenu || "";
1088
- h.value = C || n.name;
1089
- }, c = (d, C = [], m = !1) => {
1090
- const f = [], P = [
946
+ setup(e) {
947
+ const n = ce(), i = le(), _ = re(), g = N(n.name), c = N(
948
+ n.matched && n.matched.length ? n.matched.map((r) => r.name) : []
949
+ ), P = N([]), m = (r) => {
950
+ /http(s)?:/.test(r) ? window.open(r) : i.push({ name: r });
951
+ }, T = (r) => {
952
+ if (!r) return;
953
+ const $ = r.find((z) => c.value.indexOf(z) === -1);
954
+ c.value = $ ? [$] : [];
955
+ }, L = () => {
956
+ const r = n.matched;
957
+ c.value = r.map((z) => z.name);
958
+ const $ = n.meta?.activeMenu || "";
959
+ g.value = $ || n.name;
960
+ }, s = (r, $ = [], z = !1) => {
961
+ const u = [], v = [
1091
962
  "/:path(.*)*",
1092
963
  "/redirect",
1093
964
  "/redirect/:path(.*)",
1094
965
  "/login",
1095
966
  "/oidc-callback"
1096
967
  ];
1097
- if (!d || d.length === 0)
1098
- return f;
1099
- d = d.sort((v, A) => {
1100
- let E = (A.children?.length ? 1 : 0) - (v.children?.length ? 1 : 0);
1101
- return E === 0 && (E = (v.meta?.sort ?? 0) - (A.meta?.sort ?? 0)), E;
968
+ if (!r || r.length === 0)
969
+ return u;
970
+ r = r.sort((p, A) => {
971
+ let O = (A.children?.length ? 1 : 0) - (p.children?.length ? 1 : 0);
972
+ return O === 0 && (O = (p.meta?.sort ?? 0) - (A.meta?.sort ?? 0)), O;
1102
973
  });
1103
- for (const v of d) {
1104
- if (m || (v.meta?.hidden || !1) == !0 || P.includes(v.path)) {
1105
- C.push(v.name), v.children && v.children.length > 0 && c(v.children, C, !0);
974
+ for (const p of r) {
975
+ if (z || (p.meta?.hidden || !1) == !0 || v.includes(p.path)) {
976
+ $.push(p.name), p.children && p.children.length > 0 && s(p.children, $, !0);
1106
977
  continue;
1107
978
  }
1108
- const A = v.meta?.alwaysShow != !0 && v?.children?.filter((ee) => !ee?.meta?.hidden)?.length === 1, E = A ? v.children[0] : v, x = {
1109
- key: E.name,
1110
- label: E.meta?.title,
1111
- affix: E.meta?.affix,
1112
- sort: E.meta?.sort,
1113
- path: E.path,
1114
- redirect: E.redirect,
1115
- icon: A ? v.meta?.icon : E.meta?.icon,
1116
- permissions: E.meta?.permissions,
1117
- meta: E.meta,
979
+ const A = p.meta?.alwaysShow != !0 && p?.children?.filter((ee) => !ee?.meta?.hidden)?.length === 1, O = A ? p.children[0] : p, S = {
980
+ key: O.name,
981
+ label: O.meta?.title,
982
+ affix: O.meta?.affix,
983
+ sort: O.meta?.sort,
984
+ path: O.path,
985
+ redirect: O.redirect,
986
+ icon: A ? p.meta?.icon : O.meta?.icon,
987
+ permissions: O.meta?.permissions,
988
+ meta: O.meta,
1118
989
  children: void 0
1119
990
  };
1120
- if (!C.includes(v.name)) {
1121
- if (f.push(x), C.push(v.name), A) {
1122
- c(v.children, C, m);
991
+ if (!$.includes(p.name)) {
992
+ if (u.push(S), $.push(p.name), A) {
993
+ s(p.children, $, z);
1123
994
  continue;
1124
995
  }
1125
- v.children && v.children.length > 0 && (x.children = c(v.children, C, m));
996
+ p.children && p.children.length > 0 && (S.children = s(p.children, $, z));
1126
997
  }
1127
998
  }
1128
- return f;
1129
- }, w = () => {
1130
- const d = i.getRoutes();
1131
- k.value = c(d);
999
+ return u;
1000
+ }, y = () => {
1001
+ const r = i.getRoutes();
1002
+ P.value = s(r);
1132
1003
  };
1133
- return We(
1004
+ return ze(
1134
1005
  () => n.fullPath,
1135
1006
  () => {
1136
- O();
1007
+ L();
1137
1008
  }
1138
1009
  ), Q(() => {
1139
- w(), O();
1140
- }), (d, C) => (p(), S(a(tt), {
1010
+ y(), L();
1011
+ }), (r, $) => (h(), C(a(Ue), {
1141
1012
  class: "h-full",
1142
1013
  inverted: "",
1143
1014
  mode: "vertical",
1144
- options: k.value,
1145
- collapsed: a(y).state.collapsed,
1015
+ options: P.value,
1016
+ collapsed: a(_).state.collapsed,
1146
1017
  "collapsed-width": 64,
1147
1018
  "collapsed-icon-size": 20,
1148
1019
  indent: 24,
1149
- "expanded-keys": u.value,
1150
- value: h.value,
1151
- "onUpdate:value": _,
1020
+ "expanded-keys": c.value,
1021
+ value: g.value,
1022
+ "onUpdate:value": m,
1152
1023
  "onUpdate:expandedKeys": T
1153
1024
  }, null, 8, ["options", "collapsed", "expanded-keys", "value"]));
1154
1025
  }
1155
- }), ba = { class: "layout-content-main layout-content-main-fix" }, wa = { class: "main-view main-view-fix" }, Pa = /* @__PURE__ */ I({
1026
+ }), sa = { class: "layout-content-main layout-content-main-fix" }, la = { class: "main-view main-view-fix" }, ca = /* @__PURE__ */ B({
1156
1027
  __name: "PLayout",
1157
- setup(t) {
1158
- const n = se(), i = $(!1);
1159
- return wt("reloadPage", () => {
1160
- i.value = !0, ne(() => i.value = !1);
1161
- }), (h, u) => {
1162
- const k = st;
1163
- return p(), S(a(Ee), {
1028
+ setup(e) {
1029
+ const n = re(), i = N(!1);
1030
+ return it("reloadPage", () => {
1031
+ i.value = !0, se(() => i.value = !1);
1032
+ }), (g, c) => {
1033
+ const P = Ke;
1034
+ return h(), C(a(xe), {
1164
1035
  "has-sider": "",
1165
1036
  class: "layout",
1166
1037
  position: "absolute"
1167
1038
  }, {
1168
- default: l(() => [
1169
- r(a(at), {
1039
+ default: o(() => [
1040
+ l(a(je), {
1170
1041
  class: "layout-sider",
1171
1042
  inverted: "",
1172
1043
  "show-trigger": "bar",
@@ -1180,37 +1051,37 @@ const je = (t) => {
1180
1051
  onCollapse: a(n).collapse,
1181
1052
  onExpand: a(n).collapse
1182
1053
  }, {
1183
- default: l(() => [
1184
- r(a(nt), { vertical: "" }, {
1185
- default: l(() => [
1186
- r(Gt),
1187
- r(ya)
1054
+ default: o(() => [
1055
+ l(a(qe), { vertical: "" }, {
1056
+ default: o(() => [
1057
+ l(Dt),
1058
+ l(oa)
1188
1059
  ]),
1189
1060
  _: 1
1190
1061
  })
1191
1062
  ]),
1192
1063
  _: 1
1193
1064
  }, 8, ["collapsed", "onCollapse", "onExpand"]),
1194
- r(a(Ee), null, {
1195
- default: l(() => [
1196
- r(a(ot), { position: "absolute" }, {
1197
- default: l(() => [
1198
- r(ua)
1065
+ l(a(xe), null, {
1066
+ default: o(() => [
1067
+ l(a(Fe), { position: "absolute" }, {
1068
+ default: o(() => [
1069
+ l(Xt)
1199
1070
  ]),
1200
1071
  _: 1
1201
1072
  }),
1202
- r(a(lt), { class: "layout-content layout-default-background" }, {
1203
- default: l(() => [
1204
- b("div", ba, [
1205
- r(_a),
1206
- b("div", wa, [
1207
- r(fa, { loading: i.value }, null, 8, ["loading"])
1073
+ l(a(Ve), { class: "layout-content layout-default-background" }, {
1074
+ default: o(() => [
1075
+ b("div", sa, [
1076
+ l(na),
1077
+ b("div", la, [
1078
+ l(Zt, { loading: i.value }, null, 8, ["loading"])
1208
1079
  ])
1209
1080
  ])
1210
1081
  ]),
1211
1082
  _: 1
1212
1083
  }),
1213
- r(k, {
1084
+ l(P, {
1214
1085
  right: 20,
1215
1086
  class: "z-50"
1216
1087
  })
@@ -1222,12 +1093,12 @@ const je = (t) => {
1222
1093
  });
1223
1094
  };
1224
1095
  }
1225
- }), ka = /* @__PURE__ */ U(Pa, [["__scopeId", "data-v-0bac2e7d"]]), La = {};
1226
- function Ca(t, n) {
1227
- const i = Be("router-view");
1228
- return p(), S(i);
1096
+ }), ra = /* @__PURE__ */ F(ca, [["__scopeId", "data-v-0bac2e7d"]]), ia = {};
1097
+ function ua(e, n) {
1098
+ const i = Ne("router-view");
1099
+ return h(), C(i);
1229
1100
  }
1230
- const xa = /* @__PURE__ */ U(La, [["render", Ca]]), Sa = B(xa), Ta = B(ka), $a = /* @__PURE__ */ I({
1101
+ const da = /* @__PURE__ */ F(ia, [["render", ua]]), fa = W(da), ga = W(ra), pa = /* @__PURE__ */ B({
1231
1102
  __name: "PApplication",
1232
1103
  props: {
1233
1104
  theme: {},
@@ -1243,23 +1114,23 @@ const xa = /* @__PURE__ */ U(La, [["render", Ca]]), Sa = B(xa), Ta = B(ka), $a =
1243
1114
  }
1244
1115
  } }
1245
1116
  },
1246
- setup(t) {
1117
+ setup(e) {
1247
1118
  return (n, i) => {
1248
- const y = rt;
1249
- return p(), S(y, {
1250
- locale: a(it),
1251
- theme: t.theme,
1252
- "theme-overrides": t.themeOverrides,
1253
- "date-locale": a(ct)
1119
+ const _ = Ye;
1120
+ return h(), C(_, {
1121
+ locale: a(Je),
1122
+ theme: e.theme,
1123
+ "theme-overrides": e.themeOverrides,
1124
+ "date-locale": a(Xe)
1254
1125
  }, {
1255
- default: l(() => [
1256
- r(a(ut), null, {
1257
- default: l(() => [
1258
- r(a(dt), null, {
1259
- default: l(() => [
1260
- r(a(ft), null, {
1261
- default: l(() => [
1262
- j(n.$slots, "default")
1126
+ default: o(() => [
1127
+ l(a(Ze), null, {
1128
+ default: o(() => [
1129
+ l(a(Ge), null, {
1130
+ default: o(() => [
1131
+ l(a(Qe), null, {
1132
+ default: o(() => [
1133
+ Y(n.$slots, "default")
1263
1134
  ]),
1264
1135
  _: 3
1265
1136
  })
@@ -1274,11 +1145,10 @@ const xa = /* @__PURE__ */ U(La, [["render", Ca]]), Sa = B(xa), Ta = B(ka), $a =
1274
1145
  }, 8, ["locale", "theme", "theme-overrides", "date-locale"]);
1275
1146
  };
1276
1147
  }
1277
- }), Oa = B($a), Ea = /* @__PURE__ */ I({
1148
+ }), ha = W(pa), ma = /* @__PURE__ */ B({
1278
1149
  __name: "PModal",
1279
1150
  props: {
1280
1151
  saveBtnText: { default: "保存" },
1281
- closable: { type: Boolean, default: !1 },
1282
1152
  title: {},
1283
1153
  width: { default: 800 },
1284
1154
  height: { default: 500 },
@@ -1288,90 +1158,90 @@ const xa = /* @__PURE__ */ U(La, [["render", Ca]]), Sa = B(xa), Ta = B(ka), $a =
1288
1158
  onClose: {}
1289
1159
  },
1290
1160
  emits: ["update:visible", "update:loading"],
1291
- setup(t, { expose: n, emit: i }) {
1292
- const y = fe(), h = t, u = i, k = async () => {
1293
- u("update:loading", !0);
1161
+ setup(e, { expose: n, emit: i }) {
1162
+ const _ = ue(), g = e, c = i, P = async () => {
1163
+ c("update:loading", !0);
1294
1164
  try {
1295
- h.onSave && await h.onSave() && _();
1296
- } catch (w) {
1297
- y.error(w.message);
1165
+ g.onSave && await g.onSave() && m();
1166
+ } catch (y) {
1167
+ _.error(y.message);
1298
1168
  } finally {
1299
- u("update:loading", !1);
1169
+ c("update:loading", !1);
1300
1170
  }
1301
- }, _ = () => {
1302
- u("update:visible", !1), u("update:loading", !1);
1171
+ }, m = () => {
1172
+ c("update:visible", !1), c("update:loading", !1);
1303
1173
  }, T = async () => {
1304
1174
  try {
1305
- h.onClose ? await h.onClose() && _() : _();
1306
- } catch (w) {
1307
- y.error(w.message), u("update:loading", !1);
1175
+ g.onClose ? await g.onClose() && m() : m();
1176
+ } catch (y) {
1177
+ _.error(y.message), c("update:loading", !1);
1308
1178
  }
1309
1179
  };
1310
1180
  return n({
1311
1181
  open: () => {
1312
- u("update:visible", !0), u("update:loading", !1);
1182
+ c("update:visible", !0), c("update:loading", !1);
1313
1183
  },
1314
1184
  close: () => {
1315
- u("update:visible", !1), u("update:loading", !1);
1185
+ c("update:visible", !1), c("update:loading", !1);
1316
1186
  }
1317
- }), (w, d) => {
1318
- const C = gt, m = K, f = ke;
1319
- return p(), S(a(De), Pt({
1187
+ }), (y, r) => {
1188
+ const $ = tt, z = ve, u = _e;
1189
+ return h(), C(a(et), ut({
1320
1190
  ref: "$modal",
1321
1191
  preset: "card"
1322
- }, w.$attrs, {
1192
+ }, y.$attrs, {
1323
1193
  "header-class": "bg-gray-50",
1324
- show: h.visible,
1194
+ show: g.visible,
1325
1195
  draggable: !0,
1326
1196
  closable: !1,
1327
1197
  "close-on-esc": !1,
1328
1198
  "mask-closable": !1,
1329
1199
  bordered: !1,
1330
- style: { width: `${h.width}px` },
1331
- onClose: _
1200
+ style: { width: `${g.width}px` },
1201
+ onClose: m
1332
1202
  }), {
1333
- header: l(() => [
1334
- w.$slots.header ? j(w.$slots, "header", { key: 0 }) : h.title ? (p(), S(C, { key: 1 }, {
1335
- default: l(() => [
1336
- Y(H(t.title), 1)
1203
+ header: o(() => [
1204
+ y.$slots.header ? Y(y.$slots, "header", { key: 0 }) : g.title ? (h(), C($, { key: 1 }, {
1205
+ default: o(() => [
1206
+ pe(q(e.title), 1)
1337
1207
  ]),
1338
1208
  _: 1
1339
- })) : N("", !0)
1209
+ })) : I("", !0)
1340
1210
  ]),
1341
- "header-extra": l(() => [
1342
- j(w.$slots, "header-extra")
1211
+ "header-extra": o(() => [
1212
+ Y(y.$slots, "header-extra")
1343
1213
  ]),
1344
- default: l(() => [
1214
+ default: o(() => [
1345
1215
  b("div", {
1346
1216
  class: "overflow-y-auto overflow-hidden mt-5",
1347
- style: de({ maxHeight: `${h.height}px` })
1217
+ style: De({ maxHeight: `${g.height}px` })
1348
1218
  }, [
1349
- j(w.$slots, "default")
1219
+ Y(y.$slots, "default")
1350
1220
  ], 4)
1351
1221
  ]),
1352
- footer: l(() => [
1353
- j(w.$slots, "footer")
1222
+ footer: o(() => [
1223
+ Y(y.$slots, "footer")
1354
1224
  ]),
1355
- action: l(() => [
1356
- r(f, { justify: "end" }, {
1357
- default: l(() => [
1358
- r(m, {
1225
+ action: o(() => [
1226
+ l(u, { justify: "end" }, {
1227
+ default: o(() => [
1228
+ l(z, {
1359
1229
  type: "primary",
1360
- loading: t.loading,
1361
- onClick: k
1230
+ loading: e.loading,
1231
+ onClick: P
1362
1232
  }, {
1363
- default: l(() => [
1364
- Y(H(t.saveBtnText), 1)
1233
+ default: o(() => [
1234
+ pe(q(e.saveBtnText), 1)
1365
1235
  ]),
1366
1236
  _: 1
1367
1237
  }, 8, ["loading"]),
1368
- j(w.$slots, "action-extra", { loading: t.loading }),
1369
- r(m, {
1238
+ Y(y.$slots, "action-extra", { loading: e.loading }),
1239
+ l(z, {
1370
1240
  onClick: T,
1371
- loading: t.loading
1241
+ loading: e.loading
1372
1242
  }, {
1373
- default: l(() => [...d[0] || (d[0] = [
1374
- Y("取消", -1)
1243
+ default: o(() => [...r[0] || (r[0] = [
1244
+ pe("取消", -1)
1375
1245
  ])]),
1376
1246
  _: 1
1377
1247
  }, 8, ["loading"])
@@ -1383,103 +1253,103 @@ const xa = /* @__PURE__ */ U(La, [["render", Ca]]), Sa = B(xa), Ta = B(ka), $a =
1383
1253
  }, 16, ["show", "style"]);
1384
1254
  };
1385
1255
  }
1386
- }), Ma = B(Ea), Ra = B(He), Na = I({
1256
+ }), _a = W(ma), va = W(Ae), ba = B({
1387
1257
  name: "Redirect",
1388
1258
  setup() {
1389
- const t = le(), n = oe();
1390
- return kt(() => {
1391
- const { params: i, query: y } = t, { path: h } = i;
1259
+ const e = ce(), n = le();
1260
+ return dt(() => {
1261
+ const { params: i, query: _ } = e, { path: g } = i;
1392
1262
  n.replace({
1393
- path: "/" + (Array.isArray(h) ? h.join("/") : h),
1394
- query: y
1263
+ path: "/" + (Array.isArray(g) ? g.join("/") : g),
1264
+ query: _
1395
1265
  });
1396
- }), () => /* @__PURE__ */ React.createElement(pt, null);
1266
+ }), () => /* @__PURE__ */ React.createElement(at, null);
1397
1267
  }
1398
- }), Aa = B(Na), Da = { class: "frame" }, za = ["src"], Ia = /* @__PURE__ */ I({
1268
+ }), ya = W(ba), wa = { class: "frame" }, Pa = ["src"], ka = /* @__PURE__ */ B({
1399
1269
  __name: "PIframe",
1400
- setup(t) {
1401
- const n = le(), i = $(!1), y = $(null), h = $("");
1402
- a(n.meta)?.frameSrc && (h.value = a(n.meta)?.frameSrc);
1403
- function u() {
1270
+ setup(e) {
1271
+ const n = ce(), i = N(!1), _ = N(null), g = N("");
1272
+ a(n.meta)?.frameSrc && (g.value = a(n.meta)?.frameSrc);
1273
+ function c() {
1404
1274
  i.value = !1;
1405
1275
  }
1406
- function k() {
1407
- ne(() => {
1408
- const _ = a(y);
1409
- if (!_) return;
1410
- const T = _;
1276
+ function P() {
1277
+ se(() => {
1278
+ const m = a(_);
1279
+ if (!m) return;
1280
+ const T = m;
1411
1281
  T.attachEvent ? T.attachEvent("onload", () => {
1412
- u();
1413
- }) : _.onload = () => {
1414
- u();
1282
+ c();
1283
+ }) : m.onload = () => {
1284
+ c();
1415
1285
  };
1416
1286
  });
1417
1287
  }
1418
1288
  return Q(() => {
1419
- i.value = !0, k();
1420
- }), (_, T) => {
1421
- const O = ht;
1422
- return p(), S(O, { show: i.value }, {
1423
- default: l(() => [
1424
- b("div", Da, [
1289
+ i.value = !0, P();
1290
+ }), (m, T) => {
1291
+ const L = nt;
1292
+ return h(), C(L, { show: i.value }, {
1293
+ default: o(() => [
1294
+ b("div", wa, [
1425
1295
  b("iframe", {
1426
- src: h.value,
1296
+ src: g.value,
1427
1297
  class: "frame-iframe",
1428
1298
  ref_key: "frameRef",
1429
- ref: y
1430
- }, null, 8, za)
1299
+ ref: _
1300
+ }, null, 8, Pa)
1431
1301
  ])
1432
1302
  ]),
1433
1303
  _: 1
1434
1304
  }, 8, ["show"]);
1435
1305
  };
1436
1306
  }
1437
- }), Ba = /* @__PURE__ */ U(Ia, [["__scopeId", "data-v-161a378e"]]), Wa = B(Ba), ja = { class: "border border-gray-100 rounded-lg" }, Ha = { class: "text-xl font-semibold text-gray-800" }, Ua = { class: "text-sm text-gray-500 mt-1" }, qa = /* @__PURE__ */ I({
1307
+ }), La = /* @__PURE__ */ F(ka, [["__scopeId", "data-v-161a378e"]]), xa = W(La), Ca = { class: "border border-gray-100 rounded-lg" }, Sa = { class: "text-xl font-semibold text-gray-800" }, Ta = { class: "text-sm text-gray-500 mt-1" }, $a = /* @__PURE__ */ B({
1438
1308
  __name: "PPage",
1439
1309
  props: {
1440
- icon: { type: Object, required: !1, default: () => Dt },
1310
+ icon: { type: Object, required: !1, default: () => Lt },
1441
1311
  title: { type: String, required: !0 },
1442
1312
  subtitle: { type: String, required: !1 }
1443
1313
  },
1444
- setup(t) {
1445
- const n = t;
1446
- return (i, y) => {
1447
- const h = M, u = Le, k = ke, _ = Ae;
1448
- return p(), R("div", ja, [
1449
- n.title ? (p(), S(_, {
1314
+ setup(e) {
1315
+ const n = e;
1316
+ return (i, _) => {
1317
+ const g = D, c = be, P = _e, m = Oe;
1318
+ return h(), M("div", Ca, [
1319
+ n.title ? (h(), C(m, {
1450
1320
  key: 0,
1451
1321
  class: "mb-4",
1452
1322
  bordered: !1,
1453
1323
  "content-class": "py-4"
1454
1324
  }, {
1455
- default: l(() => [
1456
- r(k, {
1325
+ default: o(() => [
1326
+ l(P, {
1457
1327
  align: "center",
1458
1328
  justify: "space-between"
1459
1329
  }, {
1460
- default: l(() => [
1461
- r(k, {
1330
+ default: o(() => [
1331
+ l(P, {
1462
1332
  align: "center",
1463
1333
  size: 16
1464
1334
  }, {
1465
- default: l(() => [
1466
- n.icon ? (p(), S(u, {
1335
+ default: o(() => [
1336
+ n.icon ? (h(), C(c, {
1467
1337
  key: 0,
1468
1338
  size: 48,
1469
1339
  class: "bg-linear-to-br from-blue-500 to-indigo-600"
1470
1340
  }, {
1471
- default: l(() => [
1472
- r(h, {
1341
+ default: o(() => [
1342
+ l(g, {
1473
1343
  size: 24,
1474
1344
  component: n.icon,
1475
1345
  color: "#fff"
1476
1346
  }, null, 8, ["component"])
1477
1347
  ]),
1478
1348
  _: 1
1479
- })) : N("", !0),
1349
+ })) : I("", !0),
1480
1350
  b("div", null, [
1481
- b("div", Ha, H(n.title), 1),
1482
- b("div", Ua, H(n.subtitle ?? n.title + "主页"), 1)
1351
+ b("div", Sa, q(n.title), 1),
1352
+ b("div", Ta, q(n.subtitle ?? n.title + "主页"), 1)
1483
1353
  ])
1484
1354
  ]),
1485
1355
  _: 1
@@ -1489,83 +1359,83 @@ const xa = /* @__PURE__ */ U(La, [["render", Ca]]), Sa = B(xa), Ta = B(ka), $a =
1489
1359
  })
1490
1360
  ]),
1491
1361
  _: 1
1492
- })) : N("", !0),
1493
- i.$slots.search ? (p(), S(_, {
1362
+ })) : I("", !0),
1363
+ i.$slots.search ? (h(), C(m, {
1494
1364
  key: 1,
1495
1365
  class: "mb-4",
1496
1366
  bordered: !1,
1497
1367
  "content-class": "py-4"
1498
1368
  }, {
1499
- default: l(() => [
1500
- j(i.$slots, "search")
1369
+ default: o(() => [
1370
+ Y(i.$slots, "search")
1501
1371
  ]),
1502
1372
  _: 3
1503
- })) : N("", !0),
1504
- i.$slots.default ? (p(), S(_, {
1373
+ })) : I("", !0),
1374
+ i.$slots.default ? (h(), C(m, {
1505
1375
  key: 2,
1506
1376
  bordered: !1,
1507
1377
  "content-class": "!py-0"
1508
1378
  }, {
1509
- default: l(() => [
1510
- j(i.$slots, "default")
1379
+ default: o(() => [
1380
+ Y(i.$slots, "default")
1511
1381
  ]),
1512
1382
  _: 3
1513
- })) : N("", !0)
1383
+ })) : I("", !0)
1514
1384
  ]);
1515
1385
  };
1516
1386
  }
1517
- }), Fa = B(qa), Va = {}, Ka = { class: "flex flex-col justify-center page-container" };
1518
- function Ya(t, n) {
1519
- const i = Ce;
1520
- return p(), R("div", Ka, [
1521
- r(i, {
1387
+ }), Oa = W($a), Ea = {}, Ra = { class: "flex flex-col justify-center page-container" };
1388
+ function Na(e, n) {
1389
+ const i = ye;
1390
+ return h(), M("div", Ra, [
1391
+ l(i, {
1522
1392
  status: "500",
1523
1393
  title: "服务器错误",
1524
1394
  description: "抱歉,服务器出错了"
1525
1395
  })
1526
1396
  ]);
1527
1397
  }
1528
- const Xa = /* @__PURE__ */ U(Va, [["render", Ya], ["__scopeId", "data-v-89cb65c7"]]), Ga = {}, Ja = { class: "flex flex-col justify-center page-container" };
1529
- function Za(t, n) {
1530
- const i = Ce;
1531
- return p(), R("div", Ja, [
1532
- r(i, {
1398
+ const za = /* @__PURE__ */ F(Ea, [["render", Na], ["__scopeId", "data-v-89cb65c7"]]), Da = {}, Aa = { class: "flex flex-col justify-center page-container" };
1399
+ function Ma(e, n) {
1400
+ const i = ye;
1401
+ return h(), M("div", Aa, [
1402
+ l(i, {
1533
1403
  status: "404",
1534
1404
  title: "资源不存在",
1535
1405
  description: "抱歉,你访问的页面不存在"
1536
1406
  })
1537
1407
  ]);
1538
1408
  }
1539
- const Qa = /* @__PURE__ */ U(Ga, [["render", Za], ["__scopeId", "data-v-99232671"]]), en = {}, tn = { class: "flex flex-col justify-center page-container" };
1540
- function an(t, n) {
1541
- const i = Ce;
1542
- return p(), R("div", tn, [
1543
- r(i, {
1409
+ const Ia = /* @__PURE__ */ F(Da, [["render", Ma], ["__scopeId", "data-v-99232671"]]), Ba = {}, Ha = { class: "flex flex-col justify-center page-container" };
1410
+ function Wa(e, n) {
1411
+ const i = ye;
1412
+ return h(), M("div", Ha, [
1413
+ l(i, {
1544
1414
  status: "403",
1545
1415
  title: "禁止访问",
1546
1416
  description: "抱歉,你无权访问该页面"
1547
1417
  })
1548
1418
  ]);
1549
1419
  }
1550
- const nn = /* @__PURE__ */ U(en, [["render", an], ["__scopeId", "data-v-3baa9c16"]]), on = B(Xa), ln = B(Qa), sn = B(nn), rn = Te("app-oidc", () => {
1551
- const t = xe({});
1420
+ const Ua = /* @__PURE__ */ F(Ba, [["render", Wa], ["__scopeId", "data-v-3baa9c16"]]), ja = W(za), qa = W(Ia), Fa = W(Ua), Va = ke("app-oidc", () => {
1421
+ const e = we({});
1552
1422
  return {
1553
- setCallback: (u) => t.callback = u,
1554
- callCallback: async (u) => await t.callback?.(u),
1555
- setError: (u) => t.error = u,
1556
- callError: async (u, k) => await t.error?.(u, k)
1423
+ setCallback: (c) => e.callback = c,
1424
+ callCallback: async (c) => await e.callback?.(c),
1425
+ setError: (c) => e.error = c,
1426
+ callError: async (c, P) => await e.error?.(c, P)
1557
1427
  };
1558
- }), cn = { class: "view-auth-callback" }, un = /* @__PURE__ */ I({
1428
+ }), Ka = { class: "view-auth-callback" }, Ya = /* @__PURE__ */ B({
1559
1429
  __name: "POidc",
1560
- setup(t) {
1561
- const n = oe(), { callCallback: i, callError: y } = rn();
1430
+ setup(e) {
1431
+ const n = le(), { callCallback: i, callError: _ } = Va();
1562
1432
  return Q(async () => {
1563
1433
  try {
1564
1434
  await i(n);
1565
- } catch (h) {
1566
- await y(n, h);
1435
+ } catch (g) {
1436
+ await _(n, g);
1567
1437
  }
1568
- }), (h, u) => (p(), R("div", cn, [...u[0] || (u[0] = [
1438
+ }), (g, c) => (h(), M("div", Ka, [...c[0] || (c[0] = [
1569
1439
  b("div", { class: "view-auth-callback-content" }, [
1570
1440
  b("div", { class: "view-auth-callback-spinner" }, [
1571
1441
  b("span", null, "正在处理登录回调...")
@@ -1573,43 +1443,43 @@ const nn = /* @__PURE__ */ U(en, [["render", an], ["__scopeId", "data-v-3baa9c16
1573
1443
  ], -1)
1574
1444
  ])]));
1575
1445
  }
1576
- }), dn = /* @__PURE__ */ U(un, [["__scopeId", "data-v-167395ae"]]), fn = B(dn), gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1446
+ }), Xa = /* @__PURE__ */ F(Ya, [["__scopeId", "data-v-167395ae"]]), Ja = W(Xa), Za = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1577
1447
  __proto__: null,
1578
- P403: sn,
1579
- P404: ln,
1580
- P500: on,
1581
- PApplication: Oa,
1582
- PEmptyLayout: Sa,
1583
- PIframe: Wa,
1584
- PLanguage: Ra,
1585
- PLayout: Ta,
1586
- PModal: Ma,
1587
- POidc: fn,
1588
- PPage: Fa,
1589
- PRedirect: Aa,
1590
- PTable: Vt
1591
- }, Symbol.toStringTag, { value: "Module" })), pn = (t, n) => (Object.values(gn).forEach((i) => {
1592
- i.install && t.use(i);
1593
- }), n?.(), t), kn = {
1594
- install: pn
1448
+ P403: Fa,
1449
+ P404: qa,
1450
+ P500: ja,
1451
+ PApplication: ha,
1452
+ PEmptyLayout: fa,
1453
+ PIframe: xa,
1454
+ PLanguage: va,
1455
+ PLayout: ga,
1456
+ PModal: _a,
1457
+ POidc: Ja,
1458
+ PPage: Oa,
1459
+ PRedirect: ya,
1460
+ PTable: Et
1461
+ }, Symbol.toStringTag, { value: "Module" })), Ga = (e, n) => (Object.values(Za).forEach((i) => {
1462
+ i.install && e.use(i);
1463
+ }), n?.(), e), ln = {
1464
+ install: Ga
1595
1465
  };
1596
1466
  export {
1597
- sn as P403,
1598
- ln as P404,
1599
- on as P500,
1600
- Oa as PApplication,
1601
- Sa as PEmptyLayout,
1602
- Wa as PIframe,
1603
- Ra as PLanguage,
1604
- Ta as PLayout,
1605
- Ma as PModal,
1606
- fn as POidc,
1607
- Fa as PPage,
1608
- Aa as PRedirect,
1609
- Vt as PTable,
1610
- kn as default,
1611
- pn as install,
1612
- Zt as useLanguageStore,
1613
- se as useLayoutStore,
1614
- rn as useOidcStore
1467
+ Fa as P403,
1468
+ qa as P404,
1469
+ ja as P500,
1470
+ ha as PApplication,
1471
+ fa as PEmptyLayout,
1472
+ xa as PIframe,
1473
+ va as PLanguage,
1474
+ ga as PLayout,
1475
+ _a as PModal,
1476
+ Ja as POidc,
1477
+ Oa as PPage,
1478
+ ya as PRedirect,
1479
+ Et as PTable,
1480
+ ln as default,
1481
+ Ga as install,
1482
+ Mt as useLanguageStore,
1483
+ re as useLayoutStore,
1484
+ Va as useOidcStore
1615
1485
  };