@chewel611/naive-ui-plus 0.0.30 → 0.0.32

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