workdesktop-ai 1.2.1 → 1.2.2

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.
Files changed (115) hide show
  1. package/CHANGELOG.md +190 -190
  2. package/dist/chunks/Path-pIP0JQ0c.mjs +245 -0
  3. package/dist/chunks/Path-pIP0JQ0c.mjs.map +1 -0
  4. package/dist/chunks/Station-BTP0SbBg.mjs +818 -0
  5. package/dist/chunks/Station-BTP0SbBg.mjs.map +1 -0
  6. package/dist/index.esm.js +2 -2
  7. package/dist/index.umd.js +19 -19
  8. package/dist/index.umd.js.map +1 -1
  9. package/dist/path/index.mjs +1 -1
  10. package/dist/path/style.css +1 -1
  11. package/dist/station/index.mjs +1 -1
  12. package/dist/station/style.css +1 -1
  13. package/dist/style.css +1 -1
  14. package/dist/types/src/components/buttons/ApiButton.vue.d.ts +134 -0
  15. package/dist/types/src/components/buttons/ConfirmButton.vue.d.ts +169 -0
  16. package/dist/types/src/components/buttons/DialogButton.vue.d.ts +167 -0
  17. package/dist/types/src/components/buttons/DrawerButton.vue.d.ts +186 -0
  18. package/dist/types/src/components/buttons/PopconfirmButton.vue.d.ts +317 -0
  19. package/dist/types/src/components/buttons/PromptButton.vue.d.ts +180 -0
  20. package/dist/types/src/components/buttons/RouteButton.vue.d.ts +122 -0
  21. package/dist/types/src/components/buttons/TipsButton.vue.d.ts +66 -0
  22. package/dist/types/src/components/buttons/useApiAction.d.ts +20 -0
  23. package/dist/types/src/components/common/props.d.ts +122 -0
  24. package/dist/types/src/components/containers/Drawer.vue.d.ts +172 -0
  25. package/dist/types/src/components/containers/Iframe.vue.d.ts +81 -0
  26. package/dist/types/src/components/containers/containerContext.d.ts +15 -0
  27. package/dist/types/src/components/containers/useContainerController.d.ts +24 -0
  28. package/dist/types/src/components/containers/useIframeContainer.d.ts +20 -0
  29. package/dist/types/src/components/core/Requester.vue.d.ts +41 -0
  30. package/dist/types/src/components/data/datagrid/DataGrid.vue.d.ts +542 -0
  31. package/dist/types/src/components/data/datagrid/useColumnSettings.d.ts +62 -0
  32. package/dist/types/src/components/data/editable-grid/EditableGrid.vue.d.ts +586 -0
  33. package/dist/types/src/components/data/viewer/Viewer.vue.d.ts +187 -0
  34. package/dist/types/src/components/form/FormItem.vue.d.ts +62 -0
  35. package/dist/types/src/components/form/SearchItem.vue.d.ts +62 -0
  36. package/dist/types/src/components/form/SearchPanel.vue.d.ts +167 -0
  37. package/dist/types/src/components/form/data-form/DataForm.vue.d.ts +311 -0
  38. package/dist/types/src/components/index.d.ts +32 -0
  39. package/dist/types/src/components/inputs/AutoComplete.vue.d.ts +166 -0
  40. package/dist/types/src/components/inputs/CheckboxList.vue.d.ts +166 -0
  41. package/dist/types/src/components/inputs/RadioList.vue.d.ts +166 -0
  42. package/dist/types/src/components/inputs/Select.vue.d.ts +176 -0
  43. package/dist/types/src/components/inputs/Switch.vue.d.ts +116 -0
  44. package/dist/types/src/components/inputs/useOptionsLoader.d.ts +32 -0
  45. package/dist/types/src/components/layout/Station.vue.d.ts +313 -0
  46. package/dist/types/src/components/layout/StationMenuNode.vue.d.ts +20 -0
  47. package/dist/types/src/components/layout/types.d.ts +67 -0
  48. package/dist/types/src/components/styles/Panel.vue.d.ts +94 -0
  49. package/dist/types/src/components/styles/Path.vue.d.ts +103 -0
  50. package/dist/types/src/components/styles/Tips.vue.d.ts +60 -0
  51. package/dist/types/src/components/upload/ImageUpload.vue.d.ts +176 -0
  52. package/dist/types/src/components/upload/Upload.vue.d.ts +235 -0
  53. package/dist/types/src/entries/api-button.d.ts +9 -0
  54. package/dist/types/src/entries/auto-complete.d.ts +9 -0
  55. package/dist/types/src/entries/checkbox-list.d.ts +9 -0
  56. package/dist/types/src/entries/components-map.d.ts +8 -0
  57. package/dist/types/src/entries/confirm-button.d.ts +9 -0
  58. package/dist/types/src/entries/data-form.d.ts +9 -0
  59. package/dist/types/src/entries/data-grid.d.ts +9 -0
  60. package/dist/types/src/entries/dialog-button.d.ts +9 -0
  61. package/dist/types/src/entries/drawer-button.d.ts +9 -0
  62. package/dist/types/src/entries/drawer.d.ts +9 -0
  63. package/dist/types/src/entries/editable-grid.d.ts +9 -0
  64. package/dist/types/src/entries/form-item.d.ts +9 -0
  65. package/dist/types/src/entries/iframe.d.ts +9 -0
  66. package/dist/types/src/entries/image-upload.d.ts +9 -0
  67. package/dist/types/src/entries/panel.d.ts +9 -0
  68. package/dist/types/src/entries/path.d.ts +9 -0
  69. package/dist/types/src/entries/prompt-button.d.ts +9 -0
  70. package/dist/types/src/entries/radio-list.d.ts +9 -0
  71. package/dist/types/src/entries/requester.d.ts +9 -0
  72. package/dist/types/src/entries/route-button.d.ts +9 -0
  73. package/dist/types/src/entries/search-item.d.ts +9 -0
  74. package/dist/types/src/entries/search-panel.d.ts +9 -0
  75. package/dist/types/src/entries/select.d.ts +9 -0
  76. package/dist/types/src/entries/station.d.ts +9 -0
  77. package/dist/types/src/entries/switch.d.ts +9 -0
  78. package/dist/types/src/entries/tips-button.d.ts +9 -0
  79. package/dist/types/src/entries/tips.d.ts +9 -0
  80. package/dist/types/src/entries/upload.d.ts +9 -0
  81. package/dist/types/src/entries/viewer.d.ts +9 -0
  82. package/dist/types/src/index.d.ts +24 -0
  83. package/dist/types/src/lib/composables/useConfig.d.ts +19 -0
  84. package/dist/types/src/lib/composables/useDataGrid.d.ts +69 -0
  85. package/dist/types/src/lib/composables/useEventBus.d.ts +16 -0
  86. package/dist/types/src/lib/composables/useGlobalState.d.ts +5 -0
  87. package/dist/types/src/lib/composables/useRequest.d.ts +42 -0
  88. package/dist/types/src/lib/configs/default-config.d.ts +6 -0
  89. package/dist/types/src/lib/core/config.d.ts +28 -0
  90. package/dist/types/src/lib/core/http.d.ts +100 -0
  91. package/dist/types/src/lib/core/linkage.d.ts +48 -0
  92. package/dist/types/src/lib/core/skins/apple.d.ts +3 -0
  93. package/dist/types/src/lib/core/skins/business.d.ts +3 -0
  94. package/dist/types/src/lib/core/skins/chinese.d.ts +3 -0
  95. package/dist/types/src/lib/core/skins/cool.d.ts +3 -0
  96. package/dist/types/src/lib/core/skins/cyberpunk.d.ts +3 -0
  97. package/dist/types/src/lib/core/skins/default.d.ts +3 -0
  98. package/dist/types/src/lib/core/skins/fashion.d.ts +3 -0
  99. package/dist/types/src/lib/core/skins/flat.d.ts +3 -0
  100. package/dist/types/src/lib/core/skins/governance.d.ts +3 -0
  101. package/dist/types/src/lib/core/skins/index.d.ts +15 -0
  102. package/dist/types/src/lib/core/skins/tech.d.ts +3 -0
  103. package/dist/types/src/lib/core/skins/types.d.ts +19 -0
  104. package/dist/types/src/lib/core/station-linkage.d.ts +72 -0
  105. package/dist/types/src/lib/core/theme.d.ts +11 -0
  106. package/dist/types/src/lib/core/utils.d.ts +28 -0
  107. package/dist/types/src/lib/install.d.ts +11 -0
  108. package/dist/types/src/types/config.d.ts +130 -0
  109. package/dist/types/src/types/index.d.ts +4 -0
  110. package/dist/types/vite.config.d.ts +7 -0
  111. package/package.json +6 -1
  112. package/dist/chunks/Path-C_oyo6Dg.mjs +0 -200
  113. package/dist/chunks/Path-C_oyo6Dg.mjs.map +0 -1
  114. package/dist/chunks/Station-DLV19USa.mjs +0 -780
  115. package/dist/chunks/Station-DLV19USa.mjs.map +0 -1
@@ -0,0 +1,818 @@
1
+ import { defineComponent as Fe, resolveComponent as m, openBlock as o, createElementBlock as _, Fragment as T, renderList as W, createBlock as s, withCtx as l, createVNode as d, resolveDynamicComponent as B, createCommentVNode as k, createElementVNode as h, toDisplayString as x, getCurrentInstance as ft, computed as y, ref as V, watch as De, onMounted as _t, onUnmounted as vt, normalizeClass as Q, renderSlot as $, withDirectives as ze, vShow as Ke, unref as A, createTextVNode as E, withModifiers as pt, KeepAlive as yt } from "vue";
2
+ import * as Re from "@element-plus/icons-vue";
3
+ import { Fold as ht, Expand as kt, ArrowUp as mt, ArrowDown as Le, Refresh as Oe, Setting as Ve, Close as gt } from "@element-plus/icons-vue";
4
+ import { f as bt } from "./props-DAytpx7D.mjs";
5
+ import { a as wt, n as de } from "./station-linkage-D54-_iyL.mjs";
6
+ import { _ as Pe } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
7
+ const Ct = /* @__PURE__ */ Fe({
8
+ name: "StationMenuNode",
9
+ __name: "StationMenuNode",
10
+ props: {
11
+ /** 归一化后的菜单项(带 _key) */
12
+ items: { type: Array, default: () => [] }
13
+ },
14
+ emits: ["select"],
15
+ setup(a, { emit: X }) {
16
+ const P = X;
17
+ function r(w) {
18
+ return w ? typeof w == "string" ? Re[w] || null : w : null;
19
+ }
20
+ function b(w) {
21
+ w.disabled || P("select", w);
22
+ }
23
+ function g(w) {
24
+ P("select", w);
25
+ }
26
+ return (w, J) => {
27
+ const D = m("el-icon"), z = m("station-menu-node", !0), F = m("el-sub-menu"), j = m("el-badge"), Y = m("el-menu-item");
28
+ return o(!0), _(T, null, W(a.items, (v) => (o(), _(T, {
29
+ key: v._key
30
+ }, [
31
+ v.children && v.children.length ? (o(), s(F, {
32
+ key: 0,
33
+ index: v._key
34
+ }, {
35
+ title: l(() => [
36
+ r(v.icon) ? (o(), s(D, { key: 0 }, {
37
+ default: l(() => [
38
+ (o(), s(B(r(v.icon))))
39
+ ]),
40
+ _: 2
41
+ }, 1024)) : k("", !0),
42
+ h("span", null, x(v.title), 1)
43
+ ]),
44
+ default: l(() => [
45
+ d(z, {
46
+ items: v.children,
47
+ onSelect: g
48
+ }, null, 8, ["items"])
49
+ ]),
50
+ _: 2
51
+ }, 1032, ["index"])) : (o(), s(Y, {
52
+ key: 1,
53
+ index: v._key,
54
+ disabled: v.disabled,
55
+ onClick: (ce) => b(v)
56
+ }, {
57
+ default: l(() => [
58
+ r(v.icon) ? (o(), s(D, { key: 0 }, {
59
+ default: l(() => [
60
+ (o(), s(B(r(v.icon))))
61
+ ]),
62
+ _: 2
63
+ }, 1024)) : k("", !0),
64
+ h("span", null, x(v.title), 1),
65
+ v.badge !== void 0 && v.badge !== "" ? (o(), s(j, {
66
+ key: 1,
67
+ value: v.badge,
68
+ class: "wd-station__menu-badge"
69
+ }, null, 8, ["value"])) : k("", !0)
70
+ ]),
71
+ _: 2
72
+ }, 1032, ["index", "disabled", "onClick"]))
73
+ ], 64))), 128);
74
+ };
75
+ }
76
+ }), R = /* @__PURE__ */ Pe(Ct, [["__scopeId", "data-v-a003600a"]]), St = { class: "wd-station__main" }, Mt = { class: "wd-station__header" }, xt = { class: "wd-station__header-left" }, $t = {
77
+ key: 1,
78
+ class: "wd-station__logo wd-station__logo--header"
79
+ }, At = { class: "wd-station__logo-title" }, Tt = { class: "wd-station__user" }, It = { class: "wd-station__user-name" }, Nt = { class: "wd-station__header-center" }, Et = {
80
+ key: 0,
81
+ class: "wd-station__nav"
82
+ }, Gt = ["onClick"], Bt = {
83
+ key: 1,
84
+ class: "wd-station__header-title"
85
+ }, Wt = { class: "wd-station__header-right" }, Dt = { class: "wd-station__user" }, zt = { class: "wd-station__user-name" }, Kt = {
86
+ key: 0,
87
+ class: "wd-station__top-menu"
88
+ }, Lt = {
89
+ key: 1,
90
+ class: "wd-station__tabs-bar"
91
+ }, Ot = ["onClick"], Vt = { class: "wd-station__tabs-more" }, Ft = { class: "wd-station__content" }, Rt = { class: "wd-station__footer" }, Pt = {
92
+ key: 0,
93
+ class: "wd-station__footer-info"
94
+ }, Jt = {
95
+ key: 1,
96
+ class: "wd-station__footer-copyright"
97
+ }, jt = /* @__PURE__ */ Fe({
98
+ name: "WdStation",
99
+ __name: "Station",
100
+ props: {
101
+ ...bt,
102
+ /** 系统标题(logo 区 / headerMode=title 时的头部标题) */
103
+ title: { type: String, default: "" },
104
+ /** logo 图标(@element-plus/icons-vue 名称字符串,或直接传组件) */
105
+ logo: { type: [String, Object], default: "" },
106
+ /** 分组菜单结构(优先),支持 JSON 字符串 */
107
+ menuGroups: { type: [Array, String], default: void 0 },
108
+ /** 扁平菜单结构(带 group/groupKey 字段按出现顺序归组),支持 JSON 字符串 */
109
+ menus: { type: [Array, String], default: void 0 },
110
+ /** 头部中央模式:nav=分导台 / title=标题(此时侧边渲染全量菜单并带组标题)/ both=分导台+标题并存(顶部显示分导台,侧边按分组标题渲染全量菜单) */
111
+ headerMode: { type: String, default: "nav" },
112
+ /** 是否显示头部中央标题(headerMode 非 nav 时的 fallback 标题;需自绘 header-center 时可关闭) */
113
+ showHeaderTitle: { type: Boolean, default: !0 },
114
+ /** 菜单位置:side=左侧 / top=顶部 / none=不启用 */
115
+ menuMode: { type: String, default: "side" },
116
+ /** 内容方式:page=单页 / tabs=多标签 */
117
+ contentMode: { type: String, default: "page" },
118
+ /** 路由适配:auto=自动检测 $router / router / html */
119
+ routerMode: { type: String, default: "auto" },
120
+ /** 是否显示折叠按钮 */
121
+ collapsible: { type: Boolean, default: !0 },
122
+ /** 折叠状态(v-model:collapsed) */
123
+ collapsed: { type: Boolean, default: !1 },
124
+ /** 当前分组 key(v-model:active-group) */
125
+ activeGroup: { type: String, default: "" },
126
+ /** 当前菜单 key(v-model:active-menu) */
127
+ activeMenu: { type: String, default: "" },
128
+ /** 已开启标签(v-model:open-tabs,受控) */
129
+ openTabs: { type: Array, default: void 0 },
130
+ /** 用户名(有值显示用户下拉,无值显示登录按钮) */
131
+ userName: { type: String, default: "" },
132
+ /** 用户头像地址 */
133
+ userAvatar: { type: String, default: "" },
134
+ /** 版权信息 */
135
+ copyright: { type: String, default: "" },
136
+ /** 底部动态信息(v-model:footer-info) */
137
+ footerInfo: { type: String, default: "" },
138
+ /** router 模式内容区 keep-alive */
139
+ keepAlive: { type: Boolean, default: !1 },
140
+ /** 工具栏点位配置:refresh/settings/user/login 各自 left/right/none,支持 JSON 字符串 */
141
+ toolbarConfig: { type: [Object, String], default: void 0 }
142
+ },
143
+ emits: [
144
+ "update:collapsed",
145
+ "update:active-group",
146
+ "update:active-menu",
147
+ "update:open-tabs",
148
+ "update:footer-info",
149
+ "group-change",
150
+ "menu-select",
151
+ "tab-click",
152
+ "tab-close",
153
+ "refresh",
154
+ "login",
155
+ "logout",
156
+ "settings"
157
+ ],
158
+ setup(a, { expose: X, emit: P }) {
159
+ var Se, Me, xe, $e, Ae, Te, Ie, Ne, Ee, Ge;
160
+ const r = a, b = P, g = ft(), w = ((Se = g == null ? void 0 : g.proxy) == null ? void 0 : Se.$router) || (($e = (xe = (Me = g == null ? void 0 : g.appContext) == null ? void 0 : Me.config) == null ? void 0 : xe.globalProperties) == null ? void 0 : $e.$router), J = ((Ae = g == null ? void 0 : g.proxy) == null ? void 0 : Ae.$route) || ((Ne = (Ie = (Te = g == null ? void 0 : g.appContext) == null ? void 0 : Te.config) == null ? void 0 : Ie.globalProperties) == null ? void 0 : Ne.$route), D = (Ge = (Ee = g == null ? void 0 : g.appContext) == null ? void 0 : Ee.components) == null ? void 0 : Ge.RouterView, z = y(() => r.routerMode === "html" ? !1 : r.routerMode === "router" ? !0 : !!w);
161
+ function F(e, t) {
162
+ if (e == null || e === "") return t;
163
+ if (typeof e != "string") return e;
164
+ try {
165
+ return JSON.parse(e);
166
+ } catch (n) {
167
+ return console.error("[WorkDesktop] WdStation JSON 解析失败,已回退默认值:", n), t;
168
+ }
169
+ }
170
+ function j(e, t) {
171
+ return e.map((n) => ({
172
+ ...n,
173
+ _key: n._key || `${t}:${n.name || n.path || n.title}`,
174
+ children: n.children && n.children.length ? j(n.children, t) : void 0
175
+ }));
176
+ }
177
+ function Y(e) {
178
+ const t = [], n = /* @__PURE__ */ new Map();
179
+ return e.forEach((c) => {
180
+ const i = c.groupKey || c.group || "default";
181
+ n.has(i) || (n.set(i, {
182
+ key: i,
183
+ title: c.group || (i === "default" ? "默认" : i),
184
+ icon: c.groupIcon,
185
+ menus: []
186
+ }), t.push(i)), n.get(i).menus.push(c);
187
+ }), t.map((c) => n.get(c));
188
+ }
189
+ let v = !1;
190
+ function ce(e) {
191
+ if (v) return;
192
+ const t = (n, c) => {
193
+ n.forEach((i) => {
194
+ c > 2 && !v && (v = !0, console.warn("[WorkDesktop] WdStation: 菜单层级建议不超过两层,当前已超出(仍按原样渲染)")), i.children && i.children.length && t(i.children, c + 1);
195
+ });
196
+ };
197
+ e.forEach((n) => t(n.menus, 1));
198
+ }
199
+ const I = y(() => {
200
+ const e = F(r.menuGroups, null);
201
+ let t;
202
+ if (Array.isArray(e) && e.length)
203
+ t = e.map((n) => ({ key: n.key, title: n.title, icon: n.icon, menus: n.menus || [] }));
204
+ else {
205
+ const n = F(r.menus, []);
206
+ t = Y(Array.isArray(n) ? n : []);
207
+ }
208
+ return t = t.map((n) => ({ ...n, menus: j(n.menus, n.key) })), ce(t), t;
209
+ }), Z = V(""), fe = y(
210
+ () => {
211
+ var e;
212
+ return r.activeGroup || Z.value || ((e = I.value[0]) == null ? void 0 : e.key) || "";
213
+ }
214
+ ), Je = y(() => r.headerMode !== "title" && I.value.length > 1), je = y(
215
+ () => I.value.find((e) => e.key === fe.value) || I.value[0]
216
+ ), ee = y(() => {
217
+ var e;
218
+ return ((e = je.value) == null ? void 0 : e.menus) || [];
219
+ });
220
+ function He(e) {
221
+ Z.value = e, b("update:active-group", e);
222
+ const t = I.value.find((n) => n.key === e);
223
+ t && b("group-change", { key: t.key, title: t.title }), de(r.filter);
224
+ }
225
+ const te = V("");
226
+ De(
227
+ () => r.activeMenu,
228
+ (e) => {
229
+ e && (te.value = e);
230
+ }
231
+ );
232
+ const C = y(() => r.activeMenu || te.value);
233
+ function K(e) {
234
+ te.value = e, b("update:active-menu", e), de(r.filter);
235
+ }
236
+ function L(e) {
237
+ K(e._key), b("menu-select", e), r.contentMode === "tabs" && le(e), z.value && e.path && w.push(e.path);
238
+ }
239
+ function ne(e, t) {
240
+ e.forEach((n) => {
241
+ t(n), n.children && n.children.length && ne(n.children, t);
242
+ });
243
+ }
244
+ function Ue(e) {
245
+ for (const t of I.value) {
246
+ let n = null;
247
+ if (ne(t.menus, (c) => {
248
+ !n && c.path === e && (n = c);
249
+ }), n) return { group: t, item: n };
250
+ }
251
+ return null;
252
+ }
253
+ De(
254
+ () => J == null ? void 0 : J.path,
255
+ (e) => {
256
+ if (!e || !z.value) return;
257
+ const t = Ue(e);
258
+ t && (Z.value = t.group.key, K(t.item._key));
259
+ },
260
+ { immediate: !0 }
261
+ );
262
+ const _e = V([]), ve = y(() => r.openTabs !== void 0), N = y(
263
+ () => ve.value ? r.openTabs : _e.value
264
+ );
265
+ function oe(e) {
266
+ ve.value || (_e.value = e), b("update:open-tabs", e);
267
+ }
268
+ function le(e) {
269
+ const t = e._key || e.key;
270
+ t && (N.value.find((n) => n.key === t) || oe([...N.value, { key: t, title: e.title, path: e.path, affix: e.affix }]), K(t));
271
+ }
272
+ function se(e) {
273
+ const t = N.value, n = t.findIndex((f) => f.key === e);
274
+ if (n < 0) return;
275
+ const c = t[n];
276
+ if (c.affix) return;
277
+ const i = t.filter((f) => f.key !== e);
278
+ if (oe(i), b("tab-close", { ...c }), C.value === e) {
279
+ const f = i[n] || i[n - 1];
280
+ f && K(f.key);
281
+ }
282
+ }
283
+ function qe(e) {
284
+ K(e.key), b("tab-click", { ...e }), z.value && e.path && w.push(e.path);
285
+ }
286
+ function ae(e) {
287
+ const t = N.value, n = t.filter((f, M) => e(f, M) && !f.affix);
288
+ if (!n.length) return;
289
+ const c = new Set(n.map((f) => f.key)), i = t.filter((f) => !c.has(f.key));
290
+ if (oe(i), n.forEach((f) => b("tab-close", { ...f })), !i.find((f) => f.key === C.value)) {
291
+ const f = t.findIndex((ie) => ie.key === C.value), M = i[Math.min(f, i.length - 1)];
292
+ M && K(M.key);
293
+ }
294
+ }
295
+ function Qe() {
296
+ se(C.value);
297
+ }
298
+ function Xe() {
299
+ const e = N.value.findIndex((t) => t.key === C.value);
300
+ e < 0 || ae((t, n) => n < e);
301
+ }
302
+ function Ye() {
303
+ ae((e) => e.key !== C.value);
304
+ }
305
+ function Ze() {
306
+ ae(() => !0);
307
+ }
308
+ const et = y(() => {
309
+ const e = N.value.find((t) => t.key === C.value);
310
+ return !!e && !e.affix;
311
+ }), tt = y(() => {
312
+ const e = N.value.findIndex((t) => t.key === C.value);
313
+ return e > 0 && N.value.slice(0, e).some((t) => !t.affix);
314
+ }), nt = y(
315
+ () => N.value.some((e) => !e.affix && e.key !== C.value)
316
+ ), ot = y(() => N.value.some((e) => !e.affix)), pe = y(() => {
317
+ const e = F(r.toolbarConfig, {}) || {};
318
+ return {
319
+ refresh: e.refresh || "right",
320
+ settings: e.settings || "right",
321
+ user: e.user || "right",
322
+ login: e.login || "right"
323
+ };
324
+ }), H = y(() => r.userName ? "user" : "login"), lt = y(() => {
325
+ const e = [], t = pe.value;
326
+ return t.refresh === "left" && e.push("refresh"), t.settings === "left" && e.push("settings"), t[H.value] === "left" && e.push(H.value), e;
327
+ }), st = y(() => {
328
+ const e = [], t = pe.value;
329
+ return t.refresh === "right" && e.push("refresh"), t.settings === "right" && e.push("settings"), t[H.value] === "right" && e.push(H.value), e;
330
+ }), ye = y(() => r.userName ? r.userName.charAt(0) : "");
331
+ function he() {
332
+ b("settings");
333
+ }
334
+ function ke() {
335
+ b("login");
336
+ }
337
+ function me() {
338
+ b("logout");
339
+ }
340
+ const ge = V(!1), S = y(() => r.collapsed || ge.value);
341
+ function at() {
342
+ ge.value = !S.value, b("update:collapsed", S.value);
343
+ }
344
+ const be = V(0);
345
+ function U() {
346
+ be.value += 1, b("refresh");
347
+ }
348
+ const we = V("");
349
+ function it(e) {
350
+ we.value = e, b("update:footer-info", e);
351
+ }
352
+ const Ce = y(() => we.value || r.footerInfo);
353
+ function ut(e) {
354
+ for (const t of I.value) {
355
+ const n = [], c = (i, f) => {
356
+ for (const M of i) {
357
+ if (M._key === e)
358
+ return n.push(...f, M), !0;
359
+ if (M.children && M.children.length && c(M.children, [...f, M])) return !0;
360
+ }
361
+ return !1;
362
+ };
363
+ if (c(t.menus, []))
364
+ return {
365
+ chain: [
366
+ { title: t.title, icon: t.icon },
367
+ ...n.map((i) => ({ title: i.title, path: i.path, icon: i.icon }))
368
+ ]
369
+ };
370
+ }
371
+ return null;
372
+ }
373
+ function rt() {
374
+ var e;
375
+ return C.value ? ((e = ut(C.value)) == null ? void 0 : e.chain) || [] : [];
376
+ }
377
+ let q = null;
378
+ _t(() => {
379
+ q = wt({ filter: r.filter, setFooterInfo: it, refresh: U, getActiveMenuChain: rt }), de(r.filter), r.contentMode === "tabs" && I.value.forEach(
380
+ (e) => ne(e.menus, (t) => {
381
+ t.affix && le(t);
382
+ })
383
+ );
384
+ }), vt(() => {
385
+ q == null || q();
386
+ });
387
+ function G(e) {
388
+ return e ? typeof e == "string" ? Re[e] || null : e : null;
389
+ }
390
+ return X({ refresh: U, openTab: le, closeTab: se }), (e, t) => {
391
+ const n = m("el-icon"), c = m("el-menu-item-group"), i = m("el-badge"), f = m("el-menu-item"), M = m("el-menu"), ie = m("el-scrollbar"), Be = m("el-avatar"), O = m("el-dropdown-item"), ue = m("el-dropdown-menu"), re = m("el-dropdown"), We = m("el-button"), dt = m("el-tab-pane"), ct = m("el-tabs");
392
+ return o(), _("div", {
393
+ class: Q(["wd-station", { "is-collapsed": S.value }])
394
+ }, [
395
+ a.menuMode === "side" ? (o(), _("aside", {
396
+ key: 0,
397
+ class: Q(["wd-station__aside", { "is-collapsed": S.value }])
398
+ }, [
399
+ h("div", {
400
+ class: Q(["wd-station__logo", { "is-collapsed": S.value }])
401
+ }, [
402
+ $(e.$slots, "logo", { collapsed: S.value }, () => [
403
+ G(a.logo) ? (o(), s(n, {
404
+ key: 0,
405
+ class: "wd-station__logo-icon"
406
+ }, {
407
+ default: l(() => [
408
+ (o(), s(B(G(a.logo))))
409
+ ]),
410
+ _: 1
411
+ })) : k("", !0),
412
+ ze(h("span", { class: "wd-station__logo-title" }, x(a.title), 513), [
413
+ [Ke, !S.value]
414
+ ])
415
+ ], !0)
416
+ ], 2),
417
+ $(e.$slots, "menu-top", { collapsed: S.value }, void 0, !0),
418
+ d(ie, { class: "wd-station__menu-scroll" }, {
419
+ default: l(() => [
420
+ d(M, {
421
+ class: "wd-station__menu",
422
+ collapse: S.value,
423
+ "default-active": C.value
424
+ }, {
425
+ default: l(() => {
426
+ var u;
427
+ return [
428
+ a.headerMode === "title" ? (o(), _(T, { key: 0 }, [
429
+ I.value.length > 1 ? (o(!0), _(T, { key: 0 }, W(I.value, (p) => (o(), s(c, {
430
+ key: p.key,
431
+ title: p.title
432
+ }, {
433
+ default: l(() => [
434
+ d(R, {
435
+ items: p.menus,
436
+ onSelect: L
437
+ }, null, 8, ["items"])
438
+ ]),
439
+ _: 2
440
+ }, 1032, ["title"]))), 128)) : (o(), s(R, {
441
+ key: 1,
442
+ items: ((u = I.value[0]) == null ? void 0 : u.menus) || [],
443
+ onSelect: L
444
+ }, null, 8, ["items"]))
445
+ ], 64)) : a.headerMode === "both" ? (o(!0), _(T, { key: 1 }, W(ee.value, (p) => (o(), _(T, {
446
+ key: p._key
447
+ }, [
448
+ p.children && p.children.length ? (o(), s(c, {
449
+ key: 0,
450
+ title: p.title
451
+ }, {
452
+ default: l(() => [
453
+ d(R, {
454
+ items: p.children,
455
+ onSelect: L
456
+ }, null, 8, ["items"])
457
+ ]),
458
+ _: 2
459
+ }, 1032, ["title"])) : (o(), s(f, {
460
+ key: 1,
461
+ index: p._key,
462
+ disabled: p.disabled,
463
+ onClick: (Ht) => L(p)
464
+ }, {
465
+ default: l(() => [
466
+ G(p.icon) ? (o(), s(n, { key: 0 }, {
467
+ default: l(() => [
468
+ (o(), s(B(G(p.icon))))
469
+ ]),
470
+ _: 2
471
+ }, 1024)) : k("", !0),
472
+ h("span", null, x(p.title), 1),
473
+ p.badge !== void 0 && p.badge !== "" ? (o(), s(i, {
474
+ key: 1,
475
+ value: p.badge,
476
+ class: "wd-station__menu-badge"
477
+ }, null, 8, ["value"])) : k("", !0)
478
+ ]),
479
+ _: 2
480
+ }, 1032, ["index", "disabled", "onClick"]))
481
+ ], 64))), 128)) : (o(), s(R, {
482
+ key: 2,
483
+ items: ee.value,
484
+ onSelect: L
485
+ }, null, 8, ["items"]))
486
+ ];
487
+ }),
488
+ _: 1
489
+ }, 8, ["collapse", "default-active"])
490
+ ]),
491
+ _: 1
492
+ }),
493
+ $(e.$slots, "menu-bottom", { collapsed: S.value }, void 0, !0)
494
+ ], 2)) : k("", !0),
495
+ h("div", St, [
496
+ h("header", Mt, [
497
+ h("div", xt, [
498
+ a.collapsible && a.menuMode !== "none" ? (o(), s(n, {
499
+ key: 0,
500
+ class: "wd-station__collapse",
501
+ onClick: at
502
+ }, {
503
+ default: l(() => [
504
+ a.menuMode === "side" && !S.value ? (o(), s(A(ht), { key: 0 })) : a.menuMode === "side" ? (o(), s(A(kt), { key: 1 })) : S.value ? (o(), s(A(Le), { key: 3 })) : (o(), s(A(mt), { key: 2 }))
505
+ ]),
506
+ _: 1
507
+ })) : k("", !0),
508
+ a.menuMode !== "side" ? (o(), _("div", $t, [
509
+ $(e.$slots, "logo", { collapsed: S.value }, () => [
510
+ G(a.logo) ? (o(), s(n, {
511
+ key: 0,
512
+ class: "wd-station__logo-icon"
513
+ }, {
514
+ default: l(() => [
515
+ (o(), s(B(G(a.logo))))
516
+ ]),
517
+ _: 1
518
+ })) : k("", !0),
519
+ h("span", At, x(a.title), 1)
520
+ ], !0)
521
+ ])) : k("", !0),
522
+ (o(!0), _(T, null, W(lt.value, (u) => (o(), _(T, { key: u }, [
523
+ u === "refresh" ? (o(), s(n, {
524
+ key: 0,
525
+ "data-tool": "refresh",
526
+ class: "wd-station__tool",
527
+ onClick: U
528
+ }, {
529
+ default: l(() => [
530
+ d(A(Oe))
531
+ ]),
532
+ _: 1
533
+ })) : u === "settings" ? (o(), s(n, {
534
+ key: 1,
535
+ "data-tool": "settings",
536
+ class: "wd-station__tool",
537
+ onClick: he
538
+ }, {
539
+ default: l(() => [
540
+ d(A(Ve))
541
+ ]),
542
+ _: 1
543
+ })) : u === "user" ? (o(), s(re, {
544
+ key: 2,
545
+ "data-tool": "user",
546
+ class: "wd-station__tool",
547
+ trigger: "click"
548
+ }, {
549
+ dropdown: l(() => [
550
+ d(ue, null, {
551
+ default: l(() => [
552
+ d(O, { onClick: me }, {
553
+ default: l(() => [...t[0] || (t[0] = [
554
+ E("退出登录", -1)
555
+ ])]),
556
+ _: 1
557
+ })
558
+ ]),
559
+ _: 1
560
+ })
561
+ ]),
562
+ default: l(() => [
563
+ h("span", Tt, [
564
+ d(Be, {
565
+ size: 24,
566
+ src: a.userAvatar || void 0
567
+ }, {
568
+ default: l(() => [
569
+ E(x(ye.value), 1)
570
+ ]),
571
+ _: 1
572
+ }, 8, ["src"]),
573
+ h("span", It, x(a.userName), 1)
574
+ ])
575
+ ]),
576
+ _: 1
577
+ })) : u === "login" ? (o(), s(We, {
578
+ key: 3,
579
+ "data-tool": "login",
580
+ size: "small",
581
+ onClick: ke
582
+ }, {
583
+ default: l(() => [...t[1] || (t[1] = [
584
+ E("登录", -1)
585
+ ])]),
586
+ _: 1
587
+ })) : k("", !0)
588
+ ], 64))), 128)),
589
+ $(e.$slots, "header-left", {}, void 0, !0)
590
+ ]),
591
+ h("div", Nt, [
592
+ Je.value ? (o(), _("nav", Et, [
593
+ (o(!0), _(T, null, W(I.value, (u) => (o(), _("span", {
594
+ key: u.key,
595
+ class: Q(["wd-station__nav-item", { "is-active": u.key === fe.value }]),
596
+ onClick: (p) => He(u.key)
597
+ }, [
598
+ G(u.icon) ? (o(), s(n, { key: 0 }, {
599
+ default: l(() => [
600
+ (o(), s(B(G(u.icon))))
601
+ ]),
602
+ _: 2
603
+ }, 1024)) : k("", !0),
604
+ E(" " + x(u.title), 1)
605
+ ], 10, Gt))), 128))
606
+ ])) : a.showHeaderTitle ? (o(), _("span", Bt, x(a.title), 1)) : k("", !0),
607
+ $(e.$slots, "header-center", {}, void 0, !0)
608
+ ]),
609
+ h("div", Wt, [
610
+ $(e.$slots, "header-right", {}, void 0, !0),
611
+ (o(!0), _(T, null, W(st.value, (u) => (o(), _(T, { key: u }, [
612
+ u === "refresh" ? (o(), s(n, {
613
+ key: 0,
614
+ "data-tool": "refresh",
615
+ class: "wd-station__tool",
616
+ onClick: U
617
+ }, {
618
+ default: l(() => [
619
+ d(A(Oe))
620
+ ]),
621
+ _: 1
622
+ })) : u === "settings" ? (o(), s(n, {
623
+ key: 1,
624
+ "data-tool": "settings",
625
+ class: "wd-station__tool",
626
+ onClick: he
627
+ }, {
628
+ default: l(() => [
629
+ d(A(Ve))
630
+ ]),
631
+ _: 1
632
+ })) : u === "user" ? (o(), s(re, {
633
+ key: 2,
634
+ "data-tool": "user",
635
+ class: "wd-station__tool",
636
+ trigger: "click"
637
+ }, {
638
+ dropdown: l(() => [
639
+ d(ue, null, {
640
+ default: l(() => [
641
+ d(O, { onClick: me }, {
642
+ default: l(() => [...t[2] || (t[2] = [
643
+ E("退出登录", -1)
644
+ ])]),
645
+ _: 1
646
+ })
647
+ ]),
648
+ _: 1
649
+ })
650
+ ]),
651
+ default: l(() => [
652
+ h("span", Dt, [
653
+ d(Be, {
654
+ size: 24,
655
+ src: a.userAvatar || void 0
656
+ }, {
657
+ default: l(() => [
658
+ E(x(ye.value), 1)
659
+ ]),
660
+ _: 1
661
+ }, 8, ["src"]),
662
+ h("span", zt, x(a.userName), 1)
663
+ ])
664
+ ]),
665
+ _: 1
666
+ })) : u === "login" ? (o(), s(We, {
667
+ key: 3,
668
+ "data-tool": "login",
669
+ size: "small",
670
+ onClick: ke
671
+ }, {
672
+ default: l(() => [...t[3] || (t[3] = [
673
+ E("登录", -1)
674
+ ])]),
675
+ _: 1
676
+ })) : k("", !0)
677
+ ], 64))), 128))
678
+ ])
679
+ ]),
680
+ a.menuMode === "top" ? ze((o(), _("div", Kt, [
681
+ $(e.$slots, "top-menu-left", {}, void 0, !0),
682
+ d(M, {
683
+ mode: "horizontal",
684
+ "default-active": C.value
685
+ }, {
686
+ default: l(() => [
687
+ d(R, {
688
+ items: ee.value,
689
+ onSelect: L
690
+ }, null, 8, ["items"])
691
+ ]),
692
+ _: 1
693
+ }, 8, ["default-active"]),
694
+ $(e.$slots, "top-menu-right", {}, void 0, !0)
695
+ ], 512)), [
696
+ [Ke, !S.value]
697
+ ]) : k("", !0),
698
+ a.contentMode === "tabs" ? (o(), _("div", Lt, [
699
+ $(e.$slots, "tabs-left", {}, void 0, !0),
700
+ d(ct, {
701
+ "model-value": C.value,
702
+ type: "card",
703
+ class: "wd-station__tabs"
704
+ }, {
705
+ default: l(() => [
706
+ (o(!0), _(T, null, W(N.value, (u) => (o(), s(dt, {
707
+ key: u.key,
708
+ name: u.key
709
+ }, {
710
+ label: l(() => [
711
+ h("span", {
712
+ class: "wd-station__tab-label",
713
+ onClick: (p) => qe(u)
714
+ }, x(u.title), 9, Ot),
715
+ u.affix ? k("", !0) : (o(), s(n, {
716
+ key: 0,
717
+ class: "wd-station__tab-close",
718
+ onClick: pt((p) => se(u.key), ["stop"])
719
+ }, {
720
+ default: l(() => [
721
+ d(A(gt))
722
+ ]),
723
+ _: 1
724
+ }, 8, ["onClick"]))
725
+ ]),
726
+ _: 2
727
+ }, 1032, ["name"]))), 128))
728
+ ]),
729
+ _: 1
730
+ }, 8, ["model-value"]),
731
+ d(re, {
732
+ class: "wd-station__tabs-actions",
733
+ trigger: "click"
734
+ }, {
735
+ dropdown: l(() => [
736
+ d(ue, null, {
737
+ default: l(() => [
738
+ d(O, {
739
+ disabled: !et.value,
740
+ onClick: Qe
741
+ }, {
742
+ default: l(() => [...t[4] || (t[4] = [
743
+ E("关闭当前标签", -1)
744
+ ])]),
745
+ _: 1
746
+ }, 8, ["disabled"]),
747
+ d(O, {
748
+ disabled: !tt.value,
749
+ onClick: Xe
750
+ }, {
751
+ default: l(() => [...t[5] || (t[5] = [
752
+ E("关闭左侧标签", -1)
753
+ ])]),
754
+ _: 1
755
+ }, 8, ["disabled"]),
756
+ d(O, {
757
+ disabled: !nt.value,
758
+ onClick: Ye
759
+ }, {
760
+ default: l(() => [...t[6] || (t[6] = [
761
+ E("关闭其他标签", -1)
762
+ ])]),
763
+ _: 1
764
+ }, 8, ["disabled"]),
765
+ d(O, {
766
+ disabled: !ot.value,
767
+ onClick: Ze
768
+ }, {
769
+ default: l(() => [...t[7] || (t[7] = [
770
+ E("关闭所有标签", -1)
771
+ ])]),
772
+ _: 1
773
+ }, 8, ["disabled"])
774
+ ]),
775
+ _: 1
776
+ })
777
+ ]),
778
+ default: l(() => [
779
+ h("span", Vt, [
780
+ d(n, null, {
781
+ default: l(() => [
782
+ d(A(Le))
783
+ ]),
784
+ _: 1
785
+ })
786
+ ])
787
+ ]),
788
+ _: 1
789
+ }),
790
+ $(e.$slots, "tabs-right", {}, void 0, !0)
791
+ ])) : k("", !0),
792
+ h("main", Ft, [
793
+ (o(), _("div", {
794
+ key: be.value,
795
+ class: "wd-station__content-inner"
796
+ }, [
797
+ z.value && A(D) ? (o(), _(T, { key: 0 }, [
798
+ a.keepAlive ? (o(), s(yt, { key: 0 }, [
799
+ (o(), s(B(A(D))))
800
+ ], 1024)) : (o(), s(B(A(D)), { key: 1 }))
801
+ ], 64)) : $(e.$slots, "default", {}, void 0, !0, 1)
802
+ ]))
803
+ ]),
804
+ h("footer", Rt, [
805
+ $(e.$slots, "footer", {}, () => [
806
+ Ce.value ? (o(), _("span", Pt, x(Ce.value), 1)) : k("", !0),
807
+ a.copyright ? (o(), _("span", Jt, x(a.copyright), 1)) : k("", !0)
808
+ ], !0)
809
+ ])
810
+ ])
811
+ ], 2);
812
+ };
813
+ }
814
+ }), Zt = /* @__PURE__ */ Pe(jt, [["__scopeId", "data-v-f007a699"]]);
815
+ export {
816
+ Zt as W
817
+ };
818
+ //# sourceMappingURL=Station-BTP0SbBg.mjs.map