yx-web-sdk 0.0.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.
Files changed (100) hide show
  1. package/README.md +424 -0
  2. package/dist/AntdIcon-B0sjNvGu.mjs +307 -0
  3. package/dist/CloseOutlined-DDb89ei3.mjs +37 -0
  4. package/dist/_plugin-vue_export-helper-1tPrXgE0.mjs +10 -0
  5. package/dist/ait-person-popover/index.d.ts +3 -0
  6. package/dist/ait-person-popover/index.js +5 -0
  7. package/dist/ait-person-popover/index.vue.d.ts +39 -0
  8. package/dist/chat-card/index.d.ts +3 -0
  9. package/dist/chat-card/index.js +5 -0
  10. package/dist/chat-card/index.vue.d.ts +25 -0
  11. package/dist/chat-content/index.d.ts +3 -0
  12. package/dist/chat-content/index.js +5 -0
  13. package/dist/chat-content/index.vue.d.ts +51 -0
  14. package/dist/chat-page/index.d.ts +3 -0
  15. package/dist/chat-page/index.js +5 -0
  16. package/dist/chat-page/index.vue.d.ts +6 -0
  17. package/dist/chat-room/index.d.ts +3 -0
  18. package/dist/chat-room/index.js +5 -0
  19. package/dist/chat-room/index.vue.d.ts +9 -0
  20. package/dist/common-avatar/index.d.ts +3 -0
  21. package/dist/common-avatar/index.js +5 -0
  22. package/dist/common-avatar/index.vue.d.ts +17 -0
  23. package/dist/components/ait-person-popover/index.d.ts +3 -0
  24. package/dist/components/ait-person-popover/index.vue.d.ts +39 -0
  25. package/dist/components/chat-card/index.d.ts +3 -0
  26. package/dist/components/chat-card/index.vue.d.ts +25 -0
  27. package/dist/components/chat-content/composables/ait-person.d.ts +86 -0
  28. package/dist/components/chat-content/index.d.ts +3 -0
  29. package/dist/components/chat-content/index.vue.d.ts +51 -0
  30. package/dist/components/chat-page/index.d.ts +3 -0
  31. package/dist/components/chat-page/index.vue.d.ts +6 -0
  32. package/dist/components/chat-room/index.d.ts +3 -0
  33. package/dist/components/chat-room/index.vue.d.ts +9 -0
  34. package/dist/components/common-avatar/index.d.ts +3 -0
  35. package/dist/components/common-avatar/index.vue.d.ts +17 -0
  36. package/dist/components/icon-font/index.d.ts +47 -0
  37. package/dist/components/index-entry/index.d.ts +2 -0
  38. package/dist/components/index-entry/index.vue.d.ts +25 -0
  39. package/dist/components/index.d.ts +12 -0
  40. package/dist/components/list.d.ts +2 -0
  41. package/dist/components/members-sidebar/index.d.ts +3 -0
  42. package/dist/components/members-sidebar/index.vue.d.ts +4 -0
  43. package/dist/components/notice-box/index.d.ts +3 -0
  44. package/dist/components/notice-box/index.vue.d.ts +13 -0
  45. package/dist/components/server-channel-sidebar/index.d.ts +3 -0
  46. package/dist/components/server-channel-sidebar/index.vue.d.ts +18 -0
  47. package/dist/global.css +39 -0
  48. package/dist/icon-font/index.d.ts +47 -0
  49. package/dist/icon-font/index.js +7 -0
  50. package/dist/index/style.css +199 -0
  51. package/dist/index/style2.css +175 -0
  52. package/dist/index/style3.css +36 -0
  53. package/dist/index/style4.css +168 -0
  54. package/dist/index/style5.css +147 -0
  55. package/dist/index/style6.css +43 -0
  56. package/dist/index/style7.css +491 -0
  57. package/dist/index/style8.css +19 -0
  58. package/dist/index-3sSWCzxu.mjs +225 -0
  59. package/dist/index-4m4OVlx8.mjs +611 -0
  60. package/dist/index-CFI0URc5.mjs +135 -0
  61. package/dist/index-Dg8Q3cli.mjs +1092 -0
  62. package/dist/index-entry/index.d.ts +2 -0
  63. package/dist/index-entry/index.js +271 -0
  64. package/dist/index-entry/index.vue.d.ts +25 -0
  65. package/dist/index-entry/style.css +51 -0
  66. package/dist/index.d.ts +8 -0
  67. package/dist/index.vue_vue_type_script_setup_true_lang-DkMXpHkt.mjs +158 -0
  68. package/dist/index.vue_vue_type_style_index_0_lang-CfLKcYM9.mjs +102 -0
  69. package/dist/index.vue_vue_type_style_index_0_lang-CibeOmhP.mjs +407 -0
  70. package/dist/index.vue_vue_type_style_index_0_lang-CmfE8EVU.mjs +288 -0
  71. package/dist/index.vue_vue_type_style_index_0_lang-XiDTgYoZ.mjs +1012 -0
  72. package/dist/index.vue_vue_type_style_index_0_lang-Y-vyKHWz.mjs +36985 -0
  73. package/dist/members-sidebar/index.d.ts +3 -0
  74. package/dist/members-sidebar/index.js +5 -0
  75. package/dist/members-sidebar/index.vue.d.ts +4 -0
  76. package/dist/notice-box/index.d.ts +3 -0
  77. package/dist/notice-box/index.js +5 -0
  78. package/dist/notice-box/index.vue.d.ts +13 -0
  79. package/dist/plugin/index.d.ts +22 -0
  80. package/dist/resolver/index.d.ts +22 -0
  81. package/dist/resolver/index.es.js +36 -0
  82. package/dist/resolver/index.umd.js +40 -0
  83. package/dist/server-channel-sidebar/index.d.ts +3 -0
  84. package/dist/server-channel-sidebar/index.js +5 -0
  85. package/dist/server-channel-sidebar/index.vue.d.ts +18 -0
  86. package/dist/stores/channel.d.ts +114 -0
  87. package/dist/stores/global.d.ts +15 -0
  88. package/dist/stores/index.d.ts +7 -0
  89. package/dist/stores/qchat.d.ts +397 -0
  90. package/dist/stores/sdk.d.ts +48 -0
  91. package/dist/stores/server.d.ts +58 -0
  92. package/dist/stores/user.d.ts +9 -0
  93. package/dist/style.css +1359 -0
  94. package/dist/types/missing.d.ts +14 -0
  95. package/dist/utils/events.d.ts +7 -0
  96. package/dist/utils/index.d.ts +26 -0
  97. package/dist/utils/storage.d.ts +15 -0
  98. package/dist/yx-web-sdk.es.js +41593 -0
  99. package/dist/yx-web-sdk.umd.js +41590 -0
  100. package/package.json +191 -0
@@ -0,0 +1,407 @@
1
+ import { createVNode, defineComponent, ref, watch, nextTick, onBeforeUnmount, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, withModifiers, createBlock, unref, createCommentVNode, withCtx, withDirectives, normalizeStyle, vShow } from "vue";
2
+ import { useClipboard, useEventListener } from "@vueuse/core";
3
+ import { Image, Button, message } from "ant-design-vue";
4
+ import { a as useServerStore, p as parseFileSize, m as matchExt, g as getImageMsgDisplaySize, _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-Y-vyKHWz.mjs";
5
+ import { I as IconFont } from "./index-Dg8Q3cli.mjs";
6
+ import dayjs from "dayjs";
7
+ import { I as Icon } from "./AntdIcon-B0sjNvGu.mjs";
8
+ var ExclamationCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "exclamation-circle", "theme": "filled" };
9
+ function _objectSpread$1(target) {
10
+ for (var i = 1; i < arguments.length; i++) {
11
+ var source = arguments[i] != null ? Object(arguments[i]) : {};
12
+ var ownKeys = Object.keys(source);
13
+ if (typeof Object.getOwnPropertySymbols === "function") {
14
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
15
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
16
+ }));
17
+ }
18
+ ownKeys.forEach(function(key) {
19
+ _defineProperty$1(target, key, source[key]);
20
+ });
21
+ }
22
+ return target;
23
+ }
24
+ function _defineProperty$1(obj, key, value) {
25
+ if (key in obj) {
26
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
27
+ } else {
28
+ obj[key] = value;
29
+ }
30
+ return obj;
31
+ }
32
+ var ExclamationCircleFilled = function ExclamationCircleFilled2(props, context) {
33
+ var p = _objectSpread$1({}, props, context.attrs);
34
+ return createVNode(Icon, _objectSpread$1({}, p, {
35
+ "icon": ExclamationCircleFilled$1
36
+ }), null);
37
+ };
38
+ ExclamationCircleFilled.displayName = "ExclamationCircleFilled";
39
+ ExclamationCircleFilled.inheritAttrs = false;
40
+ var LoadingOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, "name": "loading", "theme": "outlined" };
41
+ function _objectSpread(target) {
42
+ for (var i = 1; i < arguments.length; i++) {
43
+ var source = arguments[i] != null ? Object(arguments[i]) : {};
44
+ var ownKeys = Object.keys(source);
45
+ if (typeof Object.getOwnPropertySymbols === "function") {
46
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
47
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
48
+ }));
49
+ }
50
+ ownKeys.forEach(function(key) {
51
+ _defineProperty(target, key, source[key]);
52
+ });
53
+ }
54
+ return target;
55
+ }
56
+ function _defineProperty(obj, key, value) {
57
+ if (key in obj) {
58
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
59
+ } else {
60
+ obj[key] = value;
61
+ }
62
+ return obj;
63
+ }
64
+ var LoadingOutlined = function LoadingOutlined2(props, context) {
65
+ var p = _objectSpread({}, props, context.attrs);
66
+ return createVNode(Icon, _objectSpread({}, p, {
67
+ "icon": LoadingOutlined$1
68
+ }), null);
69
+ };
70
+ LoadingOutlined.displayName = "LoadingOutlined";
71
+ LoadingOutlined.inheritAttrs = false;
72
+ const _hoisted_1 = ["data-msg-id-client"];
73
+ const _hoisted_2 = { class: "chatCardAvatar" };
74
+ const _hoisted_3 = { class: "chatCardContent" };
75
+ const _hoisted_4 = { class: "chatCardInfo" };
76
+ const _hoisted_5 = { class: "chatCardInfoName" };
77
+ const _hoisted_6 = { class: "chatCardInfoTime" };
78
+ const _hoisted_7 = ["innerHTML"];
79
+ const _hoisted_8 = ["href"];
80
+ const _hoisted_9 = { class: "fileMsgContent" };
81
+ const _hoisted_10 = { class: "fileMsgName" };
82
+ const _hoisted_11 = { class: "fileMsgSize" };
83
+ const _hoisted_12 = {
84
+ key: 4,
85
+ class: "chatCardMainContent"
86
+ };
87
+ const _hoisted_13 = { class: "chatCardQuoteMsgName" };
88
+ const _hoisted_14 = ["innerHTML"];
89
+ const _hoisted_15 = { class: "chatCardStatus" };
90
+ const _sfc_main = /* @__PURE__ */ defineComponent({
91
+ ...{
92
+ name: "ChatCard"
93
+ },
94
+ __name: "index",
95
+ props: {
96
+ msg: {},
97
+ myAccid: { default: "" }
98
+ },
99
+ emits: ["resendText", "resendImg", "resendFile", "quote", "contextMenuSwitch", "quoteMsgClick"],
100
+ setup(__props, { emit: __emit }) {
101
+ const serverStore = useServerStore();
102
+ const props = __props;
103
+ const { copy } = useClipboard();
104
+ const emit = __emit;
105
+ const textMsgContextMenuVisible = ref(false);
106
+ const textMsgContextMenuX = ref(0);
107
+ const textMsgContextMenuY = ref(0);
108
+ const textMsgContextMenuRef = ref(null);
109
+ function onTextMsgContextMenu(e) {
110
+ textMsgContextMenuX.value = e.clientX;
111
+ textMsgContextMenuY.value = e.clientY;
112
+ textMsgContextMenuVisible.value = true;
113
+ }
114
+ function onCopyClick() {
115
+ copy(props.msg.body).then(() => {
116
+ }).catch((err) => {
117
+ console.error("copy error: ", err);
118
+ message.error("复制失败");
119
+ }).finally(() => {
120
+ textMsgContextMenuVisible.value = false;
121
+ });
122
+ }
123
+ function onQuoteClick() {
124
+ var _a;
125
+ let msg;
126
+ try {
127
+ msg = JSON.parse(JSON.stringify(props.msg));
128
+ if (msg.ext && typeof msg.ext === "string") {
129
+ msg.ext = JSON.parse(msg.ext);
130
+ }
131
+ } catch (error) {
132
+ console.error("parse ext error: ", error);
133
+ }
134
+ if ((_a = msg == null ? void 0 : msg.ext) == null ? void 0 : _a.quoteMsg) {
135
+ delete msg.ext.quoteMsg;
136
+ }
137
+ emit("quote", msg);
138
+ textMsgContextMenuVisible.value = false;
139
+ }
140
+ function onQuoteMsgClick() {
141
+ var _a;
142
+ emit("quoteMsgClick", (_a = msgExt.value) == null ? void 0 : _a.quoteMsg);
143
+ }
144
+ function handleClickOutside(e) {
145
+ if (!textMsgContextMenuVisible.value) return;
146
+ const el = textMsgContextMenuRef.value;
147
+ if (!el || !el.contains(e.target)) {
148
+ textMsgContextMenuVisible.value = false;
149
+ }
150
+ }
151
+ function closeMenuOnResizeOrScroll() {
152
+ if (textMsgContextMenuVisible.value) {
153
+ textMsgContextMenuVisible.value = false;
154
+ }
155
+ }
156
+ useEventListener(window, "resize", () => textMsgContextMenuVisible.value && closeMenuOnResizeOrScroll());
157
+ useEventListener(
158
+ () => window.visualViewport ?? void 0,
159
+ "resize",
160
+ () => textMsgContextMenuVisible.value && closeMenuOnResizeOrScroll()
161
+ );
162
+ useEventListener(document, "scroll", () => textMsgContextMenuVisible.value && closeMenuOnResizeOrScroll(), {
163
+ capture: true
164
+ });
165
+ watch(textMsgContextMenuVisible, (visible) => {
166
+ if (visible) {
167
+ nextTick(() => {
168
+ document.addEventListener("click", handleClickOutside, true);
169
+ document.addEventListener("contextmenu", handleClickOutside, true);
170
+ });
171
+ emit("contextMenuSwitch", true);
172
+ } else {
173
+ document.removeEventListener("click", handleClickOutside, true);
174
+ document.removeEventListener("contextmenu", handleClickOutside, true);
175
+ emit("contextMenuSwitch", false);
176
+ }
177
+ });
178
+ onBeforeUnmount(() => {
179
+ document.removeEventListener("click", handleClickOutside, true);
180
+ document.removeEventListener("contextmenu", handleClickOutside, true);
181
+ });
182
+ const myAvatar = computed(() => {
183
+ var _a, _b, _c, _d;
184
+ if (((_a = serverStore.serverMembers) == null ? void 0 : _a.datas) && ((_b = serverStore.serverMembers) == null ? void 0 : _b.datas.length) > 0) {
185
+ return (_d = (_c = serverStore.serverMembers) == null ? void 0 : _c.datas.filter((item) => item.accid === props.msg.fromAccount)[0]) == null ? void 0 : _d.avatar;
186
+ }
187
+ return "";
188
+ });
189
+ const time = computed(() => {
190
+ const _d = dayjs(props.msg.time);
191
+ const isCurrentDay = _d.isSame(dayjs(), "day");
192
+ const isCurrentYear = _d.isSame(dayjs(), "year");
193
+ return _d.format(isCurrentDay ? "HH:mm:ss" : isCurrentYear ? "MM-DD HH:mm:ss" : "YYYY-MM-DD HH:mm:ss");
194
+ });
195
+ const size = computed(() => {
196
+ var _a;
197
+ return parseFileSize(((_a = props.msg.attach) == null ? void 0 : _a.size) || 0);
198
+ });
199
+ const ext = computed(() => {
200
+ var _a;
201
+ return matchExt(((_a = props.msg.attach) == null ? void 0 : _a.ext) || "");
202
+ });
203
+ const textMsgBody = computed(
204
+ () => {
205
+ var _a;
206
+ return ((_a = props.msg.body) == null ? void 0 : _a.replace(
207
+ /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,
208
+ '<a style="color:#fff;text-decoration:underline;" href="$1" target="_blank">$1</a>'
209
+ )) || "";
210
+ }
211
+ );
212
+ const msgExt = computed(() => {
213
+ if (!props.msg.ext) {
214
+ return null;
215
+ }
216
+ try {
217
+ return JSON.parse(props.msg.ext);
218
+ } catch (error) {
219
+ console.error("parse ext error: ", error);
220
+ return null;
221
+ }
222
+ });
223
+ const imageMsgSize = computed(() => {
224
+ var _a;
225
+ return getImageMsgDisplaySize((_a = props.msg) == null ? void 0 : _a.attach);
226
+ });
227
+ const quoteImageMsgSize = computed(() => {
228
+ var _a, _b;
229
+ return getImageMsgDisplaySize((_b = (_a = msgExt.value) == null ? void 0 : _a.quoteMsg) == null ? void 0 : _b.attach);
230
+ });
231
+ const resendHandler = () => {
232
+ switch (props.msg.type) {
233
+ case "text":
234
+ emit("resendText", props.msg);
235
+ break;
236
+ case "image":
237
+ emit("resendImg", props.msg);
238
+ break;
239
+ case "file":
240
+ emit("resendFile", props.msg);
241
+ break;
242
+ }
243
+ };
244
+ return (_ctx, _cache) => {
245
+ var _a, _b, _c, _d, _e, _f, _g, _h;
246
+ return openBlock(), createElementBlock("div", {
247
+ class: normalizeClass(["yx-chatCardWrapper", { reverse: __props.msg.fromAccount === __props.myAccid }]),
248
+ "data-msg-id-client": __props.msg.msgIdClient
249
+ }, [
250
+ createElementVNode("div", _hoisted_2, [
251
+ createVNode(_sfc_main$1, {
252
+ avatar: myAvatar.value,
253
+ nick: __props.msg.fromNick,
254
+ accid: __props.msg.fromAccount,
255
+ width: 32,
256
+ border: 0
257
+ }, null, 8, ["avatar", "nick", "accid"])
258
+ ]),
259
+ createElementVNode("div", _hoisted_3, [
260
+ createElementVNode("div", null, [
261
+ createElementVNode("div", _hoisted_4, [
262
+ createElementVNode("span", _hoisted_5, toDisplayString(__props.msg.fromNick), 1),
263
+ createElementVNode("span", _hoisted_6, toDisplayString(time.value), 1)
264
+ ]),
265
+ __props.msg.type === "text" ? (openBlock(), createElementBlock("div", {
266
+ key: 0,
267
+ class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
268
+ }, [
269
+ createElementVNode("div", {
270
+ class: "textMsg flash-target",
271
+ onContextmenu: withModifiers(onTextMsgContextMenu, ["prevent"]),
272
+ innerHTML: textMsgBody.value
273
+ }, null, 40, _hoisted_7)
274
+ ], 2)) : __props.msg.type === "file" ? (openBlock(), createElementBlock("div", {
275
+ key: 1,
276
+ class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
277
+ }, [
278
+ createElementVNode("a", {
279
+ class: "fileMsg",
280
+ target: "_blank",
281
+ href: (_b = (_a = __props.msg) == null ? void 0 : _a.attach) == null ? void 0 : _b.url
282
+ }, [
283
+ ext.value === "pdf" ? (openBlock(), createBlock(unref(IconFont), {
284
+ key: 0,
285
+ type: "icon-PDF",
286
+ style: { "font-size": "40px" }
287
+ })) : ext.value === "word" ? (openBlock(), createBlock(unref(IconFont), {
288
+ key: 1,
289
+ type: "icon-Word",
290
+ style: { "font-size": "40px" }
291
+ })) : ext.value === "excel" ? (openBlock(), createBlock(unref(IconFont), {
292
+ key: 2,
293
+ type: "icon-Excel",
294
+ style: { "font-size": "40px" }
295
+ })) : ext.value === "ppt" ? (openBlock(), createBlock(unref(IconFont), {
296
+ key: 3,
297
+ type: "icon-PPT",
298
+ style: { "font-size": "40px" }
299
+ })) : ext.value === "zip" ? (openBlock(), createBlock(unref(IconFont), {
300
+ key: 4,
301
+ type: "icon-RAR1",
302
+ style: { "font-size": "40px" }
303
+ })) : ext.value === "video" ? (openBlock(), createBlock(unref(IconFont), {
304
+ key: 5,
305
+ type: "icon-shipin",
306
+ style: { "font-size": "40px" }
307
+ })) : ext.value === "audio" ? (openBlock(), createBlock(unref(IconFont), {
308
+ key: 6,
309
+ type: "icon-yinle",
310
+ style: { "font-size": "40px" }
311
+ })) : ext.value === "img" ? (openBlock(), createBlock(unref(IconFont), {
312
+ key: 7,
313
+ type: "icon-tupian2",
314
+ style: { "font-size": "40px" }
315
+ })) : ext.value === "txt" ? (openBlock(), createBlock(unref(IconFont), {
316
+ key: 8,
317
+ type: "icon-qita",
318
+ style: { "font-size": "40px" }
319
+ })) : (openBlock(), createBlock(unref(IconFont), {
320
+ key: 9,
321
+ type: "icon-weizhiwenjian",
322
+ style: { "font-size": "40px" }
323
+ })),
324
+ createElementVNode("div", _hoisted_9, [
325
+ createElementVNode("div", _hoisted_10, toDisplayString((_d = (_c = __props.msg) == null ? void 0 : _c.attach) == null ? void 0 : _d.name), 1),
326
+ createElementVNode("div", _hoisted_11, toDisplayString(size.value), 1)
327
+ ])
328
+ ], 8, _hoisted_8)
329
+ ], 2)) : __props.msg.type === "image" ? (openBlock(), createElementBlock("div", {
330
+ key: 2,
331
+ class: normalizeClass(["chatCardMainContent flash-target", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }]),
332
+ onContextmenu: withModifiers(onTextMsgContextMenu, ["prevent"])
333
+ }, [
334
+ createVNode(unref(Image), {
335
+ class: "imgMsg",
336
+ src: (_f = (_e = __props.msg) == null ? void 0 : _e.attach) == null ? void 0 : _f.url,
337
+ width: imageMsgSize.value.width,
338
+ height: imageMsgSize.value.height
339
+ }, null, 8, ["src", "width", "height"])
340
+ ], 34)) : (openBlock(), createElementBlock("div", {
341
+ key: 3,
342
+ class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
343
+ }, [..._cache[1] || (_cache[1] = [
344
+ createElementVNode("div", { class: "textMsg" }, toDisplayString("暂不支持该消息"), -1)
345
+ ])], 2)),
346
+ ((_g = msgExt.value) == null ? void 0 : _g.quoteMsg) ? (openBlock(), createElementBlock("div", _hoisted_12, [
347
+ createElementVNode("div", {
348
+ class: "chatCardQuoteMsg",
349
+ onClick: onQuoteMsgClick
350
+ }, [
351
+ createElementVNode("div", _hoisted_13, toDisplayString(msgExt.value.quoteMsg.fromNick) + ":", 1),
352
+ msgExt.value.quoteMsg.body ? (openBlock(), createElementBlock("div", {
353
+ key: 0,
354
+ class: "quoteMsgText",
355
+ innerHTML: msgExt.value.quoteMsg.body
356
+ }, null, 8, _hoisted_14)) : createCommentVNode("", true),
357
+ msgExt.value.quoteMsg.type === "image" ? (openBlock(), createBlock(unref(Image), {
358
+ key: 1,
359
+ class: "imgMsg quoteMsgImg",
360
+ src: (_h = msgExt.value.quoteMsg.attach) == null ? void 0 : _h.url,
361
+ width: quoteImageMsgSize.value.width,
362
+ height: quoteImageMsgSize.value.height,
363
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
364
+ }, ["stop", "prevent"]))
365
+ }, null, 8, ["src", "width", "height"])) : createCommentVNode("", true)
366
+ ])
367
+ ])) : createCommentVNode("", true)
368
+ ]),
369
+ createElementVNode("div", _hoisted_15, [
370
+ __props.msg.deliveryStatus === "failed" ? (openBlock(), createBlock(unref(Button), {
371
+ key: 0,
372
+ type: "text",
373
+ danger: "",
374
+ onClick: resendHandler
375
+ }, {
376
+ icon: withCtx(() => [
377
+ createVNode(unref(ExclamationCircleFilled))
378
+ ]),
379
+ _: 1
380
+ })) : __props.msg.deliveryStatus === "sending" ? (openBlock(), createBlock(unref(LoadingOutlined), { key: 1 })) : createCommentVNode("", true)
381
+ ])
382
+ ]),
383
+ withDirectives(createElementVNode("div", {
384
+ ref_key: "textMsgContextMenuRef",
385
+ ref: textMsgContextMenuRef,
386
+ class: "yx-chatCardTextMsgContextMenu",
387
+ style: normalizeStyle({ left: textMsgContextMenuX.value + "px", top: textMsgContextMenuY.value + "px" })
388
+ }, [
389
+ createElementVNode("div", {
390
+ class: "yx-chatCardTextMsgContextMenu-item",
391
+ onClick: onCopyClick
392
+ }, "复制"),
393
+ createElementVNode("div", {
394
+ class: "yx-chatCardTextMsgContextMenu-item",
395
+ onClick: onQuoteClick
396
+ }, "引用")
397
+ ], 4), [
398
+ [vShow, textMsgContextMenuVisible.value]
399
+ ])
400
+ ], 10, _hoisted_1);
401
+ };
402
+ }
403
+ });
404
+ export {
405
+ LoadingOutlined as L,
406
+ _sfc_main as _
407
+ };