@huyooo/ui 0.4.14 → 0.4.17

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 (31) hide show
  1. package/dist/{AuthkitAppSetting-iL2SVGkm.js → AuthkitAppSetting-MYrqMZAf.js} +391 -390
  2. package/dist/{AuthkitAuthorize-CLG8uEWI.js → AuthkitAuthorize-CCSa1q9E.js} +1 -1
  3. package/dist/CustomTable-C6Xcn_J7.js +1355 -0
  4. package/dist/{FeedbackItem-oNJcZir4.js → FeedbackItem-B1qKrzqe.js} +1 -1
  5. package/dist/{FeedbackModal-QpDXtZBf.js → FeedbackModal-DzAVNXIR.js} +542 -562
  6. package/dist/MessageHandle-BLiqnTvy.js +885 -0
  7. package/dist/{PaySubscriptions-MYoi8Ob_.js → PaySubscriptions-BS6gjndk.js} +1 -1
  8. package/dist/{ReferrerReferees-CFwb0s28.js → ReferrerReferees-E5Sq9dVw.js} +1 -1
  9. package/dist/{UserPanel-pfGX77rG.js → UserPanel-OyGW7SGI.js} +201 -177
  10. package/dist/authkit.js +3 -3
  11. package/dist/common.js +5 -5
  12. package/dist/components/Feedback/FeedbackBubbleEnd.vue.d.ts +1 -1
  13. package/dist/components/Feedback/FeedbackBubbleStart.vue.d.ts +1 -1
  14. package/dist/components/Feedback/FeedbackDetails.vue.d.ts +1 -0
  15. package/dist/composables/Authkit/useAuthkitAuth.d.ts +9 -0
  16. package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +3 -0
  17. package/dist/composables.js +1 -1
  18. package/dist/feedback.js +2 -2
  19. package/dist/index.js +119 -120
  20. package/dist/message.js +16 -17
  21. package/dist/pay.js +1 -1
  22. package/dist/referrer.js +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/useAuthkitProps-BM6B7mZP.js +384 -0
  25. package/dist/user.js +1 -1
  26. package/dist/utils/authGuard.d.ts +12 -0
  27. package/package.json +1 -1
  28. package/dist/CustomTable-DbiCOvmO.js +0 -1341
  29. package/dist/InfiniteLoading-BOurBPUR.js +0 -66
  30. package/dist/MessageHandle-cZ2FXsJ5.js +0 -827
  31. package/dist/useAuthkitProps-DB04dGw9.js +0 -326
@@ -1,827 +0,0 @@
1
- import { defineComponent as b, mergeModels as q, useModel as V, createBlock as g, openBlock as l, unref as c, isRef as B, withCtx as _, createElementVNode as C, renderSlot as A, createVNode as y, ref as d, createCommentVNode as h, createElementBlock as v, Fragment as D, renderList as z, toDisplayString as L, createTextVNode as x, withModifiers as F, normalizeClass as E, watch as K, computed as R } from "vue";
2
- /* empty css */
3
- /* empty css */
4
- /* empty css */
5
- import { Modal as H, Spin as j, Empty as G, Button as J, Divider as P, Breadcrumb as T, BreadcrumbItem as M } from "@arco-design/web-vue";
6
- import { u as Q } from "./useAuthkitCreateAndUpdate-BpPW409v.js";
7
- import { M as W } from "./Menu-MZJINp6f.js";
8
- import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- import { I as X } from "./InfiniteLoading-BOurBPUR.js";
10
- import { api as U } from "@huyooo/api";
11
- import { TiptapEditor as Y, TiptapTitle as Z } from "@huyooo/vue-tiptap";
12
- /* empty css */
13
- import { u as ee } from "./useMessageNotifications-lmP0vJDM.js";
14
- import { Icon as te } from "@iconify/vue";
15
- const ne = {
16
- class: "content"
17
- }, se = {
18
- class: "left"
19
- }, ie = /* @__PURE__ */ b({
20
- __name: "MessageAppMessage",
21
- props: /* @__PURE__ */ q({
22
- prefixUrl: {
23
- type: String,
24
- required: !0
25
- },
26
- menus: {
27
- type: Array,
28
- required: !0
29
- }
30
- }, {
31
- selectedKeys: {
32
- default: ["ChangelogNotifications"]
33
- },
34
- selectedKeysModifiers: {}
35
- }),
36
- emits: /* @__PURE__ */ q(["cancel", "change"], ["update:selectedKeys"]),
37
- setup(i, {
38
- expose: e,
39
- emit: s
40
- }) {
41
- const a = i, r = s, t = V(i, "selectedKeys");
42
- function n() {
43
- r("cancel");
44
- }
45
- function o(p, f) {
46
- const $ = p.path;
47
- t.value = [$], r("change", p, f);
48
- }
49
- const {
50
- changeType: u,
51
- show: m
52
- } = Q(r);
53
- function k(p) {
54
- m.value = p, u.value = "编辑";
55
- }
56
- return e({
57
- setData: k
58
- }), (p, f) => (l(), g(c(H), {
59
- visible: c(m),
60
- "onUpdate:visible": f[1] || (f[1] = ($) => B(m) ? m.value = $ : null),
61
- loading: !1,
62
- "body-class": "AppMessagebodyClass",
63
- "mask-closable": !1,
64
- footer: !1,
65
- "hide-title": !1,
66
- width: "880px",
67
- onCancel: n
68
- }, {
69
- default: _(() => [C("div", ne, [C("div", se, [y(W, {
70
- "selected-keys": t.value,
71
- "onUpdate:selectedKeys": f[0] || (f[0] = ($) => t.value = $),
72
- menus: a.menus,
73
- onChange: o
74
- }, null, 8, ["selected-keys", "menus"])]), A(p.$slots, "default", {}, void 0, !0)])]),
75
- _: 3
76
- }, 8, ["visible"]));
77
- }
78
- }), ae = /* @__PURE__ */ N(ie, [["__scopeId", "data-v-944d5a11"]]);
79
- function oe(i, e) {
80
- return U({
81
- url: `${i}/restfulApi/messageCenter/changelogNotifications/find`,
82
- method: "post",
83
- data: e
84
- });
85
- }
86
- function le(i, e) {
87
- return U({
88
- url: `${i}/restfulApi/messageCenter/changelogNotifications/findOne`,
89
- method: "post",
90
- data: e
91
- });
92
- }
93
- const re = /* @__PURE__ */ b({
94
- __name: "MessageDetails",
95
- props: {
96
- content: {
97
- type: Object,
98
- default: null
99
- },
100
- title: {
101
- type: String,
102
- required: !0
103
- },
104
- loading: {
105
- type: Boolean,
106
- default: !1
107
- }
108
- },
109
- emits: ["itemClick", "tableOfContentsUpdate", "update:title", "update:content"],
110
- setup(i, {
111
- emit: e
112
- }) {
113
- const s = d([]), a = i, r = d(!1), t = e, n = d();
114
- function o(u) {
115
- s.value = u, t("tableOfContentsUpdate", u);
116
- }
117
- return (u, m) => (l(), g(c(j), {
118
- loading: a.loading,
119
- tip: "文档加载中...",
120
- class: "Spin",
121
- dot: ""
122
- }, {
123
- default: _(() => [y(c(Y), {
124
- ref_key: "TiptapEditorRef",
125
- ref: n,
126
- "model-value": a.content,
127
- editable: r.value,
128
- "tiptap-editor-content-class": "tiptapEditorContentClass",
129
- onTableOfContentsUpdate: o
130
- }, {
131
- title: _(() => [y(c(Z), {
132
- "model-value": a.title,
133
- editable: r.value
134
- }, null, 8, ["model-value", "editable"])]),
135
- _: 1
136
- }, 8, ["model-value", "editable"]), h("", !0)]),
137
- _: 1
138
- }, 8, ["loading"]));
139
- }
140
- }), O = /* @__PURE__ */ N(re, [["__scopeId", "data-v-8eec0226"]]), ue = /* @__PURE__ */ b({
141
- __name: "MessageChangelogNotificationsDetails",
142
- props: {
143
- prefixUrl: {
144
- type: String,
145
- required: !0
146
- },
147
- id: {
148
- type: String,
149
- required: !0
150
- }
151
- },
152
- setup(i) {
153
- const e = d(!1), s = d(null), a = d(""), r = i;
154
- function t() {
155
- e.value = !0, le(r.prefixUrl, {
156
- id: r.id
157
- }).then(({
158
- data: n
159
- }) => {
160
- s.value = n.content, a.value = n.title, e.value = !1;
161
- }).catch((n) => {
162
- console.error("获取变更日志详情失败:", n), e.value = !1;
163
- });
164
- }
165
- return t(), (n, o) => (l(), g(O, {
166
- content: s.value,
167
- title: a.value,
168
- loading: e.value
169
- }, null, 8, ["content", "title", "loading"]));
170
- }
171
- }), ce = {
172
- class: "message-list-container"
173
- }, de = {
174
- key: 0,
175
- class: "empty-wrapper"
176
- }, pe = {
177
- class: "messsageItemBody"
178
- }, fe = {
179
- class: "messageBody"
180
- }, ge = {
181
- class: "messageHeader"
182
- }, me = {
183
- key: 1,
184
- class: "title"
185
- }, ve = {
186
- class: "description"
187
- }, _e = {
188
- class: "createAt"
189
- }, ye = {
190
- class: "messageHandle"
191
- }, he = /* @__PURE__ */ b({
192
- __name: "MessageList",
193
- props: {
194
- messageList: {
195
- type: Array,
196
- required: !0
197
- },
198
- loading: {
199
- type: Boolean,
200
- default: !1
201
- },
202
- finished: {
203
- type: Boolean,
204
- default: !1
205
- },
206
- showButton: {
207
- type: Boolean,
208
- default: !0
209
- }
210
- },
211
- emits: ["openDetails", "infinite"],
212
- setup(i, {
213
- emit: e
214
- }) {
215
- const s = i, a = e;
216
- function r(t, n) {
217
- a("openDetails", t, n);
218
- }
219
- return (t, n) => (l(), v("div", ce, [s.messageList.length === 0 ? (l(), v("div", de, [y(c(G), {
220
- description: "暂无消息"
221
- })])) : (l(), v(D, {
222
- key: 1
223
- }, [(l(!0), v(D, null, z(s.messageList, (o, u) => (l(), v("div", {
224
- key: u,
225
- class: "messageItem"
226
- }, [C("span", pe, [C("span", fe, [C("span", ge, [t.$slots.title ? A(t.$slots, "title", {
227
- key: 0,
228
- item: o,
229
- index: u
230
- }, void 0, !0) : (l(), v("span", me, L(o.title), 1))]), C("span", ve, [t.$slots.description ? A(t.$slots, "description", {
231
- key: 0,
232
- item: o,
233
- index: u
234
- }, void 0, !0) : (l(), v(D, {
235
- key: 1
236
- }, [x(L(o.description), 1)], 64))]), C("span", _e, [t.$slots.createAt ? A(t.$slots, "createAt", {
237
- key: 0,
238
- item: o,
239
- index: u
240
- }, void 0, !0) : (l(), v(D, {
241
- key: 1
242
- }, [x(L(o.createAt), 1)], 64))])]), C("span", ye, [t.$slots.handle ? A(t.$slots, "handle", {
243
- key: 0,
244
- item: o,
245
- index: u
246
- }, void 0, !0) : s.showButton ? (l(), g(c(J), {
247
- key: 1,
248
- type: "text",
249
- onClick: F((m) => r(o, u), ["stop"])
250
- }, {
251
- default: _(() => n[1] || (n[1] = [x("查看")])),
252
- _: 2,
253
- __: [1]
254
- }, 1032, ["onClick"])) : h("", !0)])]), y(c(P), {
255
- style: {
256
- margin: "0px"
257
- }
258
- })]))), 128)), y(X, {
259
- loading: s.loading,
260
- finished: s.finished,
261
- onInfinite: n[0] || (n[0] = (o) => t.$emit("infinite"))
262
- }, null, 8, ["loading", "finished"])], 64))]));
263
- }
264
- }), I = /* @__PURE__ */ N(he, [["__scopeId", "data-v-7b39af6e"]]), be = {
265
- class: "right"
266
- }, ke = /* @__PURE__ */ b({
267
- __name: "MessageChangelogNotifications",
268
- props: {
269
- prefixUrl: {
270
- type: String,
271
- required: !0
272
- }
273
- },
274
- setup(i) {
275
- const e = d(!0), s = i, a = d();
276
- function r() {
277
- e.value = !0;
278
- }
279
- const t = d(!1), n = d(!1), o = d([]), u = d({
280
- total: 0,
281
- current: 1,
282
- pageSize: 10
283
- });
284
- function m() {
285
- t.value = !0, oe(s.prefixUrl, {
286
- current: u.value.current,
287
- pageSize: u.value.pageSize,
288
- where: {}
289
- }).then(({
290
- data: p
291
- }) => {
292
- t.value = !1, o.value = p.items, u.value.total = p.count, n.value = p.items.length < u.value.pageSize;
293
- }).catch(() => {
294
- t.value = !1;
295
- });
296
- }
297
- function k(p) {
298
- console.log(p, "itemitem"), a.value = p.id, e.value = !1;
299
- }
300
- return m(), (p, f) => (l(), v("div", be, [e.value ? h("", !0) : (l(), g(c(T), {
301
- key: 0,
302
- style: {
303
- "margin-bottom": "10px",
304
- cursor: "pointer"
305
- }
306
- }, {
307
- default: _(() => [y(c(M), {
308
- style: {
309
- padding: "0px"
310
- },
311
- onClick: r
312
- }, {
313
- default: _(() => f[0] || (f[0] = [x("功能变更")])),
314
- _: 1,
315
- __: [0]
316
- }), y(c(M), {
317
- style: {
318
- padding: "0px"
319
- }
320
- }, {
321
- default: _(() => f[1] || (f[1] = [x("详情")])),
322
- _: 1,
323
- __: [1]
324
- })]),
325
- _: 1
326
- })), e.value ? (l(), g(I, {
327
- key: 1,
328
- "message-list": o.value,
329
- loading: t.value,
330
- finished: n.value,
331
- onOpenDetails: k,
332
- onInfinite: m
333
- }, null, 8, ["message-list", "loading", "finished"])) : (l(), g(ue, {
334
- key: 2,
335
- id: a.value,
336
- "prefix-url": s.prefixUrl
337
- }, null, 8, ["id", "prefix-url"]))]));
338
- }
339
- }), xe = /* @__PURE__ */ N(ke, [["__scopeId", "data-v-bdfbbd9d"]]), Ne = {
340
- style: {
341
- display: "flex",
342
- gap: "16px"
343
- }
344
- }, Ce = ["onClick"], $e = /* @__PURE__ */ b({
345
- __name: "MessageCustomTabs",
346
- props: {
347
- modelValue: {
348
- type: String,
349
- default: "1"
350
- },
351
- tabs: {
352
- type: Array,
353
- default: () => [{
354
- label: "未读消息",
355
- key: "1"
356
- }, {
357
- label: "已读消息",
358
- key: "2"
359
- }]
360
- }
361
- },
362
- emits: ["update:modelValue", "change"],
363
- setup(i, {
364
- emit: e
365
- }) {
366
- const s = i, a = e;
367
- function r(t) {
368
- t !== s.modelValue && (a("update:modelValue", t), a("change", t));
369
- }
370
- return (t, n) => (l(), v("div", Ne, [(l(!0), v(D, null, z(i.tabs, (o) => (l(), v("span", {
371
- key: o.key,
372
- class: E(["custom-tab", [{
373
- active: i.modelValue === o.key
374
- }]]),
375
- onClick: (u) => r(o.key)
376
- }, L(o.label), 11, Ce))), 128))]));
377
- }
378
- }), Me = /* @__PURE__ */ N($e, [["__scopeId", "data-v-fafcc3ad"]]);
379
- function Se(i, e) {
380
- return U({
381
- url: `${i}/restfulApi/messageCenter/eventNotifications/find`,
382
- method: "post",
383
- data: e
384
- });
385
- }
386
- function Ue(i, e) {
387
- return U({
388
- url: `${i}/restfulApi/messageCenter/eventNotifications/findOne`,
389
- method: "post",
390
- data: e
391
- });
392
- }
393
- const Ae = /* @__PURE__ */ b({
394
- __name: "MessageEventNotificationsDetails",
395
- props: {
396
- prefixUrl: {
397
- type: String,
398
- required: !0
399
- },
400
- id: {
401
- type: String,
402
- required: !0
403
- }
404
- },
405
- setup(i) {
406
- const e = d(!1), s = d(null), a = d(""), r = i;
407
- function t() {
408
- e.value = !0, Ue(r.prefixUrl, {
409
- id: r.id
410
- }).then(({
411
- data: n
412
- }) => {
413
- s.value = n.content, a.value = n.title, e.value = !1;
414
- }).catch((n) => {
415
- console.error("获取事件通知详情失败:", n), e.value = !1;
416
- });
417
- }
418
- return t(), (n, o) => (l(), g(O, {
419
- content: s.value,
420
- title: a.value,
421
- loading: e.value
422
- }, null, 8, ["content", "title", "loading"]));
423
- }
424
- }), De = {
425
- class: "right"
426
- }, Le = /* @__PURE__ */ b({
427
- __name: "MessageEventNotifications",
428
- props: {
429
- prefixUrl: {
430
- type: String,
431
- required: !0
432
- }
433
- },
434
- setup(i) {
435
- const e = i, s = d(!0), a = d();
436
- function r() {
437
- s.value = !0;
438
- }
439
- const t = d(!1), n = d(!1), o = d([]), u = d({
440
- total: 0,
441
- current: 1,
442
- pageSize: 10
443
- });
444
- function m() {
445
- t.value = !0, Se(e.prefixUrl, {
446
- current: u.value.current,
447
- pageSize: u.value.pageSize,
448
- where: {}
449
- }).then(({
450
- data: p
451
- }) => {
452
- t.value = !1, o.value = p.items, u.value.total = p.count, n.value = p.items.length < u.value.pageSize;
453
- }).catch(() => {
454
- t.value = !1;
455
- });
456
- }
457
- function k(p) {
458
- a.value = p.id, s.value = !1;
459
- }
460
- return m(), (p, f) => (l(), v("div", De, [s.value ? h("", !0) : (l(), g(c(T), {
461
- key: 0,
462
- style: {
463
- "margin-bottom": "10px",
464
- cursor: "pointer"
465
- }
466
- }, {
467
- default: _(() => [y(c(M), {
468
- style: {
469
- padding: "0px"
470
- },
471
- onClick: r
472
- }, {
473
- default: _(() => f[0] || (f[0] = [x("活动通知")])),
474
- _: 1,
475
- __: [0]
476
- }), y(c(M), {
477
- style: {
478
- padding: "0px"
479
- }
480
- }, {
481
- default: _(() => f[1] || (f[1] = [x("详情")])),
482
- _: 1,
483
- __: [1]
484
- })]),
485
- _: 1
486
- })), s.value ? (l(), g(I, {
487
- key: 1,
488
- "message-list": o.value,
489
- loading: t.value,
490
- finished: n.value,
491
- onOpenDetails: k,
492
- onInfinite: m
493
- }, null, 8, ["message-list", "loading", "finished"])) : (l(), g(Ae, {
494
- key: 2,
495
- id: a.value,
496
- "prefix-url": e.prefixUrl
497
- }, null, 8, ["id", "prefix-url"]))]));
498
- }
499
- }), Te = /* @__PURE__ */ N(Le, [["__scopeId", "data-v-aac8ca02"]]), Ie = {
500
- class: "tabs"
501
- }, Oe = /* @__PURE__ */ b({
502
- __name: "MessageTabs",
503
- props: {
504
- tabs: {
505
- type: Array,
506
- required: !0
507
- },
508
- messageList: {
509
- type: Array,
510
- required: !0
511
- },
512
- activeTab: {
513
- type: String,
514
- required: !0
515
- }
516
- },
517
- emits: ["update:activeTab", "change", "readAll"],
518
- setup(i, {
519
- emit: e
520
- }) {
521
- const s = i, a = e, r = d(s.activeTab);
522
- K(() => s.activeTab, (o) => {
523
- r.value = o;
524
- });
525
- function t(o) {
526
- r.value = o, a("update:activeTab", o), a("change", o);
527
- }
528
- function n() {
529
- s.messageList.length !== 0 && a("readAll");
530
- }
531
- return (o, u) => (l(), v("div", Ie, [y(Me, {
532
- modelValue: r.value,
533
- "onUpdate:modelValue": u[0] || (u[0] = (m) => r.value = m),
534
- tabs: i.tabs,
535
- onChange: t
536
- }, null, 8, ["modelValue", "tabs"]), r.value === "unread" ? (l(), v("div", {
537
- key: 0,
538
- class: E(["readAll", {
539
- disabled: i.messageList.length === 0
540
- }]),
541
- onClick: n
542
- }, [y(c(te), {
543
- class: "icon",
544
- icon: "icon-park-outline:clear"
545
- }), u[1] || (u[1] = C("span", null, " 全部已读", -1))], 2)) : h("", !0)]));
546
- }
547
- }), qe = /* @__PURE__ */ N(Oe, [["__scopeId", "data-v-91277265"]]), Be = {
548
- class: "right"
549
- }, ze = /* @__PURE__ */ b({
550
- __name: "MessageNotifications",
551
- props: {
552
- prefixUrl: {
553
- type: String,
554
- required: !0
555
- }
556
- },
557
- setup(i) {
558
- const e = i, {
559
- isList: s,
560
- loading: a,
561
- finished: r,
562
- messageList: t,
563
- activeTab: n,
564
- tabs: o,
565
- toList: u,
566
- onTabChange: m,
567
- readAll: k,
568
- getData: p,
569
- openDetails: f
570
- } = ee(e.prefixUrl, "system");
571
- return ($, S) => (l(), v("div", Be, [c(s) ? h("", !0) : (l(), g(c(T), {
572
- key: 0,
573
- style: {
574
- "margin-bottom": "10px",
575
- cursor: "pointer"
576
- }
577
- }, {
578
- default: _(() => [y(c(M), {
579
- style: {
580
- padding: "0px"
581
- },
582
- onClick: c(u)
583
- }, {
584
- default: _(() => S[1] || (S[1] = [x("消息通知")])),
585
- _: 1,
586
- __: [1]
587
- }, 8, ["onClick"]), y(c(M), {
588
- style: {
589
- padding: "0px"
590
- }
591
- }, {
592
- default: _(() => S[2] || (S[2] = [x("详情")])),
593
- _: 1,
594
- __: [2]
595
- })]),
596
- _: 1
597
- })), c(s) ? (l(), g(qe, {
598
- key: 1,
599
- "active-tab": c(n),
600
- "onUpdate:activeTab": S[0] || (S[0] = (w) => B(n) ? n.value = w : null),
601
- tabs: c(o),
602
- "message-list": c(t),
603
- onChange: c(m),
604
- onReadAll: c(k)
605
- }, null, 8, ["active-tab", "tabs", "message-list", "onChange", "onReadAll"])) : h("", !0), c(s) ? (l(), g(I, {
606
- key: 2,
607
- "message-list": c(t),
608
- loading: c(a),
609
- finished: c(r),
610
- "show-button": !1,
611
- onOpenDetails: c(f),
612
- onInfinite: c(p)
613
- }, null, 8, ["message-list", "loading", "finished", "onOpenDetails", "onInfinite"])) : h("", !0)]));
614
- }
615
- }), Ee = /* @__PURE__ */ N(ze, [["__scopeId", "data-v-8c964808"]]);
616
- function we(i, e) {
617
- return U({
618
- url: `${i}/restfulApi/messageCenter/noticeNotifications/find`,
619
- method: "post",
620
- data: e
621
- });
622
- }
623
- function Ve(i, e) {
624
- return U({
625
- url: `${i}/restfulApi/messageCenter/noticeNotifications/findOne`,
626
- method: "post",
627
- data: e
628
- });
629
- }
630
- const Fe = /* @__PURE__ */ b({
631
- __name: "MessageNoticeNotificationsDetails",
632
- props: {
633
- prefixUrl: {
634
- type: String,
635
- required: !0
636
- },
637
- id: {
638
- type: String,
639
- required: !0
640
- }
641
- },
642
- setup(i) {
643
- const e = d(!1), s = d(null), a = d(""), r = i;
644
- function t() {
645
- e.value = !0, Ve(r.prefixUrl, {
646
- id: r.id
647
- }).then(({
648
- data: n
649
- }) => {
650
- s.value = n.content, a.value = n.title, e.value = !1;
651
- }).catch((n) => {
652
- console.error("获取通知详情失败:", n), e.value = !1;
653
- });
654
- }
655
- return t(), (n, o) => (l(), g(O, {
656
- content: s.value,
657
- title: a.value,
658
- loading: e.value
659
- }, null, 8, ["content", "title", "loading"]));
660
- }
661
- }), Ke = {
662
- class: "right"
663
- }, Re = /* @__PURE__ */ b({
664
- __name: "MessageNoticeNotifications",
665
- props: {
666
- prefixUrl: {
667
- type: String,
668
- required: !0
669
- }
670
- },
671
- setup(i) {
672
- const e = i, s = d(), a = d(!0);
673
- function r() {
674
- a.value = !0;
675
- }
676
- const t = d(!1), n = d(!1), o = d([]), u = d({
677
- total: 0,
678
- current: 1,
679
- pageSize: 10
680
- });
681
- function m() {
682
- t.value = !0, we(e.prefixUrl, {
683
- current: u.value.current,
684
- pageSize: u.value.pageSize,
685
- where: {}
686
- }).then(({
687
- data: p
688
- }) => {
689
- t.value = !1, o.value = p.items, u.value.total = p.count, n.value = p.items.length < u.value.pageSize;
690
- }).catch(() => {
691
- t.value = !1;
692
- });
693
- }
694
- function k(p) {
695
- s.value = p.id, a.value = !1;
696
- }
697
- return m(), (p, f) => (l(), v("div", Ke, [a.value ? h("", !0) : (l(), g(c(T), {
698
- key: 0,
699
- style: {
700
- "margin-bottom": "10px",
701
- cursor: "pointer"
702
- }
703
- }, {
704
- default: _(() => [y(c(M), {
705
- style: {
706
- padding: "0px"
707
- },
708
- onClick: r
709
- }, {
710
- default: _(() => f[0] || (f[0] = [x("公告")])),
711
- _: 1,
712
- __: [0]
713
- }), y(c(M), {
714
- style: {
715
- padding: "0px"
716
- }
717
- }, {
718
- default: _(() => f[1] || (f[1] = [x("详情")])),
719
- _: 1,
720
- __: [1]
721
- })]),
722
- _: 1
723
- })), a.value ? (l(), g(I, {
724
- key: 1,
725
- "message-list": o.value,
726
- loading: t.value,
727
- finished: n.value,
728
- onOpenDetails: k,
729
- onInfinite: m
730
- }, null, 8, ["message-list", "loading", "finished"])) : (l(), g(Fe, {
731
- key: 2,
732
- id: s.value,
733
- "prefix-url": e.prefixUrl
734
- }, null, 8, ["id", "prefix-url"]))]));
735
- }
736
- }), He = /* @__PURE__ */ N(Re, [["__scopeId", "data-v-21f62e2c"]]), je = /* @__PURE__ */ b({
737
- __name: "MessageHandle",
738
- props: {
739
- prefixUrl: {
740
- type: String,
741
- required: !0
742
- }
743
- },
744
- setup(i, {
745
- expose: e
746
- }) {
747
- const s = i, a = d(["ChangelogNotifications"]), r = R(() => a.value.length !== 0 ? a.value[0] : ""), t = d(), n = d(Symbol("key"));
748
- function o() {
749
- t.value.setData(!0);
750
- }
751
- function u() {
752
- n.value = Symbol("key");
753
- }
754
- function m() {
755
- n.value = Symbol("key");
756
- }
757
- const k = d([{
758
- name: "功能变更",
759
- path: "ChangelogNotifications",
760
- meta: {
761
- icon: "mingcute:cube-3d-fill"
762
- }
763
- }, {
764
- name: "活动通知",
765
- path: "EventNotifications",
766
- meta: {
767
- icon: "mingcute:receive-money-fill"
768
- }
769
- }, {
770
- name: "消息通知",
771
- path: "MessageNotifications",
772
- meta: {
773
- icon: "mingcute:message-1-fill"
774
- }
775
- }, {
776
- name: "公告",
777
- path: "NoticeNotifications",
778
- meta: {
779
- icon: "mingcute:announcement-fill"
780
- }
781
- }]);
782
- return e({
783
- openNotification: o
784
- }), (p, f) => (l(), g(ae, {
785
- ref_key: "MessageNotificationsRef",
786
- ref: t,
787
- key: n.value,
788
- "selected-keys": a.value,
789
- "onUpdate:selectedKeys": f[0] || (f[0] = ($) => a.value = $),
790
- menus: k.value,
791
- "prefix-url": s.prefixUrl,
792
- title: "消息中心",
793
- onConfirm: m,
794
- onCancel: u
795
- }, {
796
- default: _(() => [r.value === "ChangelogNotifications" ? (l(), g(xe, {
797
- key: 0,
798
- "prefix-url": s.prefixUrl
799
- }, null, 8, ["prefix-url"])) : h("", !0), r.value === "EventNotifications" ? (l(), g(Te, {
800
- key: 1,
801
- "prefix-url": s.prefixUrl
802
- }, null, 8, ["prefix-url"])) : h("", !0), r.value === "MessageNotifications" ? (l(), g(Ee, {
803
- key: 2,
804
- "prefix-url": s.prefixUrl
805
- }, null, 8, ["prefix-url"])) : h("", !0), r.value === "NoticeNotifications" ? (l(), g(He, {
806
- key: 3,
807
- "prefix-url": s.prefixUrl
808
- }, null, 8, ["prefix-url"])) : h("", !0)]),
809
- _: 1
810
- }, 8, ["selected-keys", "menus", "prefix-url"]));
811
- }
812
- }), ot = /* @__PURE__ */ N(je, [["__scopeId", "data-v-791afd23"]]);
813
- export {
814
- ae as A,
815
- xe as C,
816
- O as D,
817
- Te as E,
818
- ot as M,
819
- He as N,
820
- ue as _,
821
- Me as a,
822
- Ae as b,
823
- I as c,
824
- Ee as d,
825
- qe as e,
826
- Fe as f
827
- };