@huyooo/ui 0.7.3 → 0.7.4
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/dist/{MessageHandle-eQlgrUIL.js → MessageHandle-Bn5JXhlv.js} +130 -130
- package/dist/{UserAccountMenu-DEoVmFrH.js → UserAccountMenu-p5U7UNro.js} +1 -1
- package/dist/{WidthContainer-U9QrRW-u.js → WidthContainer-Cg_13I5r.js} +1 -1
- package/dist/common.js +1 -1
- package/dist/index.js +3 -3
- package/dist/message.js +1 -1
- package/dist/style.css +1 -1
- package/dist/user.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as g, defineComponent as M, createBlock as v, openBlock as n, unref as t, withCtx as c, createVNode as N, createCommentVNode as
|
|
1
|
+
import { ref as g, defineComponent as M, createBlock as v, openBlock as n, unref as t, withCtx as c, createVNode as N, createCommentVNode as b, createElementBlock as k, normalizeClass as V, createElementVNode as w, renderSlot as T, toDisplayString as L, createTextVNode as C, Fragment as E, renderList as W, createSlots as ee, mergeProps as U, watch as te, computed as X, mergeModels as J, useModel as se, isRef as ae } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
@@ -31,7 +31,7 @@ function G(e, o = {}) {
|
|
|
31
31
|
const {
|
|
32
32
|
pageSize: s = 10,
|
|
33
33
|
where: u = {}
|
|
34
|
-
} = o,
|
|
34
|
+
} = o, r = g(!0), a = g(""), i = g(!1), l = g(!1), d = g([]), p = g({
|
|
35
35
|
current: 1,
|
|
36
36
|
pageSize: s,
|
|
37
37
|
total: 0
|
|
@@ -47,14 +47,14 @@ function G(e, o = {}) {
|
|
|
47
47
|
pageSize: p.value.pageSize,
|
|
48
48
|
where: u
|
|
49
49
|
});
|
|
50
|
-
d.value = A.items, p.value.total = A.count,
|
|
50
|
+
d.value = A.items, p.value.total = A.count, l.value = A.items.length < p.value.pageSize;
|
|
51
51
|
} finally {
|
|
52
52
|
i.value = !1;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
async function _() {
|
|
57
|
-
if (!(i.value ||
|
|
57
|
+
if (!(i.value || l.value)) {
|
|
58
58
|
p.value.current += 1, i.value = !0;
|
|
59
59
|
try {
|
|
60
60
|
const {
|
|
@@ -64,35 +64,35 @@ function G(e, o = {}) {
|
|
|
64
64
|
pageSize: p.value.pageSize,
|
|
65
65
|
where: u
|
|
66
66
|
});
|
|
67
|
-
d.value = [...d.value, ...A.items], p.value.total = A.count,
|
|
67
|
+
d.value = [...d.value, ...A.items], p.value.total = A.count, l.value = A.items.length < p.value.pageSize;
|
|
68
68
|
} finally {
|
|
69
69
|
i.value = !1;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
async function f() {
|
|
74
|
-
p.value.current = 1,
|
|
74
|
+
p.value.current = 1, l.value = !1, await $();
|
|
75
75
|
}
|
|
76
76
|
function m() {
|
|
77
|
-
|
|
77
|
+
r.value = !0, a.value = "";
|
|
78
78
|
}
|
|
79
79
|
function z(A) {
|
|
80
|
-
a.value = A.id,
|
|
80
|
+
a.value = A.id, r.value = !1, R(A.id);
|
|
81
81
|
}
|
|
82
82
|
function R(A) {
|
|
83
|
-
const
|
|
84
|
-
|
|
83
|
+
const h = d.value.find((y) => y.id === A);
|
|
84
|
+
h && h.read !== void 0 && (h.read = !0);
|
|
85
85
|
}
|
|
86
86
|
function H(A) {
|
|
87
|
-
const
|
|
88
|
-
|
|
87
|
+
const h = d.value.find((y) => y.id === A);
|
|
88
|
+
h && h.read !== void 0 && (h.read = !1);
|
|
89
89
|
}
|
|
90
90
|
return $(), {
|
|
91
91
|
// 状态
|
|
92
|
-
isList:
|
|
92
|
+
isList: r,
|
|
93
93
|
detailId: a,
|
|
94
94
|
loading: i,
|
|
95
|
-
finished:
|
|
95
|
+
finished: l,
|
|
96
96
|
messageList: d,
|
|
97
97
|
pagination: p,
|
|
98
98
|
// 方法
|
|
@@ -125,8 +125,8 @@ const ye = /* @__PURE__ */ M({
|
|
|
125
125
|
setup(e, {
|
|
126
126
|
emit: o
|
|
127
127
|
}) {
|
|
128
|
-
const s = g([]), u = e,
|
|
129
|
-
function
|
|
128
|
+
const s = g([]), u = e, r = g(!1), a = o, i = g();
|
|
129
|
+
function l(d) {
|
|
130
130
|
s.value = d, a("tableOfContentsUpdate", d);
|
|
131
131
|
}
|
|
132
132
|
return (d, p) => (n(), v(t(Y), {
|
|
@@ -139,16 +139,16 @@ const ye = /* @__PURE__ */ M({
|
|
|
139
139
|
ref_key: "TiptapEditorRef",
|
|
140
140
|
ref: i,
|
|
141
141
|
"model-value": u.content,
|
|
142
|
-
editable:
|
|
142
|
+
editable: r.value,
|
|
143
143
|
"tiptap-editor-content-class": "tiptapEditorContentClass",
|
|
144
|
-
onTableOfContentsUpdate:
|
|
144
|
+
onTableOfContentsUpdate: l
|
|
145
145
|
}, {
|
|
146
146
|
title: c(() => [N(t(le), {
|
|
147
147
|
"model-value": u.title,
|
|
148
|
-
editable:
|
|
148
|
+
editable: r.value
|
|
149
149
|
}, null, 8, ["model-value", "editable"])]),
|
|
150
150
|
_: 1
|
|
151
|
-
}, 8, ["model-value", "editable"]),
|
|
151
|
+
}, 8, ["model-value", "editable"]), b("", !0)]),
|
|
152
152
|
_: 1
|
|
153
153
|
}, 8, ["loading"]));
|
|
154
154
|
}
|
|
@@ -161,10 +161,10 @@ const ye = /* @__PURE__ */ M({
|
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
163
|
setup(e) {
|
|
164
|
-
const o = g(!1), s = g(null), u = g(""),
|
|
164
|
+
const o = g(!1), s = g(null), u = g(""), r = e;
|
|
165
165
|
function a() {
|
|
166
166
|
o.value = !0, ve({
|
|
167
|
-
id:
|
|
167
|
+
id: r.id
|
|
168
168
|
}).then(({
|
|
169
169
|
data: i
|
|
170
170
|
}) => {
|
|
@@ -173,7 +173,7 @@ const ye = /* @__PURE__ */ M({
|
|
|
173
173
|
console.error("获取变更日志详情失败:", i), o.value = !1;
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
return a(), (i,
|
|
176
|
+
return a(), (i, l) => (n(), v(K, {
|
|
177
177
|
content: s.value,
|
|
178
178
|
title: u.value,
|
|
179
179
|
loading: o.value
|
|
@@ -182,10 +182,10 @@ const ye = /* @__PURE__ */ M({
|
|
|
182
182
|
}), he = {
|
|
183
183
|
key: 0,
|
|
184
184
|
class: "loading"
|
|
185
|
-
},
|
|
185
|
+
}, be = {
|
|
186
186
|
key: 1,
|
|
187
187
|
class: "none"
|
|
188
|
-
},
|
|
188
|
+
}, ke = /* @__PURE__ */ M({
|
|
189
189
|
__name: "InfiniteLoading",
|
|
190
190
|
props: {
|
|
191
191
|
loading: {
|
|
@@ -217,25 +217,25 @@ const ye = /* @__PURE__ */ M({
|
|
|
217
217
|
setup(e, {
|
|
218
218
|
emit: o
|
|
219
219
|
}) {
|
|
220
|
-
const s = e, u = o,
|
|
221
|
-
return re(
|
|
220
|
+
const s = e, u = o, r = g(null);
|
|
221
|
+
return re(r, ([{
|
|
222
222
|
isIntersecting: a
|
|
223
223
|
}]) => {
|
|
224
224
|
a && // 当loading和finished的值都为false时,就通知父组件调用方法继续向后台请求数据
|
|
225
225
|
!s.loading && !s.finished && u("infinite");
|
|
226
226
|
}, {
|
|
227
227
|
threshold: s.threshold
|
|
228
|
-
}), (a, i) => (n(),
|
|
228
|
+
}), (a, i) => (n(), k("div", {
|
|
229
229
|
ref_key: "container",
|
|
230
|
-
ref:
|
|
230
|
+
ref: r,
|
|
231
231
|
class: "infinite-loading"
|
|
232
|
-
}, [e.loading ? (n(),
|
|
232
|
+
}, [e.loading ? (n(), k("div", he, [N(t(Y), {
|
|
233
233
|
tip: e.loadingText
|
|
234
|
-
}, null, 8, ["tip"])])) :
|
|
234
|
+
}, null, 8, ["tip"])])) : b("", !0), e.finished && e.showFinishedText ? (n(), k("div", be, [N(t(Z), {
|
|
235
235
|
description: e.finishedText
|
|
236
|
-
}, null, 8, ["description"])])) :
|
|
236
|
+
}, null, 8, ["description"])])) : b("", !0)], 512));
|
|
237
237
|
}
|
|
238
|
-
}), Ce = /* @__PURE__ */ I(
|
|
238
|
+
}), Ce = /* @__PURE__ */ I(ke, [["__scopeId", "data-v-b513f798"]]), $e = {
|
|
239
239
|
class: "message-item__content"
|
|
240
240
|
}, Ne = {
|
|
241
241
|
class: "message-item__header"
|
|
@@ -264,17 +264,17 @@ const ye = /* @__PURE__ */ M({
|
|
|
264
264
|
},
|
|
265
265
|
emits: ["click"],
|
|
266
266
|
setup(e) {
|
|
267
|
-
return (o, s) => (n(),
|
|
267
|
+
return (o, s) => (n(), k("div", {
|
|
268
268
|
class: V(["message-item", {
|
|
269
269
|
"message-item--unread": e.showReadStatus && !e.item.read
|
|
270
270
|
}]),
|
|
271
271
|
onClick: s[0] || (s[0] = (u) => o.$emit("click", e.item))
|
|
272
|
-
}, [w("div", $e, [w("div", Ne, [e.showReadStatus ? (n(),
|
|
272
|
+
}, [w("div", $e, [w("div", Ne, [e.showReadStatus ? (n(), k("span", {
|
|
273
273
|
key: 0,
|
|
274
274
|
class: V(["message-item__dot", {
|
|
275
275
|
"message-item__dot--unread": !e.item.read
|
|
276
276
|
}])
|
|
277
|
-
}, null, 2)) :
|
|
277
|
+
}, null, 2)) : b("", !0), T(o.$slots, "prefix", {
|
|
278
278
|
item: e.item
|
|
279
279
|
}, void 0, !0), w("span", Ae, L(e.item.title), 1), w("div", Me, [e.item.pinned ? (n(), v(t(x), {
|
|
280
280
|
key: 0,
|
|
@@ -283,7 +283,7 @@ const ye = /* @__PURE__ */ M({
|
|
|
283
283
|
}, {
|
|
284
284
|
default: c(() => [...s[1] || (s[1] = [C("置顶", -1)])]),
|
|
285
285
|
_: 1
|
|
286
|
-
})) :
|
|
286
|
+
})) : b("", !0), T(o.$slots, "tags", {
|
|
287
287
|
item: e.item
|
|
288
288
|
}, () => [e.item.priority === "urgent" ? (n(), v(t(x), {
|
|
289
289
|
key: 0,
|
|
@@ -306,7 +306,7 @@ const ye = /* @__PURE__ */ M({
|
|
|
306
306
|
}, {
|
|
307
307
|
default: c(() => [...s[4] || (s[4] = [C("高", -1)])]),
|
|
308
308
|
_: 1
|
|
309
|
-
})) :
|
|
309
|
+
})) : b("", !0)], !0)])]), w("div", Se, [T(o.$slots, "description", {
|
|
310
310
|
item: e.item
|
|
311
311
|
}, () => [C(L(e.item.description), 1)], !0)]), w("div", we, [w("span", Le, L(e.item.createAt), 1), T(o.$slots, "footer", {
|
|
312
312
|
item: e.item
|
|
@@ -319,7 +319,7 @@ const ye = /* @__PURE__ */ M({
|
|
|
319
319
|
}, {
|
|
320
320
|
default: c(() => [...s[5] || (s[5] = [C("查看", -1)])]),
|
|
321
321
|
_: 1
|
|
322
|
-
})) :
|
|
322
|
+
})) : b("", !0)], !0)])], 2));
|
|
323
323
|
}
|
|
324
324
|
}), Te = /* @__PURE__ */ I(xe, [["__scopeId", "data-v-1cf5087b"]]), ze = {
|
|
325
325
|
class: "message-list"
|
|
@@ -348,19 +348,19 @@ const ye = /* @__PURE__ */ M({
|
|
|
348
348
|
emit: o
|
|
349
349
|
}) {
|
|
350
350
|
const s = e, u = o;
|
|
351
|
-
function
|
|
351
|
+
function r(a) {
|
|
352
352
|
u("itemClick", a);
|
|
353
353
|
}
|
|
354
|
-
return (a, i) => (n(),
|
|
354
|
+
return (a, i) => (n(), k("div", ze, [s.messageList.length === 0 && !s.loading ? (n(), k("div", Be, [N(t(Z), {
|
|
355
355
|
description: "暂无消息"
|
|
356
|
-
})])) : (n(),
|
|
356
|
+
})])) : (n(), k(E, {
|
|
357
357
|
key: 1
|
|
358
|
-
}, [(n(!0),
|
|
359
|
-
key:
|
|
360
|
-
item:
|
|
358
|
+
}, [(n(!0), k(E, null, W(s.messageList, (l) => (n(), v(Te, {
|
|
359
|
+
key: l.id,
|
|
360
|
+
item: l,
|
|
361
361
|
"show-read-status": s.showReadStatus,
|
|
362
362
|
"show-view-button": s.showViewButton,
|
|
363
|
-
onClick: (d) => l
|
|
363
|
+
onClick: (d) => r(l)
|
|
364
364
|
}, ee({
|
|
365
365
|
_: 2
|
|
366
366
|
}, [a.$slots.prefix ? {
|
|
@@ -396,7 +396,7 @@ const ye = /* @__PURE__ */ M({
|
|
|
396
396
|
} : void 0]), 1032, ["item", "show-read-status", "show-view-button", "onClick"]))), 128)), N(Ce, {
|
|
397
397
|
loading: s.loading,
|
|
398
398
|
finished: s.finished,
|
|
399
|
-
onInfinite: i[0] || (i[0] = (
|
|
399
|
+
onInfinite: i[0] || (i[0] = (l) => a.$emit("loadMore"))
|
|
400
400
|
}, null, 8, ["loading", "finished"])], 64))]));
|
|
401
401
|
}
|
|
402
402
|
}), q = /* @__PURE__ */ I(De, [["__scopeId", "data-v-991c4730"]]), Oe = {
|
|
@@ -413,10 +413,10 @@ const ye = /* @__PURE__ */ M({
|
|
|
413
413
|
isList: o,
|
|
414
414
|
detailId: s,
|
|
415
415
|
loading: u,
|
|
416
|
-
finished:
|
|
416
|
+
finished: r,
|
|
417
417
|
messageList: a,
|
|
418
418
|
loadMore: i,
|
|
419
|
-
toList:
|
|
419
|
+
toList: l,
|
|
420
420
|
openDetail: d
|
|
421
421
|
} = G(ge);
|
|
422
422
|
function p(_) {
|
|
@@ -437,12 +437,12 @@ const ye = /* @__PURE__ */ M({
|
|
|
437
437
|
breaking: "重大变更"
|
|
438
438
|
}[_] || "更新";
|
|
439
439
|
}
|
|
440
|
-
return (_, f) => (n(),
|
|
440
|
+
return (_, f) => (n(), k("div", Oe, [t(o) ? b("", !0) : (n(), v(t(F), {
|
|
441
441
|
key: 0,
|
|
442
442
|
class: "message-panel__breadcrumb"
|
|
443
443
|
}, {
|
|
444
444
|
default: c(() => [N(t(B), {
|
|
445
|
-
onClick: t(
|
|
445
|
+
onClick: t(l)
|
|
446
446
|
}, {
|
|
447
447
|
default: c(() => [...f[0] || (f[0] = [C("更新日志", -1)])]),
|
|
448
448
|
_: 1
|
|
@@ -455,7 +455,7 @@ const ye = /* @__PURE__ */ M({
|
|
|
455
455
|
key: 1,
|
|
456
456
|
"message-list": t(a),
|
|
457
457
|
loading: t(u),
|
|
458
|
-
finished: t(
|
|
458
|
+
finished: t(r),
|
|
459
459
|
onItemClick: t(d),
|
|
460
460
|
onLoadMore: t(i)
|
|
461
461
|
}, {
|
|
@@ -473,7 +473,7 @@ const ye = /* @__PURE__ */ M({
|
|
|
473
473
|
}, 1032, ["color"])]),
|
|
474
474
|
footer: c(({
|
|
475
475
|
item: m
|
|
476
|
-
}) => [m.publishedAt ? (n(),
|
|
476
|
+
}) => [m.publishedAt ? (n(), k("span", Re, " 发布于 " + L(m.publishedAt), 1)) : b("", !0)]),
|
|
477
477
|
_: 1
|
|
478
478
|
}, 8, ["message-list", "loading", "finished", "onItemClick", "onLoadMore"])) : (n(), v(_e, {
|
|
479
479
|
key: 2,
|
|
@@ -504,10 +504,10 @@ const qe = /* @__PURE__ */ M({
|
|
|
504
504
|
}
|
|
505
505
|
},
|
|
506
506
|
setup(e) {
|
|
507
|
-
const o = g(!1), s = g(null), u = g(""),
|
|
507
|
+
const o = g(!1), s = g(null), u = g(""), r = e;
|
|
508
508
|
function a() {
|
|
509
509
|
o.value = !0, Ke({
|
|
510
|
-
id:
|
|
510
|
+
id: r.id
|
|
511
511
|
}).then(({
|
|
512
512
|
data: i
|
|
513
513
|
}) => {
|
|
@@ -516,7 +516,7 @@ const qe = /* @__PURE__ */ M({
|
|
|
516
516
|
console.error("获取事件通知详情失败:", i), o.value = !1;
|
|
517
517
|
});
|
|
518
518
|
}
|
|
519
|
-
return a(), (i,
|
|
519
|
+
return a(), (i, l) => (n(), v(K, {
|
|
520
520
|
content: s.value,
|
|
521
521
|
title: u.value,
|
|
522
522
|
loading: o.value
|
|
@@ -534,10 +534,10 @@ const qe = /* @__PURE__ */ M({
|
|
|
534
534
|
isList: o,
|
|
535
535
|
detailId: s,
|
|
536
536
|
loading: u,
|
|
537
|
-
finished:
|
|
537
|
+
finished: r,
|
|
538
538
|
messageList: a,
|
|
539
539
|
loadMore: i,
|
|
540
|
-
toList:
|
|
540
|
+
toList: l,
|
|
541
541
|
openDetail: d
|
|
542
542
|
} = G((_) => Fe({
|
|
543
543
|
..._,
|
|
@@ -561,12 +561,12 @@ const qe = /* @__PURE__ */ M({
|
|
|
561
561
|
published: "已发布"
|
|
562
562
|
}[_] || "未知";
|
|
563
563
|
}
|
|
564
|
-
return (_, f) => (n(),
|
|
564
|
+
return (_, f) => (n(), k("div", He, [t(o) ? b("", !0) : (n(), v(t(F), {
|
|
565
565
|
key: 0,
|
|
566
566
|
class: "message-panel__breadcrumb"
|
|
567
567
|
}, {
|
|
568
568
|
default: c(() => [N(t(B), {
|
|
569
|
-
onClick: t(
|
|
569
|
+
onClick: t(l)
|
|
570
570
|
}, {
|
|
571
571
|
default: c(() => [...f[0] || (f[0] = [C("活动通知", -1)])]),
|
|
572
572
|
_: 1
|
|
@@ -579,7 +579,7 @@ const qe = /* @__PURE__ */ M({
|
|
|
579
579
|
key: 1,
|
|
580
580
|
"message-list": t(a),
|
|
581
581
|
loading: t(u),
|
|
582
|
-
finished: t(
|
|
582
|
+
finished: t(r),
|
|
583
583
|
onItemClick: t(d),
|
|
584
584
|
onLoadMore: t(i)
|
|
585
585
|
}, {
|
|
@@ -594,7 +594,7 @@ const qe = /* @__PURE__ */ M({
|
|
|
594
594
|
}, 1032, ["color"])]),
|
|
595
595
|
footer: c(({
|
|
596
596
|
item: m
|
|
597
|
-
}) => [m.startAt || m.endAt ? (n(),
|
|
597
|
+
}) => [m.startAt || m.endAt ? (n(), k("span", je, L(m.startAt || "无") + " ~ " + L(m.endAt || "无"), 1)) : b("", !0)]),
|
|
598
598
|
_: 1
|
|
599
599
|
}, 8, ["message-list", "loading", "finished", "onItemClick", "onLoadMore"])) : (n(), v(qe, {
|
|
600
600
|
key: 2,
|
|
@@ -629,16 +629,16 @@ const qe = /* @__PURE__ */ M({
|
|
|
629
629
|
emit: o
|
|
630
630
|
}) {
|
|
631
631
|
const s = e, u = o;
|
|
632
|
-
function
|
|
632
|
+
function r(a) {
|
|
633
633
|
a !== s.modelValue && (u("update:modelValue", a), u("change", a));
|
|
634
634
|
}
|
|
635
|
-
return (a, i) => (n(),
|
|
636
|
-
key:
|
|
635
|
+
return (a, i) => (n(), k("div", Je, [(n(!0), k(E, null, W(e.tabs, (l) => (n(), k("span", {
|
|
636
|
+
key: l.key,
|
|
637
637
|
class: V(["custom-tab", [{
|
|
638
|
-
active: e.modelValue ===
|
|
638
|
+
active: e.modelValue === l.key
|
|
639
639
|
}]]),
|
|
640
|
-
onClick: (d) => l
|
|
641
|
-
}, L(
|
|
640
|
+
onClick: (d) => r(l.key)
|
|
641
|
+
}, L(l.label), 11, Qe))), 128))]));
|
|
642
642
|
}
|
|
643
643
|
}), Xe = /* @__PURE__ */ I(We, [["__scopeId", "data-v-fafcc3ad"]]), Ye = {
|
|
644
644
|
class: "tabs"
|
|
@@ -662,22 +662,22 @@ const qe = /* @__PURE__ */ M({
|
|
|
662
662
|
setup(e, {
|
|
663
663
|
emit: o
|
|
664
664
|
}) {
|
|
665
|
-
const s = e, u = o,
|
|
666
|
-
te(() => s.activeTab, (
|
|
667
|
-
|
|
665
|
+
const s = e, u = o, r = g(s.activeTab);
|
|
666
|
+
te(() => s.activeTab, (l) => {
|
|
667
|
+
r.value = l;
|
|
668
668
|
});
|
|
669
|
-
function a(
|
|
670
|
-
|
|
669
|
+
function a(l) {
|
|
670
|
+
r.value = l, u("update:activeTab", l), u("change", l);
|
|
671
671
|
}
|
|
672
672
|
function i() {
|
|
673
673
|
s.messageList.length !== 0 && u("readAll");
|
|
674
674
|
}
|
|
675
|
-
return (
|
|
676
|
-
modelValue:
|
|
677
|
-
"onUpdate:modelValue": d[0] || (d[0] = (p) =>
|
|
675
|
+
return (l, d) => (n(), k("div", Ye, [N(Xe, {
|
|
676
|
+
modelValue: r.value,
|
|
677
|
+
"onUpdate:modelValue": d[0] || (d[0] = (p) => r.value = p),
|
|
678
678
|
tabs: e.tabs,
|
|
679
679
|
onChange: a
|
|
680
|
-
}, null, 8, ["modelValue", "tabs"]),
|
|
680
|
+
}, null, 8, ["modelValue", "tabs"]), r.value === "unread" ? (n(), k("div", {
|
|
681
681
|
key: 0,
|
|
682
682
|
class: V(["readAll", {
|
|
683
683
|
disabled: e.messageList.length === 0
|
|
@@ -686,17 +686,17 @@ const qe = /* @__PURE__ */ M({
|
|
|
686
686
|
}, [N(t(fe), {
|
|
687
687
|
class: "icon",
|
|
688
688
|
icon: "icon-park-outline:clear"
|
|
689
|
-
}), d[1] || (d[1] = w("span", null, " 全部已读", -1))], 2)) :
|
|
689
|
+
}), d[1] || (d[1] = w("span", null, " 全部已读", -1))], 2)) : b("", !0)]));
|
|
690
690
|
}
|
|
691
691
|
}), et = /* @__PURE__ */ I(Ze, [["__scopeId", "data-v-91277265"]]), tt = {
|
|
692
692
|
class: "message-panel"
|
|
693
693
|
}, P = "system", st = /* @__PURE__ */ M({
|
|
694
694
|
__name: "MessageNotifications",
|
|
695
695
|
setup(e) {
|
|
696
|
-
const o = g(!0), s = g(""), u = g(!1),
|
|
696
|
+
const o = g(!0), s = g(""), u = g(!1), r = g({
|
|
697
697
|
title: "",
|
|
698
698
|
content: null
|
|
699
|
-
}), a = g(!1), i = g(!1),
|
|
699
|
+
}), a = g(!1), i = g(!1), l = g([]), d = g("unread"), p = g({
|
|
700
700
|
current: 1,
|
|
701
701
|
pageSize: 10,
|
|
702
702
|
total: 0
|
|
@@ -711,7 +711,7 @@ const qe = /* @__PURE__ */ M({
|
|
|
711
711
|
a.value = !0;
|
|
712
712
|
try {
|
|
713
713
|
const {
|
|
714
|
-
data:
|
|
714
|
+
data: h
|
|
715
715
|
} = await Q({
|
|
716
716
|
current: p.value.current,
|
|
717
717
|
pageSize: p.value.pageSize,
|
|
@@ -720,7 +720,7 @@ const qe = /* @__PURE__ */ M({
|
|
|
720
720
|
read: _.value
|
|
721
721
|
}
|
|
722
722
|
});
|
|
723
|
-
|
|
723
|
+
l.value = h.items.map((y) => ({
|
|
724
724
|
id: y.id,
|
|
725
725
|
title: y.title,
|
|
726
726
|
description: y.description,
|
|
@@ -730,7 +730,7 @@ const qe = /* @__PURE__ */ M({
|
|
|
730
730
|
priority: y.priority,
|
|
731
731
|
read: y.read ?? !1,
|
|
732
732
|
readAt: y.readAt ?? null
|
|
733
|
-
})), p.value.total =
|
|
733
|
+
})), p.value.total = h.count, i.value = h.items.length < p.value.pageSize;
|
|
734
734
|
} finally {
|
|
735
735
|
a.value = !1;
|
|
736
736
|
}
|
|
@@ -740,7 +740,7 @@ const qe = /* @__PURE__ */ M({
|
|
|
740
740
|
p.value.current += 1, a.value = !0;
|
|
741
741
|
try {
|
|
742
742
|
const {
|
|
743
|
-
data:
|
|
743
|
+
data: h
|
|
744
744
|
} = await Q({
|
|
745
745
|
current: p.value.current,
|
|
746
746
|
pageSize: p.value.pageSize,
|
|
@@ -748,7 +748,7 @@ const qe = /* @__PURE__ */ M({
|
|
|
748
748
|
type: P,
|
|
749
749
|
read: _.value
|
|
750
750
|
}
|
|
751
|
-
}), y =
|
|
751
|
+
}), y = h.items.map((S) => ({
|
|
752
752
|
id: S.id,
|
|
753
753
|
title: S.title,
|
|
754
754
|
description: S.description,
|
|
@@ -759,7 +759,7 @@ const qe = /* @__PURE__ */ M({
|
|
|
759
759
|
read: S.read ?? !1,
|
|
760
760
|
readAt: S.readAt ?? null
|
|
761
761
|
}));
|
|
762
|
-
|
|
762
|
+
l.value = [...l.value, ...y], i.value = h.items.length < p.value.pageSize;
|
|
763
763
|
} finally {
|
|
764
764
|
a.value = !1;
|
|
765
765
|
}
|
|
@@ -769,25 +769,25 @@ const qe = /* @__PURE__ */ M({
|
|
|
769
769
|
p.value.current = 1, i.value = !1, f();
|
|
770
770
|
}
|
|
771
771
|
async function R() {
|
|
772
|
-
|
|
772
|
+
l.value.length !== 0 && (await ue({
|
|
773
773
|
type: P
|
|
774
774
|
}), f());
|
|
775
775
|
}
|
|
776
776
|
function H() {
|
|
777
|
-
o.value = !0, s.value = "",
|
|
777
|
+
o.value = !0, s.value = "", r.value = {
|
|
778
778
|
title: "",
|
|
779
779
|
content: null
|
|
780
780
|
};
|
|
781
781
|
}
|
|
782
|
-
async function A(
|
|
782
|
+
async function A(h) {
|
|
783
783
|
u.value = !0;
|
|
784
784
|
try {
|
|
785
785
|
const {
|
|
786
786
|
data: y
|
|
787
787
|
} = await ce({
|
|
788
|
-
id:
|
|
788
|
+
id: h
|
|
789
789
|
});
|
|
790
|
-
|
|
790
|
+
r.value = {
|
|
791
791
|
title: y.title,
|
|
792
792
|
content: y.content
|
|
793
793
|
};
|
|
@@ -795,12 +795,12 @@ const qe = /* @__PURE__ */ M({
|
|
|
795
795
|
u.value = !1;
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
|
-
async function j(
|
|
799
|
-
s.value =
|
|
800
|
-
messageId:
|
|
801
|
-
}), A(
|
|
798
|
+
async function j(h) {
|
|
799
|
+
s.value = h.id, o.value = !1, h.read || (await de({
|
|
800
|
+
messageId: h.id
|
|
801
|
+
}), _.value || (l.value = l.value.filter((y) => y.id !== h.id))), A(h.id);
|
|
802
802
|
}
|
|
803
|
-
return f(), (
|
|
803
|
+
return f(), (h, y) => (n(), k("div", tt, [o.value ? b("", !0) : (n(), v(t(F), {
|
|
804
804
|
key: 0,
|
|
805
805
|
class: "message-panel__breadcrumb"
|
|
806
806
|
}, {
|
|
@@ -819,12 +819,12 @@ const qe = /* @__PURE__ */ M({
|
|
|
819
819
|
"active-tab": d.value,
|
|
820
820
|
"onUpdate:activeTab": y[0] || (y[0] = (S) => d.value = S),
|
|
821
821
|
tabs: $,
|
|
822
|
-
"message-list":
|
|
822
|
+
"message-list": l.value,
|
|
823
823
|
onChange: z,
|
|
824
824
|
onReadAll: R
|
|
825
|
-
}, null, 8, ["active-tab", "message-list"])) :
|
|
825
|
+
}, null, 8, ["active-tab", "message-list"])) : b("", !0), o.value ? (n(), v(q, {
|
|
826
826
|
key: 2,
|
|
827
|
-
"message-list":
|
|
827
|
+
"message-list": l.value,
|
|
828
828
|
loading: a.value,
|
|
829
829
|
finished: i.value,
|
|
830
830
|
"show-read-status": !0,
|
|
@@ -848,16 +848,16 @@ const qe = /* @__PURE__ */ M({
|
|
|
848
848
|
}, {
|
|
849
849
|
default: c(() => [...y[4] || (y[4] = [C("高", -1)])]),
|
|
850
850
|
_: 1
|
|
851
|
-
})) :
|
|
851
|
+
})) : b("", !0)]),
|
|
852
852
|
_: 1
|
|
853
853
|
}, 8, ["message-list", "loading", "finished"])) : (n(), v(K, {
|
|
854
854
|
key: 3,
|
|
855
|
-
title:
|
|
856
|
-
content:
|
|
855
|
+
title: r.value.title,
|
|
856
|
+
content: r.value.content,
|
|
857
857
|
loading: u.value
|
|
858
858
|
}, null, 8, ["title", "content", "loading"]))]));
|
|
859
859
|
}
|
|
860
|
-
}), at = /* @__PURE__ */ I(st, [["__scopeId", "data-v-
|
|
860
|
+
}), at = /* @__PURE__ */ I(st, [["__scopeId", "data-v-ef92cb29"]]);
|
|
861
861
|
function nt(e) {
|
|
862
862
|
return D({
|
|
863
863
|
url: `${O.prefixUrl}/restfulApi/messageCenter/noticeNotifications/find`,
|
|
@@ -881,10 +881,10 @@ const ot = /* @__PURE__ */ M({
|
|
|
881
881
|
}
|
|
882
882
|
},
|
|
883
883
|
setup(e) {
|
|
884
|
-
const o = g(!1), s = g(null), u = g(""),
|
|
884
|
+
const o = g(!1), s = g(null), u = g(""), r = e;
|
|
885
885
|
function a() {
|
|
886
886
|
o.value = !0, it({
|
|
887
|
-
id:
|
|
887
|
+
id: r.id
|
|
888
888
|
}).then(({
|
|
889
889
|
data: i
|
|
890
890
|
}) => {
|
|
@@ -893,7 +893,7 @@ const ot = /* @__PURE__ */ M({
|
|
|
893
893
|
console.error("获取通知详情失败:", i), o.value = !1;
|
|
894
894
|
});
|
|
895
895
|
}
|
|
896
|
-
return a(), (i,
|
|
896
|
+
return a(), (i, l) => (n(), v(K, {
|
|
897
897
|
content: s.value,
|
|
898
898
|
title: u.value,
|
|
899
899
|
loading: o.value
|
|
@@ -911,10 +911,10 @@ const ot = /* @__PURE__ */ M({
|
|
|
911
911
|
isList: o,
|
|
912
912
|
detailId: s,
|
|
913
913
|
loading: u,
|
|
914
|
-
finished:
|
|
914
|
+
finished: r,
|
|
915
915
|
messageList: a,
|
|
916
916
|
loadMore: i,
|
|
917
|
-
toList:
|
|
917
|
+
toList: l,
|
|
918
918
|
openDetail: d
|
|
919
919
|
} = G((_) => nt({
|
|
920
920
|
..._,
|
|
@@ -934,12 +934,12 @@ const ot = /* @__PURE__ */ M({
|
|
|
934
934
|
expired: "已过期"
|
|
935
935
|
}[_] || "未知";
|
|
936
936
|
}
|
|
937
|
-
return (_, f) => (n(),
|
|
937
|
+
return (_, f) => (n(), k("div", lt, [t(o) ? b("", !0) : (n(), v(t(F), {
|
|
938
938
|
key: 0,
|
|
939
939
|
class: "message-panel__breadcrumb"
|
|
940
940
|
}, {
|
|
941
941
|
default: c(() => [N(t(B), {
|
|
942
|
-
onClick: t(
|
|
942
|
+
onClick: t(l)
|
|
943
943
|
}, {
|
|
944
944
|
default: c(() => [...f[0] || (f[0] = [C("公告通知", -1)])]),
|
|
945
945
|
_: 1
|
|
@@ -952,7 +952,7 @@ const ot = /* @__PURE__ */ M({
|
|
|
952
952
|
key: 1,
|
|
953
953
|
"message-list": t(a),
|
|
954
954
|
loading: t(u),
|
|
955
|
-
finished: t(
|
|
955
|
+
finished: t(r),
|
|
956
956
|
onItemClick: t(d),
|
|
957
957
|
onLoadMore: t(i)
|
|
958
958
|
}, {
|
|
@@ -972,7 +972,7 @@ const ot = /* @__PURE__ */ M({
|
|
|
972
972
|
}, {
|
|
973
973
|
default: c(() => [...f[3] || (f[3] = [C("重要", -1)])]),
|
|
974
974
|
_: 1
|
|
975
|
-
})) :
|
|
975
|
+
})) : b("", !0), N(t(x), {
|
|
976
976
|
color: p(m.displayStatus),
|
|
977
977
|
size: "small"
|
|
978
978
|
}, {
|
|
@@ -981,7 +981,7 @@ const ot = /* @__PURE__ */ M({
|
|
|
981
981
|
}, 1032, ["color"])]),
|
|
982
982
|
footer: c(({
|
|
983
983
|
item: m
|
|
984
|
-
}) => [m.expireAt ? (n(),
|
|
984
|
+
}) => [m.expireAt ? (n(), k("span", rt, L(m.displayStatus === "expired" ? "已过期" : `过期时间: ${m.expireAt}`), 1)) : b("", !0)]),
|
|
985
985
|
_: 1
|
|
986
986
|
}, 8, ["message-list", "loading", "finished", "onItemClick", "onLoadMore"])) : (n(), v(ot, {
|
|
987
987
|
key: 2,
|
|
@@ -1010,18 +1010,18 @@ const ot = /* @__PURE__ */ M({
|
|
|
1010
1010
|
expose: o,
|
|
1011
1011
|
emit: s
|
|
1012
1012
|
}) {
|
|
1013
|
-
const u = e,
|
|
1014
|
-
function
|
|
1015
|
-
|
|
1013
|
+
const u = e, r = s, a = se(e, "selectedKeys"), i = X(() => a.value.length !== 0 ? a.value[0] : "");
|
|
1014
|
+
function l() {
|
|
1015
|
+
r("cancel");
|
|
1016
1016
|
}
|
|
1017
1017
|
function d(f, m) {
|
|
1018
1018
|
const z = f.path;
|
|
1019
|
-
a.value = [z],
|
|
1019
|
+
a.value = [z], r("change", f, m);
|
|
1020
1020
|
}
|
|
1021
1021
|
const {
|
|
1022
1022
|
changeType: p,
|
|
1023
1023
|
show: $
|
|
1024
|
-
} = me(
|
|
1024
|
+
} = me(r);
|
|
1025
1025
|
function _(f) {
|
|
1026
1026
|
$.value = f, p.value = "编辑";
|
|
1027
1027
|
}
|
|
@@ -1036,24 +1036,24 @@ const ot = /* @__PURE__ */ M({
|
|
|
1036
1036
|
footer: !1,
|
|
1037
1037
|
"hide-title": !1,
|
|
1038
1038
|
width: "880px",
|
|
1039
|
-
onCancel:
|
|
1039
|
+
onCancel: l
|
|
1040
1040
|
}, {
|
|
1041
1041
|
default: c(() => [w("div", ct, [w("div", ft, [N(pe, {
|
|
1042
1042
|
"selected-keys": a.value,
|
|
1043
1043
|
"onUpdate:selectedKeys": m[0] || (m[0] = (z) => a.value = z),
|
|
1044
1044
|
menus: u.menus,
|
|
1045
1045
|
onChange: d
|
|
1046
|
-
}, null, 8, ["selected-keys", "menus"])]), t($) ? (n(),
|
|
1046
|
+
}, null, 8, ["selected-keys", "menus"])]), t($) ? (n(), k(E, {
|
|
1047
1047
|
key: 0
|
|
1048
1048
|
}, [i.value === "ChangelogNotifications" ? (n(), v(Ee, {
|
|
1049
1049
|
key: 0
|
|
1050
|
-
})) :
|
|
1050
|
+
})) : b("", !0), i.value === "EventNotifications" ? (n(), v(Ge, {
|
|
1051
1051
|
key: 1
|
|
1052
|
-
})) :
|
|
1052
|
+
})) : b("", !0), i.value === "MessageNotifications" ? (n(), v(at, {
|
|
1053
1053
|
key: 2
|
|
1054
|
-
})) :
|
|
1054
|
+
})) : b("", !0), i.value === "NoticeNotifications" ? (n(), v(dt, {
|
|
1055
1055
|
key: 3
|
|
1056
|
-
})) :
|
|
1056
|
+
})) : b("", !0)], 64)) : b("", !0)])]),
|
|
1057
1057
|
_: 1
|
|
1058
1058
|
}, 8, ["visible"]));
|
|
1059
1059
|
}
|
|
@@ -1062,15 +1062,15 @@ const ot = /* @__PURE__ */ M({
|
|
|
1062
1062
|
setup(e, {
|
|
1063
1063
|
expose: o
|
|
1064
1064
|
}) {
|
|
1065
|
-
const s = g(["ChangelogNotifications"]), u = g(),
|
|
1065
|
+
const s = g(["ChangelogNotifications"]), u = g(), r = g(Symbol("key"));
|
|
1066
1066
|
function a() {
|
|
1067
1067
|
u.value.setData(!0);
|
|
1068
1068
|
}
|
|
1069
1069
|
function i() {
|
|
1070
|
-
|
|
1070
|
+
r.value = Symbol("key");
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
|
|
1072
|
+
function l() {
|
|
1073
|
+
r.value = Symbol("key");
|
|
1074
1074
|
}
|
|
1075
1075
|
const d = g([{
|
|
1076
1076
|
name: "功能变更",
|
|
@@ -1102,12 +1102,12 @@ const ot = /* @__PURE__ */ M({
|
|
|
1102
1102
|
}), (p, $) => (n(), v(pt, {
|
|
1103
1103
|
ref_key: "MessageNotificationsRef",
|
|
1104
1104
|
ref: u,
|
|
1105
|
-
key:
|
|
1105
|
+
key: r.value,
|
|
1106
1106
|
"selected-keys": s.value,
|
|
1107
1107
|
"onUpdate:selectedKeys": $[0] || ($[0] = (_) => s.value = _),
|
|
1108
1108
|
menus: d.value,
|
|
1109
1109
|
title: "消息中心",
|
|
1110
|
-
onConfirm:
|
|
1110
|
+
onConfirm: l,
|
|
1111
1111
|
onCancel: i
|
|
1112
1112
|
}, null, 8, ["selected-keys", "menus"]));
|
|
1113
1113
|
}
|