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