@chewel611/naive-ui-plus 0.0.25 → 0.0.26

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