@chewel611/naive-ui-plus 0.0.35 → 0.0.37

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,8 +1,8 @@
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 Ke, NLayoutContent as Ve, 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 B, computed as V, unref as a, onMounted as Q, openBlock as g, createBlock as L, withCtx as o, createElementVNode as v, createElementBlock as H, renderSlot as Y, createCommentVNode as A, createVNode as c, toDisplayString as j, h as z, toRaw as Ce, reactive as we, normalizeClass as oe, withDirectives as st, vShow as lt, nextTick as se, inject as Ne, Fragment as Se, renderList as ct, resolveDynamicComponent as he, withModifiers as me, resolveComponent as Be, KeepAlive as rt, useCssVars as it, watch as ze, normalizeStyle as De, provide as ut, mergeProps as dt, createTextVNode as pe, onBeforeMount as ft } from "vue";
1
+ import { useDialog as Oe, useMessage as de, NCard as Ee, NDataTable as Me, NSpace as _e, NTooltip as Re, NIcon as R, NDropdown as Q, 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 Ke, NLayoutContent as Ve, 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 N, computed as V, unref as a, onMounted as ee, openBlock as g, createBlock as C, withCtx as o, createElementVNode as v, createElementBlock as H, renderSlot as Y, createCommentVNode as A, createVNode as c, toDisplayString as j, h as z, toRaw as Ce, reactive as we, normalizeClass as se, withDirectives as st, vShow as lt, nextTick as le, inject as Ne, Fragment as Se, renderList as ct, resolveDynamicComponent as he, withModifiers as me, resolveComponent as Be, KeepAlive as rt, useCssVars as it, watch as ze, normalizeStyle as De, provide as ut, mergeProps as dt, createTextVNode as pe, onBeforeMount as ft } from "vue";
3
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";
5
+ import { useRouter as ce, useRoute as re } from "vue-router";
6
6
  import Ct from "element-resize-detector";
7
7
  import St from "vuedraggable";
8
8
  const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
@@ -20,29 +20,29 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
20
20
  onEdit: {}
21
21
  },
22
22
  setup(e, { expose: n }) {
23
- const r = B(null), m = Oe(), d = ue(), s = B(!1), P = B([]), h = B([]), $ = B({
23
+ const r = N(null), m = Oe(), d = de(), l = N(!1), k = N([]), h = N([]), T = N({
24
24
  page: 1,
25
25
  itemCount: 0,
26
26
  pageSize: 10,
27
27
  pageSizes: [10, 20, 30, 50],
28
28
  showSizePicker: !0,
29
- onChange: async (w) => {
30
- $.value.page = w, await C();
29
+ onChange: async (P) => {
30
+ T.value.page = P, await B();
31
31
  },
32
- onUpdatePageSize: async (w) => {
33
- $.value.pageSize = w, await C();
32
+ onUpdatePageSize: async (P) => {
33
+ T.value.pageSize = P, await B();
34
34
  }
35
- }), x = e, l = (w) => {
36
- const k = (S) => {
37
- const E = [];
38
- return w && w.forEach((I) => {
39
- I.key !== "edit" && I.key !== "delete" && E.push({
35
+ }), L = e, s = (P) => {
36
+ const x = (S) => {
37
+ const O = [];
38
+ return P && P.forEach((I) => {
39
+ I.key !== "edit" && I.key !== "delete" && O.push({
40
40
  label: I.name,
41
41
  key: I.key,
42
- icon: I.icon && (() => z(N, null, { default: () => z(I.icon) })),
42
+ icon: I.icon && (() => z(R, null, { default: () => z(I.icon) })),
43
43
  props: { onClick: () => I.action(S) }
44
44
  });
45
- }), E;
45
+ }), O;
46
46
  };
47
47
  return {
48
48
  title: "操作",
@@ -50,92 +50,92 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
50
50
  width: 100,
51
51
  fixed: "right",
52
52
  render: (S) => {
53
- let E = [];
54
- if (x.onEdit && E.push({
53
+ let O = [];
54
+ if (L.onEdit && O.push({
55
55
  label: "编辑",
56
56
  key: "edit",
57
- icon: () => z(N, null, { default: () => z(ht) }),
58
- props: { onClick: async () => await x.onEdit(S) }
59
- }), x.onDelete && E.push({
57
+ icon: () => z(R, null, { default: () => z(ht) }),
58
+ props: { onClick: async () => await L.onEdit(S) }
59
+ }), L.onDelete && O.push({
60
60
  label: "删除",
61
61
  key: "delete",
62
- icon: () => z(N, null, { default: () => z(Te) }),
63
- props: { onClick: () => O(S) }
64
- }), E = [...E, ...k(S)], !(E.length <= 0))
62
+ icon: () => z(R, null, { default: () => z(Te) }),
63
+ props: { onClick: () => $(S) }
64
+ }), O = [...O, ...x(S)], !(O.length <= 0))
65
65
  return z(
66
- G,
66
+ Q,
67
67
  {
68
- options: E,
68
+ options: O,
69
69
  placement: "bottom-start"
70
70
  },
71
71
  {
72
72
  default: () => z(
73
73
  ve,
74
74
  { size: "small", type: "primary" },
75
- { default: () => ["操作", z(N, () => z(pt))] }
75
+ { default: () => ["操作", z(R, () => z(pt))] }
76
76
  )
77
77
  }
78
78
  );
79
79
  }
80
80
  };
81
- }, b = V(() => {
82
- const w = x.columns.filter((S) => S.key != "action").map((S) => ({
81
+ }, y = V(() => {
82
+ const P = L.columns.filter((S) => S.key != "action").map((S) => ({
83
83
  title: S.title,
84
84
  key: S.key,
85
85
  width: S.width,
86
86
  fixed: S.fixed ?? !1,
87
87
  render: S.render,
88
88
  ellipsis: S.ellipsis ? { tooltip: !0 } : !1
89
- })), k = x.columns.reduce(
90
- (S, E) => E.key === "action" ? E : S,
89
+ })), x = L.columns.reduce(
90
+ (S, O) => O.key === "action" ? O : S,
91
91
  void 0
92
92
  )?.action;
93
- return k && k?.length > 0 || x.onEdit || x.onDelete ? [
93
+ return x && x?.length > 0 || L.onEdit || L.onDelete ? [
94
94
  { type: "selection", fixed: "left" },
95
- ...w,
96
- l(k)
97
- ] : [{ type: "selection", fixed: "left" }, ...w];
98
- }), u = async () => await C(), O = (w) => i([w]), D = () => {
99
- const w = _();
100
- i(w);
101
- }, i = (w) => {
102
- w && w.length > 0 && m.warning({
95
+ ...P,
96
+ s(x)
97
+ ] : [{ type: "selection", fixed: "left" }, ...P];
98
+ }), u = async () => await B(), $ = (P) => i([P]), D = () => {
99
+ const P = _();
100
+ i(P);
101
+ }, i = (P) => {
102
+ P && P.length > 0 && m.warning({
103
103
  title: "警告",
104
104
  content: "删除数据不可恢复, 确认删除吗?",
105
105
  positiveText: "确定",
106
106
  negativeText: "取消",
107
107
  onPositiveClick: async () => {
108
- if (x.onDelete)
108
+ if (L.onDelete)
109
109
  try {
110
- await x.onDelete(w) ? (C(), d.success("删除成功")) : d.error("删除失败");
111
- } catch (k) {
112
- d.error(k.message);
110
+ await L.onDelete(P) ? (B(), d.success("删除成功")) : d.error("删除失败");
111
+ } catch (x) {
112
+ d.error(x.message);
113
113
  }
114
114
  }
115
115
  });
116
- }, _ = () => P.value ? h.value.filter((k) => P.value.includes(k.id)).map((k) => Ce(k)) : [], y = () => _()[0], M = () => Ce(h.value), C = async () => {
117
- if (!s.value) {
118
- s.value = !0;
116
+ }, _ = () => k.value ? h.value.filter((x) => k.value.includes(x.id)).map((x) => Ce(x)) : [], w = () => _()[0], M = () => Ce(h.value), B = async () => {
117
+ if (!l.value) {
118
+ l.value = !0;
119
119
  try {
120
- if (x.onLoad) {
121
- var { data: w, total: k } = await x.onLoad(
122
- $.value.page,
123
- $.value.pageSize
120
+ if (L.onLoad) {
121
+ var { data: P, total: x } = await L.onLoad(
122
+ T.value.page,
123
+ T.value.pageSize
124
124
  );
125
- h.value = w, $.value.itemCount = k;
125
+ h.value = P, T.value.itemCount = x;
126
126
  }
127
127
  } catch (S) {
128
128
  d.error(S.message);
129
129
  } finally {
130
- s.value = !1;
130
+ l.value = !1;
131
131
  }
132
132
  }
133
- }, T = V(() => {
134
- const w = a(r);
135
- if (!w) return;
136
- const k = w?.$el, S = k.querySelector(".n-data-table-thead "), { bottomIncludeBody: E } = de(S), I = 48;
137
- let q = 12, Z = 25;
138
- const X = k.querySelector(
133
+ }, b = V(() => {
134
+ const P = a(r);
135
+ if (!P) return;
136
+ const x = P?.$el, S = x.querySelector(".n-data-table-thead "), { bottomIncludeBody: O } = te(S), I = 48;
137
+ let q = 12, G = 25;
138
+ const X = x.querySelector(
139
139
  ".n-data-table__pagination"
140
140
  );
141
141
  if (X) {
@@ -143,53 +143,53 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
143
143
  q += J || 0;
144
144
  } else
145
145
  q += 28;
146
- return E - (I + q + Z);
147
- }), ee = (w) => !w || !w.getBoundingClientRect ? 0 : w.getBoundingClientRect(), de = (w) => {
148
- const k = document.documentElement, S = k.scrollLeft, E = k.scrollTop, I = k.clientLeft, q = k.clientTop, Z = window.pageXOffset, X = window.pageYOffset, te = ee(w), {
146
+ return O - (I + q + G);
147
+ }), Z = (P) => !P || !P.getBoundingClientRect ? 0 : P.getBoundingClientRect(), te = (P) => {
148
+ const x = document.documentElement, S = x.scrollLeft, O = x.scrollTop, I = x.clientLeft, q = x.clientTop, G = window.pageXOffset, X = window.pageYOffset, ae = Z(P), {
149
149
  left: J,
150
150
  top: fe,
151
151
  width: ge,
152
152
  height: t
153
- } = te, f = (Z || S) - (I || 0), p = (X || E) - (q || 0), R = J + Z, K = fe + X, ae = R - f, ne = K - p, ie = window.document.documentElement.clientWidth, xe = window.document.documentElement.clientHeight;
153
+ } = ae, f = (G || S) - (I || 0), p = (X || O) - (q || 0), E = J + G, K = fe + X, ne = E - f, oe = K - p, ue = window.document.documentElement.clientWidth, xe = window.document.documentElement.clientHeight;
154
154
  return {
155
- left: ae,
156
- top: ne,
157
- right: ie - ge - ae,
158
- bottom: xe - t - ne,
159
- rightIncludeBody: ie - ae,
160
- bottomIncludeBody: xe - ne
155
+ left: ne,
156
+ top: oe,
157
+ right: ue - ge - ne,
158
+ bottom: xe - t - oe,
159
+ rightIncludeBody: ue - ne,
160
+ bottomIncludeBody: xe - oe
161
161
  };
162
162
  };
163
- return Q(async () => await C()), n({
163
+ return ee(async () => await B()), n({
164
164
  getData: M,
165
- getSelectedRow: y,
165
+ getSelectedRow: w,
166
166
  getSelectedRows: _,
167
- refreshData: C,
167
+ refreshData: B,
168
168
  resetPage: () => {
169
- $.value.page = 1;
169
+ T.value.page = 1;
170
170
  }
171
- }), (w, k) => {
172
- const S = Re, E = _e, I = Me;
173
- return g(), L(a(Ee), { bordered: !1 }, {
171
+ }), (P, x) => {
172
+ const S = Re, O = _e, I = Me;
173
+ return g(), C(a(Ee), { bordered: !1 }, {
174
174
  header: o(() => [
175
- c(E, {
175
+ c(O, {
176
176
  justify: "space-between",
177
177
  align: "center",
178
178
  class: "w-full"
179
179
  }, {
180
180
  default: o(() => [
181
181
  v("span", Tt, j(e.title), 1),
182
- c(E, null, {
182
+ c(O, null, {
183
183
  default: o(() => [
184
- x.onAdd ? (g(), L(S, {
184
+ L.onAdd ? (g(), C(S, {
185
185
  key: 0,
186
186
  trigger: "hover"
187
187
  }, {
188
188
  trigger: o(() => [
189
- c(a(N), {
189
+ c(a(R), {
190
190
  size: "18",
191
191
  class: "mr-1 cursor-pointer hover:text-blue-600",
192
- onClick: x.onAdd
192
+ onClick: L.onAdd
193
193
  }, {
194
194
  default: o(() => [
195
195
  c(a(gt))
@@ -198,16 +198,16 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
198
198
  }, 8, ["onClick"])
199
199
  ]),
200
200
  default: o(() => [
201
- k[1] || (k[1] = v("span", null, "新增", -1))
201
+ x[1] || (x[1] = v("span", null, "新增", -1))
202
202
  ]),
203
203
  _: 1
204
204
  })) : A("", !0),
205
- x.onDelete ? (g(), L(S, {
205
+ L.onDelete ? (g(), C(S, {
206
206
  key: 1,
207
207
  trigger: "hover"
208
208
  }, {
209
209
  trigger: o(() => [
210
- c(a(N), {
210
+ c(a(R), {
211
211
  size: "18",
212
212
  class: "mr-1 cursor-pointer hover:text-blue-600",
213
213
  onClick: D
@@ -219,13 +219,13 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
219
219
  })
220
220
  ]),
221
221
  default: o(() => [
222
- k[2] || (k[2] = v("span", null, "删除", -1))
222
+ x[2] || (x[2] = v("span", null, "删除", -1))
223
223
  ]),
224
224
  _: 1
225
225
  })) : A("", !0),
226
226
  c(S, { trigger: "hover" }, {
227
227
  trigger: o(() => [
228
- c(a(N), {
228
+ c(a(R), {
229
229
  size: "18",
230
230
  class: "cursor-pointer hover:text-blue-600",
231
231
  onClick: u
@@ -237,7 +237,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
237
237
  })
238
238
  ]),
239
239
  default: o(() => [
240
- k[3] || (k[3] = v("span", null, "刷新", -1))
240
+ x[3] || (x[3] = v("span", null, "刷新", -1))
241
241
  ]),
242
242
  _: 1
243
243
  })
@@ -250,22 +250,22 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
250
250
  ]),
251
251
  default: o(() => [
252
252
  v("div", $t, [
253
- w.$slots.toolbar ? (g(), H("div", Ot, [
254
- Y(w.$slots, "toolbar")
253
+ P.$slots.toolbar ? (g(), H("div", Ot, [
254
+ Y(P.$slots, "toolbar")
255
255
  ])) : A("", !0),
256
256
  c(I, {
257
257
  remote: "",
258
258
  ref_key: "$table",
259
259
  ref: r,
260
- "checked-row-keys": P.value,
261
- "onUpdate:checkedRowKeys": k[0] || (k[0] = (q) => P.value = q),
262
- "max-height": T.value,
263
- loading: s.value,
260
+ "checked-row-keys": k.value,
261
+ "onUpdate:checkedRowKeys": x[0] || (x[0] = (q) => k.value = q),
262
+ "max-height": b.value,
263
+ loading: l.value,
264
264
  bordered: !1,
265
265
  "single-line": !1,
266
- columns: b.value,
266
+ columns: y.value,
267
267
  data: h.value,
268
- pagination: $.value,
268
+ pagination: T.value,
269
269
  "row-key": (q) => q[e.idField]
270
270
  }, null, 8, ["checked-row-keys", "max-height", "loading", "columns", "data", "pagination", "row-key"])
271
271
  ])
@@ -279,7 +279,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
279
279
  return n.install = function(r) {
280
280
  r.component(n.__name, e);
281
281
  }, e;
282
- }, Rt = U(Et), Nt = ["Redirect", "RedirectSon", "login"], re = ke("p-layout", () => {
282
+ }, Rt = U(Et), Nt = ["Redirect", "RedirectSon", "login"], ie = ke("p-layout", () => {
283
283
  const e = we({
284
284
  collapsed: !1,
285
285
  title: "输入项目名称",
@@ -294,14 +294,14 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
294
294
  return {
295
295
  state: e,
296
296
  initTabs: (i) => {
297
- i.sort((_, y) => (y.meta.affix ? 1 : 0) - (_.meta.affix ? 1 : 0)), e.tabs = i;
297
+ i.sort((_, w) => (w.meta.affix ? 1 : 0) - (_.meta.affix ? 1 : 0)), e.tabs = i;
298
298
  },
299
299
  addTab: (i) => Nt.includes(i.name) ? !1 : (e.tabs?.some(
300
- (y) => y.fullPath == i.fullPath
300
+ (w) => w.fullPath == i.fullPath
301
301
  ) || e.tabs?.push(i), !0),
302
302
  closeCurrentTab: (i) => {
303
303
  const _ = e.tabs.findIndex(
304
- (y) => y.fullPath == i.fullPath
304
+ (w) => w.fullPath == i.fullPath
305
305
  );
306
306
  e.tabs.splice(_, 1);
307
307
  },
@@ -315,18 +315,18 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
315
315
  },
316
316
  closeLeftTabs: (i) => {
317
317
  const _ = e.tabs.findIndex(
318
- (y) => y.fullPath == i.fullPath
318
+ (w) => w.fullPath == i.fullPath
319
319
  );
320
320
  e.tabs = e.tabs.filter(
321
- (y, M) => M >= _ || (y?.meta?.affix ?? !1)
321
+ (w, M) => M >= _ || (w?.meta?.affix ?? !1)
322
322
  );
323
323
  },
324
324
  closeRightTabs: (i) => {
325
325
  const _ = e.tabs.findIndex(
326
- (y) => y.fullPath == i.fullPath
326
+ (w) => w.fullPath == i.fullPath
327
327
  );
328
328
  e.tabs = e.tabs.filter(
329
- (y, M) => M <= _ || (y?.meta?.affix ?? !1)
329
+ (w, M) => M <= _ || (w?.meta?.affix ?? !1)
330
330
  );
331
331
  },
332
332
  collapse: () => {
@@ -354,13 +354,13 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
354
354
  }), Bt = { class: "logo" }, zt = /* @__PURE__ */ W({
355
355
  __name: "PLogo",
356
356
  setup(e) {
357
- const n = re();
357
+ const n = ie();
358
358
  return (r, m) => (g(), H("div", Bt, [
359
359
  c(a(be), {
360
360
  color: "var(--color-logo)",
361
361
  size: 32,
362
362
  src: a(n).state.logo,
363
- class: oe({ "mr-2": !a(n).state.collapsed })
363
+ class: se({ "mr-2": !a(n).state.collapsed })
364
364
  }, null, 8, ["src", "class"]),
365
365
  st(v("h1", { class: "font-bold ease-in-out ml-2 logo-size" }, j(a(n).state.title), 513), [
366
366
  [lt, !a(n).state.collapsed]
@@ -381,36 +381,36 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
381
381
  selectLanguage: async (e) => {
382
382
  }
383
383
  }, Mt = ke("language", () => {
384
- const e = B(At), n = async () => (e.value.options.length === 0 && (e.value.options = await e.value.initLanguages()), e.value.options);
384
+ const e = N(At), n = async () => (e.value.options.length === 0 && (e.value.options = await e.value.initLanguages()), e.value.options);
385
385
  return {
386
- select: async (l) => {
387
- if (e.value.currentLanguage === l)
386
+ select: async (s) => {
387
+ if (e.value.currentLanguage === s)
388
388
  return;
389
- const b = (await n()).find(
390
- (u) => u.key === l
389
+ const y = (await n()).find(
390
+ (u) => u.key === s
391
391
  );
392
- b && (e.value.currentLanguage = b.key, e.value.selectLanguage(b));
392
+ y && (e.value.currentLanguage = y.key, e.value.selectLanguage(y));
393
393
  },
394
- selectLanguageCallback: async (l) => {
395
- e.value.selectLanguage = l;
394
+ selectLanguageCallback: async (s) => {
395
+ e.value.selectLanguage = s;
396
396
  },
397
- initLanguagesCallback: async (l) => {
398
- e.value.initLanguages = l;
397
+ initLanguagesCallback: async (s) => {
398
+ e.value.initLanguages = s;
399
399
  },
400
400
  getLanguages: n,
401
401
  getCurrentLanguage: async () => {
402
402
  if (e.value.currentLanguage)
403
403
  return (await n()).find(
404
- (l) => l.key === e.value.currentLanguage
404
+ (s) => s.key === e.value.currentLanguage
405
405
  );
406
406
  },
407
- setTranslationApiUrl: (l) => {
408
- e.value.translationApiUrl = l;
407
+ setTranslationApiUrl: (s) => {
408
+ e.value.translationApiUrl = s;
409
409
  },
410
410
  getTranslationApiUrl: () => e.value.translationApiUrl,
411
411
  getDefaultLanguage: () => e.value.defaultLanguage ? e.value.defaultLanguage : "chinese_simplified",
412
- setDefaultLanguage: (l) => {
413
- (l === "Chinese" || l === "chinese") && (l = "chinese_simplified"), e.value.defaultLanguage = l;
412
+ setDefaultLanguage: (s) => {
413
+ (s === "Chinese" || s === "chinese") && (s = "chinese_simplified"), e.value.defaultLanguage = s;
414
414
  }
415
415
  };
416
416
  }), It = { key: 1 }, Ae = /* @__PURE__ */ W({
@@ -421,35 +421,35 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
421
421
  getLanguages: r,
422
422
  getCurrentLanguage: m,
423
423
  getDefaultLanguage: d,
424
- getTranslationApiUrl: s
425
- } = Mt(), P = B(), h = B([]), $ = async (l) => await n(l), x = async () => {
426
- const l = window.translate;
427
- l && (l.selectLanguageTag.show = !1, l.selectLanguageTag.languages = (await r()).map((b) => b.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());
424
+ getTranslationApiUrl: l
425
+ } = Mt(), k = N(), h = N([]), T = async (s) => await n(s), L = async () => {
426
+ const s = window.translate;
427
+ s && (s.selectLanguageTag.show = !1, s.selectLanguageTag.languages = (await r()).map((y) => y.key).join(","), s.ignore.class.push("ignore-translate-flag"), s.ignore.id.push("ignore-translation"), s.language.setLocal(d()), 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(l()), s.request.listener.start(), s.listener.start(), s.whole.enableAll(), s.execute());
428
428
  };
429
- return Q(async () => {
430
- await se(), await x(), P.value = await m(), h.value = await r();
431
- }), (l, b) => {
432
- const u = N, O = ve;
433
- return h.value.length > 0 ? (g(), L(a(G), {
429
+ return ee(async () => {
430
+ await le(), await L(), k.value = await m(), h.value = await r();
431
+ }), (s, y) => {
432
+ const u = R, $ = ve;
433
+ return h.value.length > 0 ? (g(), C(a(Q), {
434
434
  key: 0,
435
435
  id: "ignore-translation",
436
436
  placement: "bottom-start",
437
437
  trigger: "hover",
438
438
  class: "flex flex-col justify-center h-full ignore",
439
- onSelect: $,
439
+ onSelect: T,
440
440
  options: h.value
441
441
  }, {
442
442
  default: o(() => [
443
- c(O, {
443
+ c($, {
444
444
  quaternary: "",
445
445
  type: "info"
446
446
  }, {
447
447
  default: o(() => [
448
- P.value ? (g(), H("label", It, j(P.value?.label), 1)) : (g(), L(u, {
448
+ k.value ? (g(), H("label", It, j(k.value?.label), 1)) : (g(), C(u, {
449
449
  key: 0,
450
450
  size: "18"
451
451
  }, {
452
- default: o(() => [...b[0] || (b[0] = [
452
+ default: o(() => [...y[0] || (y[0] = [
453
453
  v("svg", {
454
454
  xmlns: "http://www.w3.org/2000/svg",
455
455
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
@@ -484,8 +484,8 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
484
484
  }, Kt = { class: "layout-header-trigger layout-header-trigger-min" }, Vt = { class: "layout-header-trigger layout-header-trigger-min" }, Yt = { class: "avatar" }, Xt = /* @__PURE__ */ W({
485
485
  __name: "PHeader",
486
486
  setup(e) {
487
- const n = ue(), r = Oe(), m = re(), d = le(), s = ce(), P = Ne("reloadPage"), h = (i) => d.push({ name: i }), $ = V(() => x(s.matched)), x = (i) => i.map((_) => {
488
- const y = {
487
+ const n = de(), r = Oe(), m = ie(), d = ce(), l = re(), k = Ne("reloadPage"), h = (i) => d.push({ name: i }), T = V(() => L(l.matched)), L = (i) => i.map((_) => {
488
+ const w = {
489
489
  key: _.name,
490
490
  label: _.meta.title,
491
491
  icon: _.meta.icon,
@@ -493,11 +493,11 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
493
493
  disabled: _.path === "/",
494
494
  children: void 0
495
495
  };
496
- return _.children && _.children.length > 0 && (y.children = x(
496
+ return _.children && _.children.length > 0 && (w.children = L(
497
497
  _.children
498
- )), y;
499
- }), l = B(!1), b = () => {
500
- document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(), l.value = !1) : (document.documentElement.requestFullscreen(), l.value = !0);
498
+ )), w;
499
+ }), s = N(!1), y = () => {
500
+ document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(), s.value = !1) : (document.documentElement.requestFullscreen(), s.value = !0);
501
501
  }, u = V(() => {
502
502
  const i = [];
503
503
  return i.push({
@@ -509,7 +509,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
509
509
  key: _.route
510
510
  });
511
511
  }), i;
512
- }), O = (i) => {
512
+ }), $ = (i) => {
513
513
  i === "logout" ? D() : d.push({ name: i });
514
514
  }, D = () => {
515
515
  r.info({
@@ -534,15 +534,15 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
534
534
  });
535
535
  };
536
536
  return (i, _) => {
537
- const y = Re, M = We, C = be;
537
+ const w = Re, M = We, B = be;
538
538
  return g(), H("div", Ht, [
539
539
  v("div", Wt, [
540
540
  v("div", {
541
541
  class: "ml-1 layout-header-trigger layout-header-trigger-min",
542
542
  onClick: _[0] || (_[0] = //@ts-ignore
543
- (...T) => a(m).collapse && a(m).collapse(...T))
543
+ (...b) => a(m).collapse && a(m).collapse(...b))
544
544
  }, [
545
- a(m).state.collapsed ? (g(), L(a(N), {
545
+ a(m).state.collapsed ? (g(), C(a(R), {
546
546
  key: 0,
547
547
  size: "18"
548
548
  }, {
@@ -550,7 +550,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
550
550
  c(a(mt))
551
551
  ]),
552
552
  _: 1
553
- })) : (g(), L(a(N), {
553
+ })) : (g(), C(a(R), {
554
554
  key: 1,
555
555
  size: "18"
556
556
  }, {
@@ -563,9 +563,9 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
563
563
  v("div", {
564
564
  class: "mr-1 layout-header-trigger layout-header-trigger-min",
565
565
  onClick: _[1] || (_[1] = //@ts-ignore
566
- (...T) => a(P) && a(P)(...T))
566
+ (...b) => a(k) && a(k)(...b))
567
567
  }, [
568
- c(a(N), { size: "18" }, {
568
+ c(a(R), { size: "18" }, {
569
569
  default: o(() => [
570
570
  c(a(Pe))
571
571
  ]),
@@ -574,26 +574,26 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
574
574
  ]),
575
575
  c(a(Ie), null, {
576
576
  default: o(() => [
577
- (g(!0), H(Se, null, ct($.value, (T) => (g(), H(Se, {
578
- key: T.label
577
+ (g(!0), H(Se, null, ct(T.value, (b) => (g(), H(Se, {
578
+ key: b.label
579
579
  }, [
580
- T.label ? (g(), L(a(He), { key: 0 }, {
580
+ b.label ? (g(), C(a(He), { key: 0 }, {
581
581
  default: o(() => [
582
- T.children && T.children.length ? (g(), L(a(G), {
582
+ b.children && b.children.length ? (g(), C(a(Q), {
583
583
  key: 0,
584
- options: T.children,
584
+ options: b.children,
585
585
  onSelect: h
586
586
  }, {
587
587
  default: o(() => [
588
588
  v("span", Ut, [
589
- T.icon ? (g(), L(he(T.icon), { key: 0 })) : A("", !0),
590
- v("span", null, j(T.label), 1)
589
+ b.icon ? (g(), C(he(b.icon), { key: 0 })) : A("", !0),
590
+ v("span", null, j(b.label), 1)
591
591
  ])
592
592
  ]),
593
593
  _: 2
594
594
  }, 1032, ["options"])) : (g(), H("span", jt, [
595
- T.icon ? (g(), L(he(T.icon), { key: 0 })) : A("", !0),
596
- v("span", null, j(T.label), 1)
595
+ b.icon ? (g(), C(he(b.icon), { key: 0 })) : A("", !0),
596
+ v("span", null, j(b.label), 1)
597
597
  ]))
598
598
  ]),
599
599
  _: 2
@@ -608,14 +608,14 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
608
608
  c(Ae)
609
609
  ])) : A("", !0),
610
610
  v("div", Kt, [
611
- c(y, { placement: "bottom" }, {
611
+ c(w, { placement: "bottom" }, {
612
612
  trigger: o(() => [
613
- c(a(N), {
613
+ c(a(R), {
614
614
  size: "18",
615
- onClick: me(b, ["stop"])
615
+ onClick: me(y, ["stop"])
616
616
  }, {
617
617
  default: o(() => [
618
- l.value ? (g(), L(a(bt), { key: 1 })) : (g(), L(a(vt), { key: 0 }))
618
+ s.value ? (g(), C(a(bt), { key: 1 })) : (g(), C(a(vt), { key: 0 }))
619
619
  ]),
620
620
  _: 1
621
621
  })
@@ -627,16 +627,16 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
627
627
  })
628
628
  ]),
629
629
  v("div", Vt, [
630
- c(a(G), {
630
+ c(a(Q), {
631
631
  trigger: "hover",
632
- onSelect: O,
632
+ onSelect: $,
633
633
  options: u.value
634
634
  }, {
635
635
  default: o(() => [
636
636
  v("div", Yt, [
637
637
  v("span", null, j(a(m).state.uname), 1),
638
638
  c(M, { vertical: "" }),
639
- c(C, {
639
+ c(B, {
640
640
  round: "",
641
641
  src: a(m).state.avatar
642
642
  }, null, 8, ["src"])
@@ -658,11 +658,11 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
658
658
  return (n, r) => {
659
659
  const m = Be("RouterView");
660
660
  return g(), H("div", Zt, [
661
- e.loading ? A("", !0) : (g(), L(m, { key: 0 }, {
662
- default: o(({ Component: d, route: s }) => [
663
- (g(), L(rt, null, [
664
- (g(), L(he(d), {
665
- key: s.fullPath
661
+ e.loading ? A("", !0) : (g(), C(m, { key: 0 }, {
662
+ default: o(({ Component: d, route: l }) => [
663
+ (g(), C(rt, null, [
664
+ (g(), C(he(d), {
665
+ key: l.fullPath
666
666
  }))
667
667
  ], 1024))
668
668
  ]),
@@ -678,55 +678,55 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
678
678
  v4a1a98ea: r.value,
679
679
  v271d846e: m.value
680
680
  }));
681
- const n = Ue(), r = V(() => n.value.cardColor), m = V(() => n.value.textColor1), d = ue(), s = ce(), P = le(), h = B(null), $ = B(null), x = B(!1), l = re(), b = V(() => l.state.tabs), u = we({
682
- activeKey: s.fullPath,
681
+ const n = Ue(), r = V(() => n.value.cardColor), m = V(() => n.value.textColor1), d = de(), l = re(), k = ce(), h = N(null), T = N(null), L = N(!1), s = ie(), y = V(() => s.state.tabs), u = we({
682
+ activeKey: l.fullPath,
683
683
  scrollable: !0,
684
684
  dropdownX: 0,
685
685
  dropdownY: 0,
686
686
  showDropdown: !1,
687
687
  isMultiHeaderFixed: !0,
688
688
  multiTabsSetting: !0
689
- }), O = ["Login", "Redirect", "ErrorPage"], D = (t) => {
690
- const { fullPath: f, hash: p, meta: R, name: K, params: ae, path: ne, query: ie } = t;
691
- return { fullPath: f, hash: p, meta: R, name: K, params: ae, path: ne, query: ie };
689
+ }), $ = ["Login", "Redirect", "ErrorPage"], D = (t) => {
690
+ const { fullPath: f, hash: p, meta: E, name: K, params: ne, path: oe, query: ue } = t;
691
+ return { fullPath: f, hash: p, meta: E, name: K, params: ne, path: oe, query: ue };
692
692
  }, i = V(() => {
693
- const p = l.state.collapsed ? "64px" : "272px";
693
+ const p = s.state.collapsed ? "64px" : "272px";
694
694
  return {
695
695
  left: p,
696
696
  width: `calc(100% - ${p})`
697
697
  };
698
698
  }), _ = V(() => {
699
- const t = b.value.length <= 1;
699
+ const t = y.value.length <= 1;
700
700
  return [
701
701
  {
702
702
  label: "刷新当前",
703
703
  key: "1",
704
- icon: () => z(N, null, { default: () => z(Pe) })
704
+ icon: () => z(R, null, { default: () => z(Pe) })
705
705
  },
706
706
  {
707
707
  label: "关闭当前",
708
708
  key: "2",
709
- disabled: x.value || t,
710
- icon: () => z(N, null, { default: () => z($e) })
709
+ disabled: L.value || t,
710
+ icon: () => z(R, null, { default: () => z($e) })
711
711
  },
712
712
  {
713
713
  label: "关闭其他",
714
714
  key: "3",
715
715
  disabled: t,
716
- icon: () => z(N, null, { default: () => z(yt) })
716
+ icon: () => z(R, null, { default: () => z(yt) })
717
717
  },
718
718
  {
719
719
  label: "关闭全部",
720
720
  key: "4",
721
721
  disabled: t,
722
- icon: () => z(N, null, { default: () => z(wt) })
722
+ icon: () => z(R, null, { default: () => z(wt) })
723
723
  }
724
724
  ];
725
- }), y = () => {
725
+ }), w = () => {
726
726
  let t = [];
727
- const f = D(s);
727
+ const f = D(l);
728
728
  try {
729
- if (l.state.cacheTabs) {
729
+ if (s.state.cacheTabs) {
730
730
  const p = localStorage.getItem("TABS_ROUTES");
731
731
  t = p ? JSON.parse(p) : [f];
732
732
  } else
@@ -737,56 +737,56 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
737
737
  return t;
738
738
  }
739
739
  }, M = (t) => {
740
- const f = P.getRoutes();
740
+ const f = k.getRoutes();
741
741
  t.forEach((p) => {
742
- const R = f.find((K) => K.path === p.path);
743
- R && (p.meta = R.meta || p.meta, p.name = R.name || p.name);
744
- }), l.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(t));
745
- }, C = () => {
746
- const t = y();
747
- M(t), l.initTabs(t);
748
- }, T = async (t) => {
749
- if (await se(), !h.value) return;
742
+ const E = f.find((K) => K.path === p.path);
743
+ E && (p.meta = E.meta || p.meta, p.name = E.name || p.name);
744
+ }), s.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(t));
745
+ }, B = () => {
746
+ const t = w();
747
+ M(t), s.initTabs(t);
748
+ }, b = async (t) => {
749
+ if (await le(), !h.value) return;
750
750
  const f = h.value.offsetWidth, p = h.value.scrollWidth;
751
751
  f < p ? (u.scrollable = !0, t && [...h.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((K) => {
752
752
  K.id === `tag${u.activeKey.split("/").join("/")}` && K.scrollIntoView && K.scrollIntoView();
753
753
  })) : u.scrollable = !1;
754
- }, ee = (t) => !(t.draggedContext.element.meta.affix || t.relatedContext.element.meta.affix), de = () => {
754
+ }, Z = (t) => !(t.draggedContext.element.meta.affix || t.relatedContext.element.meta.affix), te = () => {
755
755
  let t;
756
- t = Ct(), t.listenTo($.value, () => T(!0));
757
- }, w = (t) => {
756
+ t = Ct(), t.listenTo(T.value, () => b(!0));
757
+ }, P = (t) => {
758
758
  const { fullPath: f } = t;
759
- if (f === s.fullPath || (u.activeKey = f, !t))
759
+ if (f === l.fullPath || (u.activeKey = f, !t))
760
760
  return;
761
- const { replace: p } = P;
761
+ const { replace: p } = k;
762
762
  toString.call(t), p(t).catch(console.error);
763
- }, k = (t, f) => {
764
- t.preventDefault(), x.value = f.path === "/home", u.showDropdown = !1, se().then(() => {
763
+ }, x = (t, f) => {
764
+ t.preventDefault(), L.value = f.path === "/home", u.showDropdown = !1, le().then(() => {
765
765
  u.showDropdown = !0, u.dropdownX = t.clientX, u.dropdownY = t.clientY;
766
766
  });
767
767
  }, S = () => {
768
- if (s.meta.keepAlive) {
769
- var t = P.currentRoute.value.matched.find(
770
- (f) => f.name == s.name
768
+ if (l.meta.keepAlive) {
769
+ var t = k.currentRoute.value.matched.find(
770
+ (f) => f.name == l.name
771
771
  );
772
772
  t && t.components?.default?.name;
773
773
  }
774
- }, E = (t) => {
775
- if (b.value.length === 1)
774
+ }, O = (t) => {
775
+ if (y.value.length === 1)
776
776
  return d.warning("这已经是最后一页,不能再关闭了!");
777
- if (S(), l.closeCurrentTab(t), u.activeKey === t.fullPath) {
778
- const f = b.value[Math.max(0, b.value.length - 1)];
779
- u.activeKey = f.fullPath, P.push(f);
777
+ if (S(), s.closeCurrentTab(t), u.activeKey === t.fullPath) {
778
+ const f = y.value[Math.max(0, y.value.length - 1)];
779
+ u.activeKey = f.fullPath, k.push(f);
780
780
  }
781
- T();
781
+ b();
782
782
  }, I = (t) => {
783
- const { fullPath: f } = t, p = b.value.find((R) => R.fullPath == f);
784
- E(p);
783
+ const { fullPath: f } = t, p = y.value.find((E) => E.fullPath == f);
784
+ O(p);
785
785
  }, q = (t) => {
786
- l.closeOtherTabs(t), u.activeKey = t.fullPath, P.replace(t.fullPath), T();
787
- }, Z = () => {
788
- l.closeAllTabs(), T();
789
- }, X = Ne("reloadPage"), te = (t) => {
786
+ s.closeOtherTabs(t), u.activeKey = t.fullPath, k.replace(t.fullPath), b();
787
+ }, G = () => {
788
+ s.closeAllTabs(), b();
789
+ }, X = Ne("reloadPage"), ae = (t) => {
790
790
  switch (t) {
791
791
  //刷新
792
792
  case "1":
@@ -794,21 +794,21 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
794
794
  break;
795
795
  //关闭
796
796
  case "2":
797
- E(s);
797
+ O(l);
798
798
  break;
799
799
  //关闭其他
800
800
  case "3":
801
- q(s);
801
+ q(l);
802
802
  break;
803
803
  //关闭所有
804
804
  case "4":
805
- Z();
805
+ G();
806
806
  break;
807
807
  }
808
- T(), u.showDropdown = !1;
808
+ b(), u.showDropdown = !1;
809
809
  }, J = (t, f) => {
810
- const p = h.value.scrollLeft, R = f > 0 && p + f >= t || f < 0 && p + f <= t ? t : p + f;
811
- if (h.value && h.value.scrollTo(R, 0), R !== t)
810
+ const p = h.value.scrollLeft, E = f > 0 && p + f >= t || f < 0 && p + f <= t ? t : p + f;
811
+ if (h.value && h.value.scrollTo(E, 0), E !== t)
812
812
  return window.requestAnimationFrame(() => J(t, f));
813
813
  }, fe = () => {
814
814
  const t = h.value.offsetWidth, f = h.value.scrollLeft;
@@ -818,11 +818,11 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
818
818
  }, ge = () => {
819
819
  const t = h.value.offsetWidth, f = h.value.scrollWidth, p = h.value.scrollLeft;
820
820
  if (f - p <= t) return;
821
- const R = f - p > t * 2 ? p + t : f - t;
822
- J(R, (R - p) / 20);
821
+ const E = f - p > t * 2 ? p + t : f - t;
822
+ J(E, (E - p) / 20);
823
823
  };
824
824
  return window.addEventListener("beforeunload", () => {
825
- localStorage.setItem("TABS_ROUTES", JSON.stringify(b.value));
825
+ localStorage.setItem("TABS_ROUTES", JSON.stringify(y.value));
826
826
  }), window.addEventListener(
827
827
  "scroll",
828
828
  (t) => {
@@ -831,26 +831,26 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
831
831
  },
832
832
  !0
833
833
  ), ze(
834
- () => s.fullPath,
834
+ () => l.fullPath,
835
835
  (t) => {
836
- O.includes(s.name) || (u.activeKey = t, l.addTab(D(s)), T(!0));
836
+ $.includes(l.name) || (u.activeKey = t, s.addTab(D(l)), b(!0));
837
837
  },
838
838
  { immediate: !0 }
839
- ), C(), Q(() => de()), (t, f) => (g(), H("div", {
839
+ ), B(), ee(() => te()), (t, f) => (g(), H("div", {
840
840
  class: "box-border tabs-view tabs-view-fix tabs-view-default-background",
841
841
  style: De(i.value)
842
842
  }, [
843
843
  v("div", Qt, [
844
844
  v("div", {
845
845
  ref_key: "navWrap",
846
- ref: $,
847
- class: oe(["tabs-card", { "tabs-card-scrollable": u.scrollable }])
846
+ ref: T,
847
+ class: se(["tabs-card", { "tabs-card-scrollable": u.scrollable }])
848
848
  }, [
849
849
  v("span", {
850
- class: oe(["tabs-card-prev", { "tabs-card-prev-hide": !u.scrollable }]),
850
+ class: se(["tabs-card-prev", { "tabs-card-prev-hide": !u.scrollable }]),
851
851
  onClick: fe
852
852
  }, [
853
- c(a(N), {
853
+ c(a(R), {
854
854
  size: "16",
855
855
  color: "#515a6e"
856
856
  }, {
@@ -861,10 +861,10 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
861
861
  })
862
862
  ], 2),
863
863
  v("span", {
864
- class: oe(["tabs-card-next", { "tabs-card-next-hide": !u.scrollable }]),
864
+ class: se(["tabs-card-next", { "tabs-card-next-hide": !u.scrollable }]),
865
865
  onClick: ge
866
866
  }, [
867
- c(a(N), {
867
+ c(a(R), {
868
868
  size: "16",
869
869
  color: "#515a6e"
870
870
  }, {
@@ -880,24 +880,24 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
880
880
  class: "tabs-card-scroll"
881
881
  }, [
882
882
  c(a(St), {
883
- list: b.value,
883
+ list: y.value,
884
884
  animation: "300",
885
885
  "item-key": "fullPath",
886
886
  class: "flex",
887
- move: ee
887
+ move: Z
888
888
  }, {
889
889
  item: o(({ element: p }) => [
890
890
  v("div", {
891
891
  id: `tag${p.fullPath.split("/").join("/")}`,
892
- class: oe(["tabs-card-scroll-item", { "active-item": u.activeKey === p.fullPath }]),
893
- onClick: me((R) => w(p), ["stop"]),
894
- onContextmenu: (R) => k(R, p)
892
+ class: se(["tabs-card-scroll-item", { "active-item": u.activeKey === p.fullPath }]),
893
+ onClick: me((E) => P(p), ["stop"]),
894
+ onContextmenu: (E) => x(E, p)
895
895
  }, [
896
896
  v("span", null, j(p.meta.title), 1),
897
- p.meta.affix ? A("", !0) : (g(), L(a(N), {
897
+ p.meta.affix ? A("", !0) : (g(), C(a(R), {
898
898
  key: 0,
899
899
  size: "14",
900
- onClick: me((R) => I(p), ["stop"])
900
+ onClick: me((E) => I(p), ["stop"])
901
901
  }, {
902
902
  default: o(() => [
903
903
  c(a($e))
@@ -911,15 +911,15 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
911
911
  ], 512)
912
912
  ], 2),
913
913
  v("div", ta, [
914
- c(a(G), {
914
+ c(a(Q), {
915
915
  trigger: "hover",
916
- onSelect: te,
916
+ onSelect: ae,
917
917
  placement: "bottom-end",
918
918
  options: _.value
919
919
  }, {
920
920
  default: o(() => [
921
921
  v("div", aa, [
922
- c(a(N), {
922
+ c(a(R), {
923
923
  size: "16",
924
924
  color: "#515a6e"
925
925
  }, {
@@ -933,13 +933,13 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
933
933
  _: 1
934
934
  }, 8, ["options"])
935
935
  ]),
936
- c(a(G), {
936
+ c(a(Q), {
937
937
  show: u.showDropdown,
938
938
  x: u.dropdownX,
939
939
  y: u.dropdownY,
940
940
  onClickoutside: f[0] || (f[0] = (p) => u.showDropdown = !1),
941
941
  placement: "bottom-start",
942
- onSelect: te,
942
+ onSelect: ae,
943
943
  options: _.value
944
944
  }, null, 8, ["show", "x", "y", "options"])
945
945
  ])
@@ -948,20 +948,20 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
948
948
  }), oa = /* @__PURE__ */ F(na, [["__scopeId", "data-v-e37d2460"]]), sa = /* @__PURE__ */ W({
949
949
  __name: "PMenus",
950
950
  setup(e) {
951
- const n = ce(), r = le(), m = re(), d = B(n.name), s = B(
951
+ const n = re(), r = ce(), m = ie(), d = N(n.name), l = N(
952
952
  n.matched && n.matched.length ? n.matched.map((u) => u.name) : []
953
- ), P = B([]), h = (u) => {
953
+ ), k = N([]), h = (u) => {
954
954
  /http(s)?:/.test(u) ? window.open(u) : r.push({ name: u });
955
- }, $ = (u) => {
955
+ }, T = (u) => {
956
956
  if (!u) return;
957
- const O = u.find((D) => s.value.indexOf(D) === -1);
958
- s.value = O ? [O] : [];
959
- }, x = () => {
957
+ const $ = u.find((D) => l.value.indexOf(D) === -1);
958
+ l.value = $ ? [$] : [];
959
+ }, L = () => {
960
960
  const u = n.matched;
961
- s.value = u.map((D) => D.name);
962
- const O = n.meta?.activeMenu || "";
963
- d.value = O || n.name;
964
- }, l = (u, O = [], D = !1) => {
961
+ l.value = u.map((D) => D.name);
962
+ const $ = n.meta?.activeMenu || "";
963
+ d.value = $ || n.name;
964
+ }, s = (u, $ = [], D = !1) => {
965
965
  const i = [], _ = [
966
966
  "/:path(.*)*",
967
967
  "/redirect",
@@ -971,65 +971,67 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
971
971
  ];
972
972
  if (!u || u.length === 0)
973
973
  return i;
974
- u = u.sort((y, M) => {
975
- let C = (M.children?.length ? 1 : 0) - (y.children?.length ? 1 : 0);
976
- return C === 0 && (C = (y.meta?.sort ?? 0) - (M.meta?.sort ?? 0)), C;
974
+ u = u.sort((w, M) => {
975
+ let B = (M.children?.length ? 1 : 0) - (w.children?.length ? 1 : 0);
976
+ return B === 0 && (B = (w.meta?.sort ?? 0) - (M.meta?.sort ?? 0)), B;
977
977
  });
978
- for (const y of u) {
979
- if (D || y.meta?.hidden || _.includes(y.path.toLowerCase())) {
980
- O.push(y.name);
978
+ for (const w of u) {
979
+ if (D || w.meta?.hidden || _.includes(w.path.toLowerCase())) {
980
+ $.push(w.name), s(w.children || [], $, !0);
981
981
  continue;
982
982
  }
983
- const M = y.meta?.alwaysShow != !0 && y.children?.filter((ee) => !ee.meta?.hidden)?.length === 1, C = M ? y.children[0] : y, T = {
984
- key: C.name,
985
- label: C.meta?.title,
986
- affix: C.meta?.affix,
987
- sort: C.meta?.sort,
988
- path: C.path,
989
- redirect: C.redirect,
990
- icon: M ? y.meta?.icon : C.meta?.icon,
991
- permissions: C.meta?.permissions,
992
- meta: C.meta,
983
+ const M = w.children?.filter(
984
+ (te) => !te.meta?.hidden
985
+ ) || [], B = w.meta?.alwaysShow != !0 && M.length === 1, b = B ? M[0] : w, Z = {
986
+ key: b.name,
987
+ label: b.meta?.title,
988
+ affix: b.meta?.affix,
989
+ sort: B ? w.meta?.sort ?? 0 : b.meta?.sort ?? 0,
990
+ path: b.path,
991
+ redirect: b.redirect,
992
+ icon: B ? w.meta?.icon : b.meta?.icon,
993
+ permissions: b.meta?.permissions,
994
+ meta: b.meta,
993
995
  children: void 0
994
996
  };
995
- O.includes(C.name) || (i.push(T), O.push(C.name)), C.children?.length > 0 && (T.children = l(C.children, O, D));
997
+ $.includes(b.name) || (i.push(Z), $.push(b.name)), b.children?.length > 0 && (Z.children = s(b.children, $, D));
996
998
  }
997
999
  return i;
998
- }, b = () => {
1000
+ }, y = () => {
999
1001
  const u = r.getRoutes();
1000
- P.value = l(u);
1002
+ k.value = s(u);
1001
1003
  };
1002
1004
  return ze(
1003
1005
  () => n.fullPath,
1004
1006
  () => {
1005
- x();
1007
+ L();
1006
1008
  }
1007
- ), Q(() => {
1008
- b(), x();
1009
- }), (u, O) => (g(), L(a(je), {
1009
+ ), ee(() => {
1010
+ y(), L();
1011
+ }), (u, $) => (g(), C(a(je), {
1010
1012
  class: "h-full",
1011
1013
  inverted: "",
1012
1014
  mode: "vertical",
1013
- options: P.value,
1015
+ options: k.value,
1014
1016
  collapsed: a(m).state.collapsed,
1015
1017
  "collapsed-width": 64,
1016
1018
  "collapsed-icon-size": 20,
1017
1019
  indent: 24,
1018
- "expanded-keys": s.value,
1020
+ "expanded-keys": l.value,
1019
1021
  value: d.value,
1020
1022
  "onUpdate:value": h,
1021
- "onUpdate:expandedKeys": $
1023
+ "onUpdate:expandedKeys": T
1022
1024
  }, null, 8, ["options", "collapsed", "expanded-keys", "value"]));
1023
1025
  }
1024
1026
  }), la = { class: "layout-content-main layout-content-main-fix" }, ca = { class: "main-view main-view-fix" }, ra = /* @__PURE__ */ W({
1025
1027
  __name: "PLayout",
1026
1028
  setup(e) {
1027
- const n = re(), r = B(!1);
1029
+ const n = ie(), r = N(!1);
1028
1030
  return ut("reloadPage", () => {
1029
- r.value = !0, se(() => r.value = !1);
1030
- }), (d, s) => {
1031
- const P = Ye;
1032
- return g(), L(a(Le), {
1031
+ r.value = !0, le(() => r.value = !1);
1032
+ }), (d, l) => {
1033
+ const k = Ye;
1034
+ return g(), C(a(Le), {
1033
1035
  "has-sider": "",
1034
1036
  class: "layout",
1035
1037
  position: "absolute"
@@ -1079,7 +1081,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
1079
1081
  ]),
1080
1082
  _: 1
1081
1083
  }),
1082
- c(P, {
1084
+ c(k, {
1083
1085
  right: 20,
1084
1086
  class: "z-50"
1085
1087
  })
@@ -1094,7 +1096,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
1094
1096
  }), ia = /* @__PURE__ */ F(ra, [["__scopeId", "data-v-0bac2e7d"]]), ua = {};
1095
1097
  function da(e, n) {
1096
1098
  const r = Be("router-view");
1097
- return g(), L(r);
1099
+ return g(), C(r);
1098
1100
  }
1099
1101
  const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha = /* @__PURE__ */ W({
1100
1102
  __name: "PApplication",
@@ -1115,7 +1117,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1115
1117
  setup(e) {
1116
1118
  return (n, r) => {
1117
1119
  const m = Xe;
1118
- return g(), L(m, {
1120
+ return g(), C(m, {
1119
1121
  locale: a(Ze),
1120
1122
  theme: e.theme,
1121
1123
  "theme-overrides": e.themeOverrides,
@@ -1160,37 +1162,37 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1160
1162
  },
1161
1163
  emits: ["update:visible", "update:loading"],
1162
1164
  setup(e, { expose: n, emit: r }) {
1163
- const m = ue(), d = e, s = r, P = async () => {
1164
- s("update:loading", !0);
1165
+ const m = de(), d = e, l = r, k = async () => {
1166
+ l("update:loading", !0);
1165
1167
  try {
1166
1168
  d.onSave && await d.onSave() && h();
1167
- } catch (b) {
1168
- m.error(b.message);
1169
+ } catch (y) {
1170
+ m.error(y.message);
1169
1171
  } finally {
1170
- s("update:loading", !1);
1172
+ l("update:loading", !1);
1171
1173
  }
1172
1174
  }, h = () => {
1173
- s("update:visible", !1), s("update:loading", !1);
1174
- }, $ = async () => {
1175
+ l("update:visible", !1), l("update:loading", !1);
1176
+ }, T = async () => {
1175
1177
  try {
1176
1178
  d.onClose ? await d.onClose() && h() : h();
1177
- } catch (b) {
1178
- m.error(b.message), s("update:loading", !1);
1179
+ } catch (y) {
1180
+ m.error(y.message), l("update:loading", !1);
1179
1181
  }
1180
1182
  };
1181
1183
  return n({
1182
1184
  open: () => {
1183
- s("update:visible", !0), s("update:loading", !1);
1185
+ l("update:visible", !0), l("update:loading", !1);
1184
1186
  },
1185
1187
  close: () => {
1186
- s("update:visible", !1), s("update:loading", !1);
1188
+ l("update:visible", !1), l("update:loading", !1);
1187
1189
  }
1188
- }), (b, u) => {
1189
- const O = at, D = ve, i = _e;
1190
- return g(), L(a(tt), dt({
1190
+ }), (y, u) => {
1191
+ const $ = at, D = ve, i = _e;
1192
+ return g(), C(a(tt), dt({
1191
1193
  ref: "$modal",
1192
1194
  preset: "card"
1193
- }, b.$attrs, {
1195
+ }, y.$attrs, {
1194
1196
  "header-class": "bg-gray-50",
1195
1197
  show: d.visible,
1196
1198
  draggable: !0,
@@ -1202,7 +1204,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1202
1204
  onClose: h
1203
1205
  }), {
1204
1206
  header: o(() => [
1205
- b.$slots.header ? Y(b.$slots, "header", { key: 0 }) : d.title ? (g(), L(O, { key: 1 }, {
1207
+ y.$slots.header ? Y(y.$slots, "header", { key: 0 }) : d.title ? (g(), C($, { key: 1 }, {
1206
1208
  default: o(() => [
1207
1209
  pe(j(e.title), 1)
1208
1210
  ]),
@@ -1210,37 +1212,37 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1210
1212
  })) : A("", !0)
1211
1213
  ]),
1212
1214
  "header-extra": o(() => [
1213
- Y(b.$slots, "header-extra")
1215
+ Y(y.$slots, "header-extra")
1214
1216
  ]),
1215
1217
  default: o(() => [
1216
1218
  v("div", {
1217
1219
  class: "overflow-y-auto overflow-hidden mt-5",
1218
1220
  style: De({ maxHeight: `${d.height}px` })
1219
1221
  }, [
1220
- Y(b.$slots, "default")
1222
+ Y(y.$slots, "default")
1221
1223
  ], 4)
1222
1224
  ]),
1223
1225
  footer: o(() => [
1224
- Y(b.$slots, "footer")
1226
+ Y(y.$slots, "footer")
1225
1227
  ]),
1226
1228
  action: o(() => [
1227
1229
  c(i, { justify: "end" }, {
1228
1230
  default: o(() => [
1229
- d.hideSaveBtn ? A("", !0) : (g(), L(D, {
1231
+ d.hideSaveBtn ? A("", !0) : (g(), C(D, {
1230
1232
  key: 0,
1231
1233
  type: "primary",
1232
1234
  loading: e.loading,
1233
- onClick: P
1235
+ onClick: k
1234
1236
  }, {
1235
1237
  default: o(() => [
1236
1238
  pe(j(e.saveBtnText), 1)
1237
1239
  ]),
1238
1240
  _: 1
1239
1241
  }, 8, ["loading"])),
1240
- Y(b.$slots, "action-extra", { loading: e.loading }),
1241
- d.hideCancelBtn ? A("", !0) : (g(), L(D, {
1242
+ Y(y.$slots, "action-extra", { loading: e.loading }),
1243
+ d.hideCancelBtn ? A("", !0) : (g(), C(D, {
1242
1244
  key: 1,
1243
- onClick: $,
1245
+ onClick: T,
1244
1246
  loading: e.loading
1245
1247
  }, {
1246
1248
  default: o(() => [
@@ -1259,7 +1261,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1259
1261
  }), va = U(_a), ba = U(Ae), ya = W({
1260
1262
  name: "Redirect",
1261
1263
  setup() {
1262
- const e = ce(), n = le();
1264
+ const e = re(), n = ce();
1263
1265
  return ft(() => {
1264
1266
  const { params: r, query: m } = e, { path: d } = r;
1265
1267
  n.replace({
@@ -1271,28 +1273,28 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1271
1273
  }), wa = U(ya), Pa = { class: "frame" }, ka = ["src"], xa = /* @__PURE__ */ W({
1272
1274
  __name: "PIframe",
1273
1275
  setup(e) {
1274
- const n = ce(), r = B(!1), m = B(null), d = B("");
1276
+ const n = re(), r = N(!1), m = N(null), d = N("");
1275
1277
  a(n.meta)?.frameSrc && (d.value = a(n.meta)?.frameSrc);
1276
- function s() {
1278
+ function l() {
1277
1279
  r.value = !1;
1278
1280
  }
1279
- function P() {
1280
- se(() => {
1281
+ function k() {
1282
+ le(() => {
1281
1283
  const h = a(m);
1282
1284
  if (!h) return;
1283
- const $ = h;
1284
- $.attachEvent ? $.attachEvent("onload", () => {
1285
- s();
1285
+ const T = h;
1286
+ T.attachEvent ? T.attachEvent("onload", () => {
1287
+ l();
1286
1288
  }) : h.onload = () => {
1287
- s();
1289
+ l();
1288
1290
  };
1289
1291
  });
1290
1292
  }
1291
- return Q(() => {
1292
- r.value = !0, P();
1293
- }), (h, $) => {
1294
- const x = ot;
1295
- return g(), L(x, { show: r.value }, {
1293
+ return ee(() => {
1294
+ r.value = !0, k();
1295
+ }), (h, T) => {
1296
+ const L = ot;
1297
+ return g(), C(L, { show: r.value }, {
1296
1298
  default: o(() => [
1297
1299
  v("div", Pa, [
1298
1300
  v("iframe", {
@@ -1317,26 +1319,26 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1317
1319
  setup(e) {
1318
1320
  const n = e;
1319
1321
  return (r, m) => {
1320
- const d = N, s = be, P = _e, h = Ee;
1322
+ const d = R, l = be, k = _e, h = Ee;
1321
1323
  return g(), H("div", Sa, [
1322
- n.title ? (g(), L(h, {
1324
+ n.title ? (g(), C(h, {
1323
1325
  key: 0,
1324
1326
  class: "mb-4",
1325
1327
  bordered: !1,
1326
1328
  "content-class": "py-4"
1327
1329
  }, {
1328
1330
  default: o(() => [
1329
- c(P, {
1331
+ c(k, {
1330
1332
  align: "center",
1331
1333
  justify: "space-between"
1332
1334
  }, {
1333
1335
  default: o(() => [
1334
- c(P, {
1336
+ c(k, {
1335
1337
  align: "center",
1336
1338
  size: 16
1337
1339
  }, {
1338
1340
  default: o(() => [
1339
- n.icon ? (g(), L(s, {
1341
+ n.icon ? (g(), C(l, {
1340
1342
  key: 0,
1341
1343
  size: 48,
1342
1344
  class: "bg-linear-to-br from-blue-500 to-indigo-600"
@@ -1363,7 +1365,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1363
1365
  ]),
1364
1366
  _: 1
1365
1367
  })) : A("", !0),
1366
- r.$slots.search ? (g(), L(h, {
1368
+ r.$slots.search ? (g(), C(h, {
1367
1369
  key: 1,
1368
1370
  class: "mb-4",
1369
1371
  "content-class": "flex flex-row gap-2",
@@ -1374,7 +1376,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1374
1376
  ]),
1375
1377
  _: 3
1376
1378
  })) : A("", !0),
1377
- r.$slots.default ? (g(), L(h, {
1379
+ r.$slots.default ? (g(), C(h, {
1378
1380
  key: 2,
1379
1381
  "content-class": "flex flex-row gap-2 p-0!",
1380
1382
  bordered: !1
@@ -1423,22 +1425,22 @@ function Ua(e, n) {
1423
1425
  const ja = /* @__PURE__ */ F(Ha, [["render", Ua], ["__scopeId", "data-v-3baa9c16"]]), qa = U(za), Fa = U(Ia), Ka = U(ja), Va = ke("app-oidc", () => {
1424
1426
  const e = we({});
1425
1427
  return {
1426
- setCallback: (s) => e.callback = s,
1427
- callCallback: async (s) => await e.callback?.(s),
1428
- setError: (s) => e.error = s,
1429
- callError: async (s, P) => await e.error?.(s, P)
1428
+ setCallback: (l) => e.callback = l,
1429
+ callCallback: async (l) => await e.callback?.(l),
1430
+ setError: (l) => e.error = l,
1431
+ callError: async (l, k) => await e.error?.(l, k)
1430
1432
  };
1431
1433
  }), Ya = { class: "view-auth-callback" }, Xa = /* @__PURE__ */ W({
1432
1434
  __name: "POidc",
1433
1435
  setup(e) {
1434
- const n = le(), { callCallback: r, callError: m } = Va();
1435
- return Q(async () => {
1436
+ const n = ce(), { callCallback: r, callError: m } = Va();
1437
+ return ee(async () => {
1436
1438
  try {
1437
1439
  await r(n);
1438
1440
  } catch (d) {
1439
1441
  await m(n, d);
1440
1442
  }
1441
- }), (d, s) => (g(), H("div", Ya, [...s[0] || (s[0] = [
1443
+ }), (d, l) => (g(), H("div", Ya, [...l[0] || (l[0] = [
1442
1444
  v("div", { class: "view-auth-callback-content" }, [
1443
1445
  v("div", { class: "view-auth-callback-spinner" }, [
1444
1446
  v("span", null, "正在处理登录回调...")
@@ -1483,6 +1485,6 @@ export {
1483
1485
  cn as default,
1484
1486
  Qa as install,
1485
1487
  Mt as useLanguageStore,
1486
- re as useLayoutStore,
1488
+ ie as useLayoutStore,
1487
1489
  Va as useOidcStore
1488
1490
  };