@huyooo/ui 0.5.51 → 0.5.52

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