@huyooo/ui 0.5.37 → 0.5.39

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.
@@ -1,516 +0,0 @@
1
- /* empty css */
2
- /* empty css */
3
- import { defineComponent as v, ref as $, watch as U, createElementBlock as n, openBlock as t, createElementVNode as r, createVNode as _, unref as d, withCtx as J, resolveComponent as Q, createBlock as z, createCommentVNode as w, toDisplayString as C, onMounted as X, onUnmounted as Y, Fragment as A, renderList as P, normalizeClass as M, normalizeStyle as I, renderSlot as q, computed as T } from "vue";
4
- import { Spin as H } from "@arco-design/web-vue";
5
- import { a as E } from "./useAuthkitUsersProfile-B1y2nleU.js";
6
- import { u as K, a as Z } from "./auth-B864DrVx.js";
7
- import { u as V } from "./useAuthkitAppsAuthPageInfo-Ct-ElH04.js";
8
- import { a as B, f as R, w as L, b as D, d as O, c as ee } from "./useSEO-CDBhukDZ.js";
9
- import "./useUploadCos-Ca4Mo5FD.js";
10
- import { useRouter as G, useRoute as W } from "vue-router";
11
- /* empty css */
12
- /* empty css */
13
- import { d as te, c as N } from "./UserAccountMenu-CBcYE5WO.js";
14
- /* empty css */
15
- /* empty css */
16
- /* empty css */
17
- /* empty css */
18
- import { M as oe } from "./Menu-ejsosUdV.js";
19
- import "./CollapseItem-Cw1vcdLu.js";
20
- /* empty css */
21
- import "./CustomTable-B8i1SbFB.js";
22
- import "./index-Bb-d5pBq.js";
23
- import "@iconify/vue";
24
- import { _ as h } from "./_plugin-vue_export-helper-CHgC5LLL.js";
25
- const ne = {
26
- class: "SidebarCom"
27
- }, se = {
28
- class: "LogoContent"
29
- }, ae = {
30
- class: "MenuContent"
31
- }, ie = {
32
- class: "sidebar-footer"
33
- }, re = /* @__PURE__ */ v({
34
- __name: "AppSidebar",
35
- props: {
36
- menuType: {
37
- default: "system"
38
- },
39
- showUserPanel: {
40
- type: Boolean,
41
- default: !0
42
- }
43
- },
44
- setup(o) {
45
- const e = o, {
46
- show: s
47
- } = K(), {
48
- isLoggedIn: c
49
- } = E(), {
50
- appsData: a
51
- } = V(), {
52
- menus: u,
53
- hasPermission: b
54
- } = B(e.menuType), g = G(), f = $(!1);
55
- function k() {
56
- g.push({
57
- path: "/"
58
- });
59
- }
60
- const p = W(), y = $([""]);
61
- function S(i) {
62
- const l = i.path;
63
- if (!b(l)) {
64
- c.value || (s.value = !0);
65
- return;
66
- }
67
- L(() => {
68
- g.push(l), y.value = [l], window.scrollTo({
69
- top: 0,
70
- behavior: "smooth"
71
- });
72
- });
73
- }
74
- return U(() => p.path, () => {
75
- const i = R(p.matched, e.menuType, p.path);
76
- console.log(i, p.matched, e.menuType, p.path, "activateKey"), i && (y.value = [i]);
77
- }, {
78
- immediate: !0
79
- }), (i, l) => (t(), n("div", ne, [r("div", se, [_(d(F), {
80
- icon: d(a).applicationLogoUrl,
81
- name: d(a).name,
82
- onTo: k
83
- }, null, 8, ["icon", "name"])]), r("div", ae, [_(oe, {
84
- "selected-keys": y.value,
85
- "onUpdate:selectedKeys": l[0] || (l[0] = (m) => y.value = m),
86
- menus: d(u),
87
- onChange: S
88
- }, null, 8, ["selected-keys", "menus"])]), r("div", ie, [_(d(te), {
89
- onArrowClick: l[2] || (l[2] = (m) => f.value = !f.value)
90
- }, {
91
- avatar: J(() => [_(d(N), {
92
- modelValue: f.value,
93
- "onUpdate:modelValue": l[1] || (l[1] = (m) => f.value = m),
94
- position: "tr",
95
- "dropdown-offset-y": "30px",
96
- "dropdown-offset-x": "230px"
97
- }, null, 8, ["modelValue"])]),
98
- _: 1
99
- })])]));
100
- }
101
- }), ce = /* @__PURE__ */ h(re, [["__scopeId", "data-v-df07e222"]]), ue = {
102
- class: "layout"
103
- }, le = {
104
- class: "leftContent"
105
- }, de = {
106
- class: "content"
107
- }, pe = {
108
- class: "contentCenter"
109
- }, me = {
110
- class: "pages"
111
- }, fe = {
112
- key: 0,
113
- class: "loading"
114
- }, _e = /* @__PURE__ */ v({
115
- __name: "AppLayout",
116
- props: {
117
- menuType: {
118
- default: "system"
119
- },
120
- showUserPanel: {
121
- type: Boolean,
122
- default: !0
123
- }
124
- },
125
- setup(o) {
126
- const e = o, {
127
- isChecking: s
128
- } = D();
129
- return O(), (c, a) => {
130
- const u = Q("RouterView");
131
- return t(), n("div", ue, [r("div", le, [_(ce, {
132
- "menu-type": e.menuType,
133
- "show-user-panel": e.showUserPanel
134
- }, null, 8, ["menu-type", "show-user-panel"])]), r("div", de, [r("div", pe, [r("div", me, [d(s) ? (t(), n("div", fe, [_(d(H), {
135
- size: 40
136
- })])) : (t(), z(u, {
137
- key: 1
138
- }))])])])]);
139
- };
140
- }
141
- }), ht = /* @__PURE__ */ h(_e, [["__scopeId", "data-v-4a48c340"]]), he = {
142
- class: "ContentHead"
143
- }, ve = {
144
- class: "title"
145
- }, ge = {
146
- key: 0,
147
- class: "description"
148
- }, ye = /* @__PURE__ */ v({
149
- __name: "ContentHead",
150
- props: {
151
- title: {
152
- type: String,
153
- required: !0,
154
- default: () => ""
155
- },
156
- description: {
157
- type: String,
158
- required: !0,
159
- default: () => ""
160
- }
161
- },
162
- setup(o) {
163
- const e = o;
164
- return (s, c) => (t(), n("div", he, [r("h1", ve, C(e.title), 1), e.description ? (t(), n("p", ge, C(e.description), 1)) : w("", !0)]));
165
- }
166
- }), vt = /* @__PURE__ */ h(ye, [["__scopeId", "data-v-209a7bef"]]), be = {
167
- class: "HeaderMenus"
168
- }, ke = {
169
- key: 0,
170
- class: "desktop-menus"
171
- }, Se = ["onClick"], we = {
172
- key: 3,
173
- class: "mobile-menu"
174
- }, $e = {
175
- class: "mobile-menu-content"
176
- }, Ce = ["onClick"], Ie = /* @__PURE__ */ v({
177
- __name: "HeaderMenus",
178
- props: {
179
- menus: {
180
- type: Array,
181
- required: !0
182
- },
183
- activateKey: {
184
- type: String,
185
- required: !0
186
- }
187
- },
188
- emits: ["change"],
189
- setup(o, {
190
- emit: e
191
- }) {
192
- const s = o, c = e, a = $(!1), u = $(!1);
193
- function b() {
194
- u.value = window.innerWidth <= 1024;
195
- }
196
- function g() {
197
- a.value = !a.value;
198
- }
199
- function f() {
200
- a.value = !1;
201
- }
202
- function k(i) {
203
- c("change", i), f();
204
- }
205
- function p(i) {
206
- return s.activateKey === i.path;
207
- }
208
- function y(i) {
209
- c("change", i);
210
- }
211
- function S() {
212
- b(), u.value || f();
213
- }
214
- return X(() => {
215
- b(), window.addEventListener("resize", S);
216
- }), Y(() => {
217
- window.removeEventListener("resize", S);
218
- }), (i, l) => (t(), n("div", be, [u.value ? w("", !0) : (t(), n("div", ke, [(t(!0), n(A, null, P(s.menus, (m, x) => (t(), n("div", {
219
- key: x,
220
- class: M(["headerLink", {
221
- activate: p(m)
222
- }]),
223
- onClick: (j) => y(m)
224
- }, C(m.name), 11, Se))), 128))])), u.value ? (t(), n("button", {
225
- key: 1,
226
- class: M(["mobile-menu-toggle", {
227
- active: a.value
228
- }]),
229
- "aria-label": "切换菜单",
230
- onClick: g
231
- }, [...l[0] || (l[0] = [r("span", {
232
- class: "hamburger-line"
233
- }, null, -1), r("span", {
234
- class: "hamburger-line"
235
- }, null, -1), r("span", {
236
- class: "hamburger-line"
237
- }, null, -1)])], 2)) : w("", !0), a.value ? (t(), n("div", {
238
- key: 2,
239
- class: "mobile-menu-overlay",
240
- onClick: f
241
- })) : w("", !0), a.value ? (t(), n("div", we, [r("div", $e, [(t(!0), n(A, null, P(s.menus, (m, x) => (t(), n("div", {
242
- key: x,
243
- class: M(["mobile-menu-item", {
244
- activate: p(m)
245
- }]),
246
- onClick: (j) => k(m)
247
- }, C(m.name), 11, Ce))), 128))])])) : w("", !0)]));
248
- }
249
- }), xe = /* @__PURE__ */ h(Ie, [["__scopeId", "data-v-beef3157"]]), Me = ["src"], Te = /* @__PURE__ */ v({
250
- __name: "Logo",
251
- props: {
252
- name: {
253
- type: String,
254
- required: !1,
255
- default: () => "#2d2d2d"
256
- },
257
- icon: {
258
- type: String,
259
- required: !1,
260
- default: () => ""
261
- },
262
- color: {
263
- type: String,
264
- required: !1,
265
- default: () => "#2d2d2d"
266
- },
267
- fontSize: {
268
- type: String,
269
- required: !1,
270
- default: () => "16px"
271
- }
272
- },
273
- emits: ["to"],
274
- setup(o, {
275
- emit: e
276
- }) {
277
- const s = o, c = e;
278
- function a() {
279
- c("to");
280
- }
281
- return (u, b) => (t(), n("div", {
282
- class: "Logo",
283
- onClick: a
284
- }, [o.icon ? (t(), n("img", {
285
- key: 0,
286
- class: "icon",
287
- src: o.icon,
288
- alt: "logo",
289
- loading: "lazy",
290
- decoding: "async"
291
- }, null, 8, Me)) : w("", !0), r("div", {
292
- class: "text",
293
- style: I({
294
- color: s.color,
295
- fontSize: s.fontSize
296
- })
297
- }, C(o.name), 5)]));
298
- }
299
- }), F = /* @__PURE__ */ h(Te, [["__scopeId", "data-v-694a3ecc"]]), Le = {
300
- class: "HeaderCom"
301
- }, Ae = {
302
- class: "left"
303
- }, Pe = {
304
- class: "right"
305
- }, Ue = /* @__PURE__ */ v({
306
- __name: "Header",
307
- props: {
308
- menuType: {
309
- default: "header"
310
- },
311
- showUserPanel: {
312
- type: Boolean,
313
- default: !0
314
- }
315
- },
316
- setup(o) {
317
- const e = o, {
318
- show: s
319
- } = K(), {
320
- isLoggedIn: c
321
- } = E(), {
322
- appsData: a
323
- } = V(), {
324
- menus: u,
325
- hasPermission: b
326
- } = B(e.menuType), g = $(""), f = G(), k = W();
327
- function p() {
328
- L(() => {
329
- f.push({
330
- path: "/"
331
- }), window.scrollTo({
332
- top: 0,
333
- behavior: "smooth"
334
- });
335
- });
336
- }
337
- function y(S) {
338
- const i = S.path;
339
- if (!b(i)) {
340
- c.value || (s.value = !0);
341
- return;
342
- }
343
- L(() => {
344
- f.push(i), g.value = i, window.scrollTo({
345
- top: 0,
346
- behavior: "smooth"
347
- });
348
- });
349
- }
350
- return U(() => k.path, () => {
351
- g.value = R(k.matched, e.menuType, k.path);
352
- }, {
353
- immediate: !0
354
- }), (S, i) => (t(), n("div", Le, [r("div", Ae, [_(F, {
355
- icon: d(a).applicationLogoUrl,
356
- name: d(a).name,
357
- onTo: p
358
- }, null, 8, ["icon", "name"])]), r("div", Pe, [_(xe, {
359
- menus: d(u),
360
- activateKey: g.value,
361
- onChange: y
362
- }, null, 8, ["menus", "activateKey"]), e.showUserPanel ? (t(), z(N, {
363
- key: 0,
364
- onToHomePage: p,
365
- onSignOut: p
366
- })) : w("", !0)])]));
367
- }
368
- }), ze = /* @__PURE__ */ h(Ue, [["__scopeId", "data-v-48ee6be5"]]), qe = {
369
- class: "body"
370
- }, He = {
371
- key: 0,
372
- class: "loading"
373
- }, Ee = "linear-gradient(to bottom, #fefdff, #f9f6fe, #f2eefd, #ebe8fd, #e2e1fd, #dfe0fd, #dcdffd, #d9defd, #dde2fd, #e0e5fd, #e4e9fd, #e8ecfd)", Ke = /* @__PURE__ */ v({
374
- __name: "DefaultLayout",
375
- props: {
376
- menuType: {
377
- default: "header"
378
- },
379
- showUserPanel: {
380
- type: Boolean,
381
- default: !0
382
- },
383
- backgroundImage: {
384
- default: ""
385
- }
386
- },
387
- setup(o) {
388
- const e = o, {
389
- setGlobalSEO: s
390
- } = ee();
391
- s(Z);
392
- const {
393
- isChecking: c
394
- } = D();
395
- return O(), (a, u) => (t(), n("div", {
396
- class: "layout",
397
- style: I({
398
- backgroundImage: e.backgroundImage || Ee,
399
- backgroundAttachment: "fixed"
400
- })
401
- }, [_(ze, {
402
- "menu-type": e.menuType,
403
- "show-user-panel": e.showUserPanel
404
- }, null, 8, ["menu-type", "show-user-panel"]), r("div", qe, [d(c) ? (t(), n("div", He, [_(d(H), {
405
- size: 40
406
- })])) : q(a.$slots, "default", {
407
- key: 1
408
- }, void 0, !0)])], 4));
409
- }
410
- }), gt = /* @__PURE__ */ h(Ke, [["__scopeId", "data-v-690c2133"]]), Ve = /* @__PURE__ */ v({
411
- __name: "Gradientbackground",
412
- props: {
413
- width: {
414
- type: String,
415
- default: "100%"
416
- },
417
- height: {
418
- type: String,
419
- default: "100%"
420
- },
421
- zIndex: {
422
- type: String,
423
- default: "-1"
424
- },
425
- top: {
426
- type: String,
427
- default: "10%"
428
- },
429
- left: {
430
- type: String,
431
- default: "0%"
432
- },
433
- right: {
434
- type: String,
435
- default: "auto"
436
- },
437
- blur: {
438
- type: String,
439
- default: "0px"
440
- },
441
- background: {
442
- type: String,
443
- required: !1,
444
- default: () => "linear-gradient(180deg, rgb(0 225 10 / 10%) 0.31%, rgb(26 214 255 / 52%) 74.99%, rgb(220 189 0 / 0%) 99.69%)"
445
- }
446
- },
447
- setup(o) {
448
- const e = o, s = T(() => ({
449
- pointerEvents: "none",
450
- position: "absolute",
451
- zIndex: e.zIndex,
452
- width: e.width,
453
- height: e.height,
454
- filter: `blur(${e.blur})`
455
- })), c = T(() => ({
456
- width: "100%",
457
- height: "100%",
458
- background: e.background
459
- // background: `linear-gradient(180deg, #D5D1FF 0.31%, #EAEDFF 74.99%, rgba(240, 246, 255, 0) 99.69%)`,
460
- // background: `linear-gradient(180deg, rgb(0 225 10 / 63%) 0.31%, rgb(26 214 255 / 52%) 74.99%, rgb(220 189 0 / 0%) 99.69%)`,
461
- // background: `linear-gradient(315deg, rgb(0 225 10 / 63%) 10%, rgb(26 214 255 / 52%) 50%, rgb(220 189 0 / 37%) 100%)`,
462
- }));
463
- return (a, u) => (t(), n("div", {
464
- class: "ellipsis",
465
- style: I(s.value)
466
- }, [r("div", {
467
- class: "ellipsis-item",
468
- style: I(c.value)
469
- }, null, 4)], 4));
470
- }
471
- }), yt = /* @__PURE__ */ h(Ve, [["__scopeId", "data-v-b6461ac4"]]), Be = {
472
- class: "SvgIcon"
473
- }, Re = ["href", "fill"], De = /* @__PURE__ */ v({
474
- __name: "SvgIcon",
475
- props: {
476
- prefix: {
477
- type: String,
478
- required: !1,
479
- default: "icon"
480
- },
481
- name: {
482
- type: String,
483
- required: !0
484
- },
485
- color: {
486
- type: String,
487
- required: !1,
488
- default: "#333"
489
- }
490
- },
491
- setup(o) {
492
- const e = o, s = T(() => `#${e.prefix ?? "icon"}-${e.name}`);
493
- return (c, a) => (t(), n("svg", Be, [r("use", {
494
- href: s.value,
495
- fill: e.color
496
- }, null, 8, Re)]));
497
- }
498
- }), bt = /* @__PURE__ */ h(De, [["__scopeId", "data-v-0a9de94e"]]), Oe = {}, Ge = {
499
- class: "WidthContainer"
500
- };
501
- function We(o, e) {
502
- return t(), n("div", Ge, [q(o.$slots, "default", {}, void 0, !0)]);
503
- }
504
- const kt = /* @__PURE__ */ h(Oe, [["render", We], ["__scopeId", "data-v-d06aac1f"]]);
505
- export {
506
- ht as A,
507
- vt as C,
508
- gt as D,
509
- yt as G,
510
- ze as H,
511
- F as L,
512
- bt as S,
513
- kt as W,
514
- ce as a,
515
- xe as b
516
- };