@huyooo/ui 0.5.34 → 0.5.37

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