@huyooo/ui 0.5.17 → 0.5.18

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,389 +0,0 @@
1
- import { defineComponent as f, createElementBlock as n, openBlock as t, createElementVNode as c, createCommentVNode as p, toDisplayString as k, ref as M, onMounted as A, onUnmounted as E, Fragment as q, renderList as H, normalizeClass as C, normalizeStyle as S, watch as U, createVNode as $, unref as b, createBlock as B, renderSlot as P, computed as x } from "vue";
2
- import { _ as l } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- /* empty css */
4
- /* empty css */
5
- import { Spin as O } from "@arco-design/web-vue";
6
- import { c as D } from "./UserPanel-B-gZUacS.js";
7
- import { u as K } from "./useAuthkitAppsAuthPageInfo-BifS1KOG.js";
8
- import { u as R } from "./useAuthkitAuthModal-BpOmabWi.js";
9
- import { a as G } from "./useAuthkitUsersProfile-zbKT0W_h.js";
10
- import { a as V, f as W, w as L, c as N, b as F, d as j } from "./useSEO-BLlxOmk2.js";
11
- import { useRouter as J, useRoute as Q } from "vue-router";
12
- import { a as X } from "./globalConfig-C1YOJcxa.js";
13
- /* empty css */
14
- import "@huyooo/api";
15
- import "./useUploadCos-D5k1YLb7.js";
16
- const Y = {
17
- class: "ContentHead"
18
- }, Z = {
19
- class: "title"
20
- }, ee = {
21
- key: 0,
22
- class: "description"
23
- }, te = /* @__PURE__ */ f({
24
- __name: "ContentHead",
25
- props: {
26
- title: {
27
- type: String,
28
- required: !0,
29
- default: () => ""
30
- },
31
- description: {
32
- type: String,
33
- required: !0,
34
- default: () => ""
35
- }
36
- },
37
- setup(o) {
38
- const e = o;
39
- return (s, r) => (t(), n("div", Y, [c("h1", Z, k(e.title), 1), e.description ? (t(), n("p", ee, k(e.description), 1)) : p("", !0)]));
40
- }
41
- }), Ve = /* @__PURE__ */ l(te, [["__scopeId", "data-v-209a7bef"]]), ne = {
42
- class: "HeaderMenus"
43
- }, oe = {
44
- key: 0,
45
- class: "desktop-menus"
46
- }, se = ["onClick"], ae = {
47
- key: 3,
48
- class: "mobile-menu"
49
- }, re = {
50
- class: "mobile-menu-content"
51
- }, ie = ["onClick"], ce = /* @__PURE__ */ f({
52
- __name: "HeaderMenus",
53
- props: {
54
- menus: {
55
- type: Array,
56
- required: !0
57
- },
58
- activateKey: {
59
- type: String,
60
- required: !0
61
- }
62
- },
63
- emits: ["change"],
64
- setup(o, {
65
- emit: e
66
- }) {
67
- const s = o, r = e, a = M(!1), u = M(!1);
68
- function h() {
69
- u.value = window.innerWidth <= 1024;
70
- }
71
- function g() {
72
- a.value = !a.value;
73
- }
74
- function m() {
75
- a.value = !1;
76
- }
77
- function v(i) {
78
- r("change", i), m();
79
- }
80
- function _(i) {
81
- return s.activateKey === i.path;
82
- }
83
- function w(i) {
84
- r("change", i);
85
- }
86
- function y() {
87
- h(), u.value || m();
88
- }
89
- return A(() => {
90
- h(), window.addEventListener("resize", y);
91
- }), E(() => {
92
- window.removeEventListener("resize", y);
93
- }), (i, z) => (t(), n("div", ne, [u.value ? p("", !0) : (t(), n("div", oe, [(t(!0), n(q, null, H(s.menus, (d, I) => (t(), n("div", {
94
- key: I,
95
- class: C(["headerLink", {
96
- activate: _(d)
97
- }]),
98
- onClick: (T) => w(d)
99
- }, k(d.name), 11, se))), 128))])), u.value ? (t(), n("button", {
100
- key: 1,
101
- class: C(["mobile-menu-toggle", {
102
- active: a.value
103
- }]),
104
- "aria-label": "切换菜单",
105
- onClick: g
106
- }, [...z[0] || (z[0] = [c("span", {
107
- class: "hamburger-line"
108
- }, null, -1), c("span", {
109
- class: "hamburger-line"
110
- }, null, -1), c("span", {
111
- class: "hamburger-line"
112
- }, null, -1)])], 2)) : p("", !0), a.value ? (t(), n("div", {
113
- key: 2,
114
- class: "mobile-menu-overlay",
115
- onClick: m
116
- })) : p("", !0), a.value ? (t(), n("div", ae, [c("div", re, [(t(!0), n(q, null, H(s.menus, (d, I) => (t(), n("div", {
117
- key: I,
118
- class: C(["mobile-menu-item", {
119
- activate: _(d)
120
- }]),
121
- onClick: (T) => v(d)
122
- }, k(d.name), 11, ie))), 128))])])) : p("", !0)]));
123
- }
124
- }), ue = /* @__PURE__ */ l(ce, [["__scopeId", "data-v-beef3157"]]), le = ["src"], de = /* @__PURE__ */ f({
125
- __name: "Logo",
126
- props: {
127
- name: {
128
- type: String,
129
- required: !1,
130
- default: () => "#2d2d2d"
131
- },
132
- icon: {
133
- type: String,
134
- required: !1,
135
- default: () => ""
136
- },
137
- color: {
138
- type: String,
139
- required: !1,
140
- default: () => "#2d2d2d"
141
- },
142
- fontSize: {
143
- type: String,
144
- required: !1,
145
- default: () => "16px"
146
- }
147
- },
148
- emits: ["to"],
149
- setup(o, {
150
- emit: e
151
- }) {
152
- const s = o, r = e;
153
- function a() {
154
- r("to");
155
- }
156
- return (u, h) => (t(), n("div", {
157
- class: "Logo",
158
- onClick: a
159
- }, [o.icon ? (t(), n("img", {
160
- key: 0,
161
- class: "icon",
162
- src: o.icon,
163
- alt: "logo",
164
- loading: "lazy",
165
- decoding: "async"
166
- }, null, 8, le)) : p("", !0), c("div", {
167
- class: "text",
168
- style: S({
169
- color: s.color,
170
- fontSize: s.fontSize
171
- })
172
- }, k(o.name), 5)]));
173
- }
174
- }), pe = /* @__PURE__ */ l(de, [["__scopeId", "data-v-694a3ecc"]]), fe = {
175
- class: "HeaderCom"
176
- }, me = {
177
- class: "left"
178
- }, _e = {
179
- class: "right"
180
- }, he = /* @__PURE__ */ f({
181
- __name: "Header",
182
- props: {
183
- menuType: {
184
- default: "header"
185
- },
186
- showUserPanel: {
187
- type: Boolean,
188
- default: !0
189
- }
190
- },
191
- setup(o) {
192
- const e = o, {
193
- show: s
194
- } = R(), {
195
- isLoggedIn: r
196
- } = G(), {
197
- appsData: a
198
- } = K(), {
199
- menus: u,
200
- hasPermission: h
201
- } = V(e.menuType), g = M(""), m = J(), v = Q();
202
- function _() {
203
- L(() => {
204
- m.push({
205
- path: "/"
206
- }), window.scrollTo({
207
- top: 0,
208
- behavior: "smooth"
209
- });
210
- });
211
- }
212
- function w(y) {
213
- const i = y.path;
214
- if (!h(i)) {
215
- r.value || (s.value = !0);
216
- return;
217
- }
218
- L(() => {
219
- m.push(i), g.value = i, window.scrollTo({
220
- top: 0,
221
- behavior: "smooth"
222
- });
223
- });
224
- }
225
- return U(() => v.path, () => {
226
- g.value = W(v.matched, e.menuType, v.path);
227
- }, {
228
- immediate: !0
229
- }), (y, i) => (t(), n("div", fe, [c("div", me, [$(pe, {
230
- icon: b(a).applicationLogoUrl,
231
- name: b(a).name,
232
- onTo: _
233
- }, null, 8, ["icon", "name"])]), c("div", _e, [$(ue, {
234
- menus: b(u),
235
- activateKey: g.value,
236
- onChange: w
237
- }, null, 8, ["menus", "activateKey"]), e.showUserPanel ? (t(), B(D, {
238
- key: 0,
239
- onToHomePage: _,
240
- onSignOut: _
241
- })) : p("", !0)])]));
242
- }
243
- }), ge = /* @__PURE__ */ l(he, [["__scopeId", "data-v-48ee6be5"]]), ve = {
244
- class: "body"
245
- }, ye = {
246
- key: 0,
247
- class: "loading"
248
- }, be = "linear-gradient(to bottom, #fefdff, #f9f6fe, #f2eefd, #ebe8fd, #e2e1fd, #dfe0fd, #dcdffd, #d9defd, #dde2fd, #e0e5fd, #e4e9fd, #e8ecfd)", ke = /* @__PURE__ */ f({
249
- __name: "DefaultLayout",
250
- props: {
251
- menuType: {
252
- default: "header"
253
- },
254
- showUserPanel: {
255
- type: Boolean,
256
- default: !0
257
- },
258
- backgroundImage: {
259
- default: ""
260
- }
261
- },
262
- setup(o) {
263
- const e = o, {
264
- setGlobalSEO: s
265
- } = N();
266
- s(X);
267
- const {
268
- isChecking: r
269
- } = F();
270
- return j(), (a, u) => (t(), n("div", {
271
- class: "layout",
272
- style: S({
273
- backgroundImage: e.backgroundImage || be,
274
- backgroundAttachment: "fixed"
275
- })
276
- }, [$(ge, {
277
- "menu-type": e.menuType,
278
- "show-user-panel": e.showUserPanel
279
- }, null, 8, ["menu-type", "show-user-panel"]), c("div", ve, [b(r) ? (t(), n("div", ye, [$(b(O), {
280
- size: 40
281
- })])) : P(a.$slots, "default", {
282
- key: 1
283
- }, void 0, !0)])], 4));
284
- }
285
- }), We = /* @__PURE__ */ l(ke, [["__scopeId", "data-v-690c2133"]]), Se = /* @__PURE__ */ f({
286
- __name: "Gradientbackground",
287
- props: {
288
- width: {
289
- type: String,
290
- default: "100%"
291
- },
292
- height: {
293
- type: String,
294
- default: "100%"
295
- },
296
- zIndex: {
297
- type: String,
298
- default: "-1"
299
- },
300
- top: {
301
- type: String,
302
- default: "10%"
303
- },
304
- left: {
305
- type: String,
306
- default: "0%"
307
- },
308
- right: {
309
- type: String,
310
- default: "auto"
311
- },
312
- blur: {
313
- type: String,
314
- default: "0px"
315
- },
316
- background: {
317
- type: String,
318
- required: !1,
319
- 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%)"
320
- }
321
- },
322
- setup(o) {
323
- const e = o, s = x(() => ({
324
- pointerEvents: "none",
325
- position: "absolute",
326
- zIndex: e.zIndex,
327
- width: e.width,
328
- height: e.height,
329
- filter: `blur(${e.blur})`
330
- })), r = x(() => ({
331
- width: "100%",
332
- height: "100%",
333
- background: e.background
334
- // background: `linear-gradient(180deg, #D5D1FF 0.31%, #EAEDFF 74.99%, rgba(240, 246, 255, 0) 99.69%)`,
335
- // 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%)`,
336
- // background: `linear-gradient(315deg, rgb(0 225 10 / 63%) 10%, rgb(26 214 255 / 52%) 50%, rgb(220 189 0 / 37%) 100%)`,
337
- }));
338
- return (a, u) => (t(), n("div", {
339
- class: "ellipsis",
340
- style: S(s.value)
341
- }, [c("div", {
342
- class: "ellipsis-item",
343
- style: S(r.value)
344
- }, null, 4)], 4));
345
- }
346
- }), Ne = /* @__PURE__ */ l(Se, [["__scopeId", "data-v-b6461ac4"]]), $e = {
347
- class: "SvgIcon"
348
- }, we = ["href", "fill"], Ie = /* @__PURE__ */ f({
349
- __name: "SvgIcon",
350
- props: {
351
- prefix: {
352
- type: String,
353
- required: !1,
354
- default: "icon"
355
- },
356
- name: {
357
- type: String,
358
- required: !0
359
- },
360
- color: {
361
- type: String,
362
- required: !1,
363
- default: "#333"
364
- }
365
- },
366
- setup(o) {
367
- const e = o, s = x(() => `#${e.prefix ?? "icon"}-${e.name}`);
368
- return (r, a) => (t(), n("svg", $e, [c("use", {
369
- href: s.value,
370
- fill: e.color
371
- }, null, 8, we)]));
372
- }
373
- }), Fe = /* @__PURE__ */ l(Ie, [["__scopeId", "data-v-0a9de94e"]]), Ce = {}, Me = {
374
- class: "WidthContainer"
375
- };
376
- function xe(o, e) {
377
- return t(), n("div", Me, [P(o.$slots, "default", {}, void 0, !0)]);
378
- }
379
- const je = /* @__PURE__ */ l(Ce, [["render", xe], ["__scopeId", "data-v-d06aac1f"]]);
380
- export {
381
- Ve as C,
382
- We as D,
383
- Ne as G,
384
- ge as H,
385
- pe as L,
386
- Fe as S,
387
- je as W,
388
- ue as a
389
- };