yx-web-sdk 0.0.18 → 0.0.19
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/ait-person-popover/index.js +1 -1
- package/dist/chat-card/index.js +1 -1
- package/dist/chat-content/index.js +1 -1
- package/dist/chat-page/index.js +1 -1
- package/dist/chat-room/index.js +1 -1
- package/dist/common-avatar/index.js +1 -1
- package/dist/components/chat-card/index.vue.d.ts +2 -0
- package/dist/index/style4.css +7 -1
- package/dist/index/style7.css +68 -68
- package/dist/{index-C14AY1pk.mjs → index-BjIqS2ZC.mjs} +7 -6
- package/dist/{index-sJcDnl5D.mjs → index-D5gp5t2F.mjs} +1 -1
- package/dist/{index-0o2Mn1Jl.mjs → index-DHnPD8u9.mjs} +1 -1
- package/dist/index-entry/index.js +5 -5
- package/dist/index-entry/style.css +19 -19
- package/dist/{index.vue_vue_type_script_setup_true_lang-0YeDxfed.mjs → index.vue_vue_type_script_setup_true_lang-CkWszgC3.mjs} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_lang-BdIDeEyF.mjs → index.vue_vue_type_style_index_0_lang-5DeqmRdw.mjs} +24 -7
- package/dist/{index.vue_vue_type_style_index_0_lang-BxxUcry3.mjs → index.vue_vue_type_style_index_0_lang-C-imP01W.mjs} +3 -3
- package/dist/{index.vue_vue_type_style_index_0_lang-oO4NDv0U.mjs → index.vue_vue_type_style_index_0_lang-CA27kCm1.mjs} +218 -166
- package/dist/{index.vue_vue_type_style_index_0_lang-UfvEW_0n.mjs → index.vue_vue_type_style_index_0_lang-CAZ44kgX.mjs} +104 -50
- package/dist/members-sidebar/index.js +1 -1
- package/dist/server-channel-sidebar/index.js +1 -1
- package/dist/stores/channel.d.ts +32 -12
- package/dist/stores/qchat.d.ts +3 -3
- package/dist/stores/sdk.d.ts +0 -8
- package/dist/stores/server.d.ts +26 -26
- package/dist/style.css +94 -88
- package/dist/types/qchat-server.d.ts +1 -1
- package/dist/yx-web-sdk.es.js +349 -225
- package/dist/yx-web-sdk.umd.js +348 -224
- package/package.json +1 -1
- package/dist/ait-person-popover/index.d.ts +0 -3
- package/dist/ait-person-popover/index.vue.d.ts +0 -39
- package/dist/chat-card/index.d.ts +0 -3
- package/dist/chat-card/index.vue.d.ts +0 -25
- package/dist/chat-content/index.d.ts +0 -3
- package/dist/chat-content/index.vue.d.ts +0 -51
- package/dist/chat-page/index.d.ts +0 -3
- package/dist/chat-page/index.vue.d.ts +0 -6
- package/dist/chat-room/index.d.ts +0 -3
- package/dist/chat-room/index.vue.d.ts +0 -9
- package/dist/common-avatar/index.d.ts +0 -3
- package/dist/common-avatar/index.vue.d.ts +0 -17
- package/dist/icon-font/index.d.ts +0 -48
- package/dist/index-entry/index.d.ts +0 -2
- package/dist/index-entry/index.vue.d.ts +0 -24
- package/dist/members-sidebar/index.d.ts +0 -3
- package/dist/members-sidebar/index.vue.d.ts +0 -4
- package/dist/notice-box/index.d.ts +0 -3
- package/dist/notice-box/index.vue.d.ts +0 -13
- package/dist/server-channel-sidebar/index.d.ts +0 -3
- package/dist/server-channel-sidebar/index.vue.d.ts +0 -21
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
.qchat-container[data-v-
|
|
1
|
+
.qchat-container[data-v-240f366f] {
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
5
5
|
color: var(--theme-text);
|
|
6
6
|
font-family: "Whitney", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
7
7
|
}
|
|
8
|
-
.loading-wrap[data-v-
|
|
9
|
-
.error-wrap[data-v-
|
|
10
|
-
.init-wrap[data-v-
|
|
8
|
+
.loading-wrap[data-v-240f366f],
|
|
9
|
+
.error-wrap[data-v-240f366f],
|
|
10
|
+
.init-wrap[data-v-240f366f] {
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
justify-content: center;
|
|
14
14
|
width: 100%;
|
|
15
15
|
height: 100%;
|
|
16
16
|
}
|
|
17
|
-
.loading-wrap[data-v-
|
|
18
|
-
.error-wrap[data-v-
|
|
19
|
-
.init-wrap[data-v-
|
|
17
|
+
.loading-wrap[data-v-240f366f] .ant-spin-text,
|
|
18
|
+
.error-wrap[data-v-240f366f] .ant-spin-text,
|
|
19
|
+
.init-wrap[data-v-240f366f] .ant-spin-text {
|
|
20
20
|
color: #dcddde;
|
|
21
21
|
}
|
|
22
|
-
.loading-wrap[data-v-
|
|
23
|
-
.loading-wrap[data-v-
|
|
24
|
-
.error-wrap[data-v-
|
|
25
|
-
.error-wrap[data-v-
|
|
26
|
-
.init-wrap[data-v-
|
|
27
|
-
.init-wrap[data-v-
|
|
22
|
+
.loading-wrap[data-v-240f366f] .ant-result-title,
|
|
23
|
+
.loading-wrap[data-v-240f366f] .ant-result-subtitle,
|
|
24
|
+
.error-wrap[data-v-240f366f] .ant-result-title,
|
|
25
|
+
.error-wrap[data-v-240f366f] .ant-result-subtitle,
|
|
26
|
+
.init-wrap[data-v-240f366f] .ant-result-title,
|
|
27
|
+
.init-wrap[data-v-240f366f] .ant-result-subtitle {
|
|
28
28
|
color: #dcddde;
|
|
29
29
|
}
|
|
30
|
-
.loading-wrap[data-v-
|
|
31
|
-
.error-wrap[data-v-
|
|
32
|
-
.init-wrap[data-v-
|
|
30
|
+
.loading-wrap[data-v-240f366f] .ant-empty-description,
|
|
31
|
+
.error-wrap[data-v-240f366f] .ant-empty-description,
|
|
32
|
+
.init-wrap[data-v-240f366f] .ant-empty-description {
|
|
33
33
|
color: #72767d;
|
|
34
34
|
}
|
|
35
|
-
.chat-main[data-v-
|
|
35
|
+
.chat-main[data-v-240f366f] {
|
|
36
36
|
flex: 1;
|
|
37
37
|
display: flex;
|
|
38
38
|
flex-direction: column;
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
overflow: hidden;
|
|
41
41
|
min-width: 300px;
|
|
42
42
|
}
|
|
43
|
-
.chat-main .no-channel[data-v-
|
|
43
|
+
.chat-main .no-channel[data-v-240f366f] {
|
|
44
44
|
display: flex;
|
|
45
45
|
align-items: center;
|
|
46
46
|
justify-content: center;
|
|
47
47
|
height: 100%;
|
|
48
48
|
}
|
|
49
|
-
.chat-main .no-channel[data-v-
|
|
49
|
+
.chat-main .no-channel[data-v-240f366f] .ant-empty-description {
|
|
50
50
|
color: #72767d;
|
|
51
51
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, watch, openBlock, createBlock, createElementBlock } from "vue";
|
|
2
|
-
import { _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-
|
|
3
|
-
import { b as useChannelStore, a as useServerStore, c as useUserStore } from "./index.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import { _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-5DeqmRdw.mjs";
|
|
3
|
+
import { b as useChannelStore, a as useServerStore, c as useUserStore } from "./index.vue_vue_type_style_index_0_lang-CAZ44kgX.mjs";
|
|
4
4
|
const _hoisted_1 = { key: 1 };
|
|
5
5
|
const HISTORY_LIMIT = 100;
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref, computed, watch, nextTick, defineComponent, openBlock, createElementBlock, createElementVNode, normalizeStyle, unref, normalizeClass, createBlock, createCommentVNode, createVNode, Fragment, renderList, toDisplayString, withCtx } from "vue";
|
|
2
2
|
import { useRouter } from "vue-router";
|
|
3
3
|
import { Input, Image, Popover, Button, Upload, message } from "ant-design-vue";
|
|
4
|
-
import { A as AitPersonPopover } from "./index-
|
|
5
|
-
import { L as LoadingOutlined, _ as _sfc_main$2 } from "./index.vue_vue_type_style_index_0_lang-
|
|
4
|
+
import { A as AitPersonPopover } from "./index-D5gp5t2F.mjs";
|
|
5
|
+
import { L as LoadingOutlined, _ as _sfc_main$2 } from "./index.vue_vue_type_style_index_0_lang-CA27kCm1.mjs";
|
|
6
6
|
import { _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-B2YRkoln.mjs";
|
|
7
|
-
import { a as useServerStore, g as getServerMembersByAccids, b as useChannelStore, e as getImageMsgDisplaySize, f as filterStr, i as isLt } from "./index.vue_vue_type_style_index_0_lang-
|
|
7
|
+
import { a as useServerStore, g as getServerMembersByAccids, b as useChannelStore, e as getImageMsgDisplaySize, f as filterStr, i as isLt } from "./index.vue_vue_type_style_index_0_lang-CAZ44kgX.mjs";
|
|
8
8
|
import { useEventListener, useDebounceFn } from "@vueuse/core";
|
|
9
9
|
import { C as CloseOutlined } from "./CloseOutlined-BEcmJaCc.mjs";
|
|
10
10
|
const MENTION_TAG_REG = /@[^@]+\s/g;
|
|
@@ -546,6 +546,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
546
546
|
}
|
|
547
547
|
});
|
|
548
548
|
};
|
|
549
|
+
const handleRevokeMessage = (msg) => {
|
|
550
|
+
channelStore.revokeMessage({
|
|
551
|
+
ps: "撤回了一条消息",
|
|
552
|
+
message: msg
|
|
553
|
+
});
|
|
554
|
+
};
|
|
549
555
|
const handleDeleteQuoteMsg = () => {
|
|
550
556
|
quoteMsg.value = void 0;
|
|
551
557
|
};
|
|
@@ -580,11 +586,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
580
586
|
}
|
|
581
587
|
}
|
|
582
588
|
);
|
|
589
|
+
const inputMap = /* @__PURE__ */ new Map();
|
|
583
590
|
watch(
|
|
584
591
|
() => channelStore.currentChannel,
|
|
585
|
-
() => {
|
|
586
|
-
|
|
587
|
-
|
|
592
|
+
(value, oldValue) => {
|
|
593
|
+
if (oldValue == null ? void 0 : oldValue.channelId) {
|
|
594
|
+
inputMap.set(oldValue == null ? void 0 : oldValue.channelId, { input: curText.value, quoteMsg: quoteMsg.value });
|
|
595
|
+
}
|
|
596
|
+
if ((value == null ? void 0 : value.channelId) && inputMap.has((value == null ? void 0 : value.channelId) || "")) {
|
|
597
|
+
const mapValue = inputMap.get((value == null ? void 0 : value.channelId) || "");
|
|
598
|
+
curText.value = (mapValue == null ? void 0 : mapValue.input) || "";
|
|
599
|
+
quoteMsg.value = mapValue == null ? void 0 : mapValue.quoteMsg;
|
|
600
|
+
} else {
|
|
601
|
+
curText.value = "";
|
|
602
|
+
quoteMsg.value = void 0;
|
|
603
|
+
}
|
|
588
604
|
}
|
|
589
605
|
);
|
|
590
606
|
const inputPlaceholder = computed(
|
|
@@ -882,7 +898,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
882
898
|
onResendFile: handleResendFile,
|
|
883
899
|
onContextMenuSwitch,
|
|
884
900
|
onQuote: handleQuote,
|
|
885
|
-
onQuoteMsgClick: handleQuoteMsgClick
|
|
901
|
+
onQuoteMsgClick: handleQuoteMsgClick,
|
|
902
|
+
onRevokeMessage: handleRevokeMessage
|
|
886
903
|
}, null, 8, ["msg", "my-avatar", "my-accid"]);
|
|
887
904
|
}), 128))
|
|
888
905
|
])) : (openBlock(), createElementBlock("div", {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, ref, h, watch, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
2
2
|
import { List, Typography } from "ant-design-vue";
|
|
3
|
-
import { _ as _sfc_main$1 } from "./index.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { a as useServerStore, b as useChannelStore } from "./index.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { _ as _sfc_main$1 } from "./index.vue_vue_type_script_setup_true_lang-CkWszgC3.mjs";
|
|
4
|
+
import { a as useServerStore, b as useChannelStore } from "./index.vue_vue_type_style_index_0_lang-CAZ44kgX.mjs";
|
|
5
5
|
import "./index-L_drmZir.mjs";
|
|
6
6
|
import { useLocalStorage } from "@vueuse/core";
|
|
7
|
-
import { L as LoadingOutlined } from "./index.vue_vue_type_style_index_0_lang-
|
|
7
|
+
import { L as LoadingOutlined } from "./index.vue_vue_type_style_index_0_lang-CA27kCm1.mjs";
|
|
8
8
|
const _hoisted_1 = { class: "yx-chat-page-container" };
|
|
9
9
|
const _hoisted_2 = { class: "header-wrap" };
|
|
10
10
|
const _hoisted_3 = { class: "left" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createVNode, defineComponent, ref,
|
|
1
|
+
import { createVNode, defineComponent, ref, onBeforeUnmount, computed, watch, nextTick, openBlock, createElementBlock, normalizeClass, toDisplayString, Fragment, createElementVNode, withModifiers, createBlock, unref, withCtx, createCommentVNode, withDirectives, normalizeStyle, vShow } from "vue";
|
|
2
2
|
import { useClipboard, useEventListener } from "@vueuse/core";
|
|
3
3
|
import { Image, Button, message } from "ant-design-vue";
|
|
4
|
-
import { a as useServerStore, p as parseFileSize, m as matchExt, e as getImageMsgDisplaySize, _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-
|
|
4
|
+
import { a as useServerStore, p as parseFileSize, m as matchExt, e as getImageMsgDisplaySize, _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-CAZ44kgX.mjs";
|
|
5
5
|
import { F as FileIconFont } from "./index-L_drmZir.mjs";
|
|
6
6
|
import dayjs from "dayjs";
|
|
7
7
|
import { I as Icon } from "./AntdIcon-DdvEPKFJ.mjs";
|
|
@@ -102,25 +102,30 @@ var LoadingOutlined = function LoadingOutlined2(props, context) {
|
|
|
102
102
|
LoadingOutlined.displayName = "LoadingOutlined";
|
|
103
103
|
LoadingOutlined.inheritAttrs = false;
|
|
104
104
|
const _hoisted_1 = ["data-msg-id-client"];
|
|
105
|
-
const _hoisted_2 = {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
const
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
-
const
|
|
116
|
-
const
|
|
105
|
+
const _hoisted_2 = {
|
|
106
|
+
key: 0,
|
|
107
|
+
class: "chat-withdraw-msg"
|
|
108
|
+
};
|
|
109
|
+
const _hoisted_3 = { class: "chatCardAvatar" };
|
|
110
|
+
const _hoisted_4 = { class: "chatCardContent" };
|
|
111
|
+
const _hoisted_5 = { class: "chatCardInfo" };
|
|
112
|
+
const _hoisted_6 = { class: "chatCardInfoName" };
|
|
113
|
+
const _hoisted_7 = { class: "chatCardInfoTime" };
|
|
114
|
+
const _hoisted_8 = ["innerHTML"];
|
|
115
|
+
const _hoisted_9 = ["href"];
|
|
116
|
+
const _hoisted_10 = { class: "fileMsgContent" };
|
|
117
|
+
const _hoisted_11 = { class: "fileMsgName" };
|
|
118
|
+
const _hoisted_12 = { class: "fileMsgSize" };
|
|
119
|
+
const _hoisted_13 = { class: "ant-image-mask-info" };
|
|
120
|
+
const _hoisted_14 = {
|
|
117
121
|
key: 4,
|
|
118
122
|
class: "chatCardMainContent"
|
|
119
123
|
};
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
+
const _hoisted_15 = { class: "chatCardQuoteMsgName" };
|
|
125
|
+
const _hoisted_16 = ["innerHTML"];
|
|
126
|
+
const _hoisted_17 = { class: "ant-image-mask-info" };
|
|
127
|
+
const _hoisted_18 = { class: "chatCardStatus" };
|
|
128
|
+
const REVOCATION_INTERVAL = 120 * 1e3;
|
|
124
129
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
125
130
|
...{
|
|
126
131
|
name: "ChatCard"
|
|
@@ -130,10 +135,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
130
135
|
msg: {},
|
|
131
136
|
myAccid: { default: "" }
|
|
132
137
|
},
|
|
133
|
-
emits: ["resendText", "resendImg", "resendFile", "quote", "contextMenuSwitch", "quoteMsgClick"],
|
|
138
|
+
emits: ["resendText", "resendImg", "resendFile", "quote", "contextMenuSwitch", "quoteMsgClick", "revokeMessage"],
|
|
134
139
|
setup(__props, { emit: __emit }) {
|
|
135
140
|
const serverStore = useServerStore();
|
|
136
141
|
const props = __props;
|
|
142
|
+
const nowTime = ref(Date.now());
|
|
143
|
+
let timer = null;
|
|
144
|
+
timer = setInterval(() => {
|
|
145
|
+
nowTime.value = Date.now();
|
|
146
|
+
if (nowTime.value - props.msg.time > REVOCATION_INTERVAL) {
|
|
147
|
+
if (timer) {
|
|
148
|
+
clearInterval(timer);
|
|
149
|
+
timer = null;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}, 1e3);
|
|
153
|
+
onBeforeUnmount(() => {
|
|
154
|
+
if (timer) {
|
|
155
|
+
clearInterval(timer);
|
|
156
|
+
timer = null;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
const isRevocation = computed(() => {
|
|
160
|
+
return props.msg.fromAccount === props.myAccid && nowTime.value - props.msg.time <= REVOCATION_INTERVAL;
|
|
161
|
+
});
|
|
137
162
|
const { copy } = useClipboard();
|
|
138
163
|
const emit = __emit;
|
|
139
164
|
const textMsgContextMenuVisible = ref(false);
|
|
@@ -146,13 +171,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
171
|
textMsgContextMenuVisible.value = true;
|
|
147
172
|
}
|
|
148
173
|
function onCopyClick() {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
174
|
+
var _a;
|
|
175
|
+
if (props.msg.type === "text") {
|
|
176
|
+
copy(props.msg.body).then(() => {
|
|
177
|
+
}).catch((err) => {
|
|
178
|
+
console.error("copy error: ", err);
|
|
179
|
+
message.error("复制失败");
|
|
180
|
+
}).finally(() => {
|
|
181
|
+
textMsgContextMenuVisible.value = false;
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
if (props.msg.type === "image") {
|
|
185
|
+
copy((_a = props.msg.attach) == null ? void 0 : _a.url).then(() => {
|
|
186
|
+
}).catch((err) => {
|
|
187
|
+
console.error("copy error: ", err);
|
|
188
|
+
message.error("复制失败");
|
|
189
|
+
}).finally(() => {
|
|
190
|
+
textMsgContextMenuVisible.value = false;
|
|
191
|
+
});
|
|
192
|
+
}
|
|
156
193
|
}
|
|
157
194
|
function onQuoteClick() {
|
|
158
195
|
var _a;
|
|
@@ -171,6 +208,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
171
208
|
emit("quote", msg);
|
|
172
209
|
textMsgContextMenuVisible.value = false;
|
|
173
210
|
}
|
|
211
|
+
const onRevocationClick = () => {
|
|
212
|
+
textMsgContextMenuVisible.value = false;
|
|
213
|
+
if (!isRevocation.value) {
|
|
214
|
+
message.error("消息已超过撤回时间");
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
emit("revokeMessage", props.msg);
|
|
218
|
+
};
|
|
174
219
|
function onQuoteMsgClick() {
|
|
175
220
|
var _a;
|
|
176
221
|
emit("quoteMsgClick", (_a = msgExt.value) == null ? void 0 : _a.quoteMsg);
|
|
@@ -276,159 +321,161 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
276
321
|
}
|
|
277
322
|
};
|
|
278
323
|
return (_ctx, _cache) => {
|
|
279
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
324
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
280
325
|
return openBlock(), createElementBlock("div", {
|
|
281
326
|
class: normalizeClass(["yx-chatCardWrapper", { reverse: __props.msg.fromAccount === __props.myAccid }]),
|
|
282
327
|
"data-msg-id-client": __props.msg.msgIdClient
|
|
283
328
|
}, [
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
createElementVNode("div",
|
|
296
|
-
createElementVNode("div",
|
|
297
|
-
createElementVNode("
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
createElementVNode("div", {
|
|
305
|
-
class: "textMsg flash-target",
|
|
306
|
-
onContextmenu: withModifiers(onTextMsgContextMenu, ["prevent"]),
|
|
307
|
-
innerHTML: textMsgBody.value
|
|
308
|
-
}, null, 40, _hoisted_7)
|
|
309
|
-
], 2)) : __props.msg.type === "file" ? (openBlock(), createElementBlock("div", {
|
|
310
|
-
key: 1,
|
|
311
|
-
class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
|
|
312
|
-
}, [
|
|
313
|
-
createElementVNode("a", {
|
|
314
|
-
class: "fileMsg",
|
|
315
|
-
target: "_blank",
|
|
316
|
-
href: (_b = (_a = __props.msg) == null ? void 0 : _a.attach) == null ? void 0 : _b.url
|
|
329
|
+
((_a = __props.msg.updateOperatorInfo) == null ? void 0 : _a.ps) ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(__props.msg.fromAccount === __props.myAccid ? "你" : `“${__props.msg.fromNick}”`) + " " + toDisplayString((_b = __props.msg.updateOperatorInfo) == null ? void 0 : _b.ps), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
330
|
+
createElementVNode("div", _hoisted_3, [
|
|
331
|
+
createVNode(_sfc_main$1, {
|
|
332
|
+
avatar: myAvatar.value,
|
|
333
|
+
nick: __props.msg.fromNick,
|
|
334
|
+
accid: __props.msg.fromAccount,
|
|
335
|
+
width: 32,
|
|
336
|
+
border: 0,
|
|
337
|
+
style: { "min-width": "32px" }
|
|
338
|
+
}, null, 8, ["avatar", "nick", "accid"])
|
|
339
|
+
]),
|
|
340
|
+
createElementVNode("div", _hoisted_4, [
|
|
341
|
+
createElementVNode("div", null, [
|
|
342
|
+
createElementVNode("div", _hoisted_5, [
|
|
343
|
+
createElementVNode("span", _hoisted_6, toDisplayString(__props.msg.fromNick), 1),
|
|
344
|
+
createElementVNode("span", _hoisted_7, toDisplayString(time.value), 1)
|
|
345
|
+
]),
|
|
346
|
+
__props.msg.type === "text" ? (openBlock(), createElementBlock("div", {
|
|
347
|
+
key: 0,
|
|
348
|
+
class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
|
|
317
349
|
}, [
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
createElementVNode("div", _hoisted_12, [
|
|
377
|
-
createVNode(unref(EyeOutlined))
|
|
350
|
+
createElementVNode("div", {
|
|
351
|
+
class: "textMsg flash-target",
|
|
352
|
+
onContextmenu: withModifiers(onTextMsgContextMenu, ["prevent"]),
|
|
353
|
+
innerHTML: textMsgBody.value
|
|
354
|
+
}, null, 40, _hoisted_8)
|
|
355
|
+
], 2)) : __props.msg.type === "file" ? (openBlock(), createElementBlock("div", {
|
|
356
|
+
key: 1,
|
|
357
|
+
class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
|
|
358
|
+
}, [
|
|
359
|
+
createElementVNode("a", {
|
|
360
|
+
class: "fileMsg",
|
|
361
|
+
target: "_blank",
|
|
362
|
+
href: (_d = (_c = __props.msg) == null ? void 0 : _c.attach) == null ? void 0 : _d.url
|
|
363
|
+
}, [
|
|
364
|
+
ext.value === "pdf" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
365
|
+
key: 0,
|
|
366
|
+
type: "icon-PDF",
|
|
367
|
+
style: { "font-size": "40px" }
|
|
368
|
+
})) : ext.value === "word" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
369
|
+
key: 1,
|
|
370
|
+
type: "icon-Word",
|
|
371
|
+
style: { "font-size": "40px" }
|
|
372
|
+
})) : ext.value === "excel" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
373
|
+
key: 2,
|
|
374
|
+
type: "icon-Excel",
|
|
375
|
+
style: { "font-size": "40px" }
|
|
376
|
+
})) : ext.value === "ppt" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
377
|
+
key: 3,
|
|
378
|
+
type: "icon-PPT",
|
|
379
|
+
style: { "font-size": "40px" }
|
|
380
|
+
})) : ext.value === "zip" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
381
|
+
key: 4,
|
|
382
|
+
type: "icon-RAR1",
|
|
383
|
+
style: { "font-size": "40px" }
|
|
384
|
+
})) : ext.value === "video" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
385
|
+
key: 5,
|
|
386
|
+
type: "icon-shipin",
|
|
387
|
+
style: { "font-size": "40px" }
|
|
388
|
+
})) : ext.value === "audio" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
389
|
+
key: 6,
|
|
390
|
+
type: "icon-yinle",
|
|
391
|
+
style: { "font-size": "40px" }
|
|
392
|
+
})) : ext.value === "img" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
393
|
+
key: 7,
|
|
394
|
+
type: "icon-tupian2",
|
|
395
|
+
style: { "font-size": "40px" }
|
|
396
|
+
})) : ext.value === "txt" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
397
|
+
key: 8,
|
|
398
|
+
type: "icon-qita",
|
|
399
|
+
style: { "font-size": "40px" }
|
|
400
|
+
})) : (openBlock(), createBlock(unref(FileIconFont), {
|
|
401
|
+
key: 9,
|
|
402
|
+
type: "icon-weizhiwenjian",
|
|
403
|
+
style: { "font-size": "40px" }
|
|
404
|
+
})),
|
|
405
|
+
createElementVNode("div", _hoisted_10, [
|
|
406
|
+
createElementVNode("div", _hoisted_11, toDisplayString((_f = (_e = __props.msg) == null ? void 0 : _e.attach) == null ? void 0 : _f.name), 1),
|
|
407
|
+
createElementVNode("div", _hoisted_12, toDisplayString(size.value), 1)
|
|
378
408
|
])
|
|
379
|
-
])
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
|
|
385
|
-
}, [..._cache[1] || (_cache[1] = [
|
|
386
|
-
createElementVNode("div", { class: "textMsg" }, toDisplayString("暂不支持该消息"), -1)
|
|
387
|
-
])], 2)),
|
|
388
|
-
((_g = msgExt.value) == null ? void 0 : _g.quoteMsg) ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
389
|
-
createElementVNode("div", {
|
|
390
|
-
class: "chatCardQuoteMsg",
|
|
391
|
-
onClick: onQuoteMsgClick
|
|
409
|
+
], 8, _hoisted_9)
|
|
410
|
+
], 2)) : __props.msg.type === "image" ? (openBlock(), createElementBlock("div", {
|
|
411
|
+
key: 2,
|
|
412
|
+
class: normalizeClass(["chatCardMainContent flash-target", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }]),
|
|
413
|
+
onContextmenu: withModifiers(onTextMsgContextMenu, ["prevent"])
|
|
392
414
|
}, [
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}, null, 8, _hoisted_15)) : createCommentVNode("", true),
|
|
399
|
-
msgExt.value.quoteMsg.type === "image" ? (openBlock(), createBlock(unref(Image), {
|
|
400
|
-
key: 1,
|
|
401
|
-
class: "imgMsg quoteMsgImg",
|
|
402
|
-
src: (_h = msgExt.value.quoteMsg.attach) == null ? void 0 : _h.url,
|
|
403
|
-
width: quoteImageMsgSize.value.width,
|
|
404
|
-
height: quoteImageMsgSize.value.height,
|
|
405
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
406
|
-
}, ["stop", "prevent"]))
|
|
415
|
+
createVNode(unref(Image), {
|
|
416
|
+
class: "imgMsg",
|
|
417
|
+
src: (_h = (_g = __props.msg) == null ? void 0 : _g.attach) == null ? void 0 : _h.url,
|
|
418
|
+
width: imageMsgSize.value.width,
|
|
419
|
+
height: imageMsgSize.value.height
|
|
407
420
|
}, {
|
|
408
421
|
previewMask: withCtx(() => [
|
|
409
|
-
createElementVNode("div",
|
|
422
|
+
createElementVNode("div", _hoisted_13, [
|
|
410
423
|
createVNode(unref(EyeOutlined))
|
|
411
424
|
])
|
|
412
425
|
]),
|
|
413
426
|
_: 1
|
|
414
|
-
}, 8, ["src", "width", "height"])
|
|
415
|
-
])
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
427
|
+
}, 8, ["src", "width", "height"])
|
|
428
|
+
], 34)) : (openBlock(), createElementBlock("div", {
|
|
429
|
+
key: 3,
|
|
430
|
+
class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
|
|
431
|
+
}, [..._cache[1] || (_cache[1] = [
|
|
432
|
+
createElementVNode("div", { class: "textMsg" }, toDisplayString("暂不支持该消息"), -1)
|
|
433
|
+
])], 2)),
|
|
434
|
+
((_i = msgExt.value) == null ? void 0 : _i.quoteMsg) ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
435
|
+
createElementVNode("div", {
|
|
436
|
+
class: "chatCardQuoteMsg",
|
|
437
|
+
onClick: onQuoteMsgClick
|
|
438
|
+
}, [
|
|
439
|
+
createElementVNode("div", _hoisted_15, toDisplayString(msgExt.value.quoteMsg.fromNick) + ":", 1),
|
|
440
|
+
msgExt.value.quoteMsg.body ? (openBlock(), createElementBlock("div", {
|
|
441
|
+
key: 0,
|
|
442
|
+
class: "quoteMsgText",
|
|
443
|
+
innerHTML: msgExt.value.quoteMsg.body
|
|
444
|
+
}, null, 8, _hoisted_16)) : createCommentVNode("", true),
|
|
445
|
+
msgExt.value.quoteMsg.type === "image" ? (openBlock(), createBlock(unref(Image), {
|
|
446
|
+
key: 1,
|
|
447
|
+
class: "imgMsg quoteMsgImg",
|
|
448
|
+
src: (_j = msgExt.value.quoteMsg.attach) == null ? void 0 : _j.url,
|
|
449
|
+
width: quoteImageMsgSize.value.width,
|
|
450
|
+
height: quoteImageMsgSize.value.height,
|
|
451
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
452
|
+
}, ["stop", "prevent"]))
|
|
453
|
+
}, {
|
|
454
|
+
previewMask: withCtx(() => [
|
|
455
|
+
createElementVNode("div", _hoisted_17, [
|
|
456
|
+
createVNode(unref(EyeOutlined))
|
|
457
|
+
])
|
|
458
|
+
]),
|
|
459
|
+
_: 1
|
|
460
|
+
}, 8, ["src", "width", "height"])) : createCommentVNode("", true)
|
|
461
|
+
])
|
|
462
|
+
])) : createCommentVNode("", true)
|
|
463
|
+
]),
|
|
464
|
+
createElementVNode("div", _hoisted_18, [
|
|
465
|
+
__props.msg.deliveryStatus === "failed" ? (openBlock(), createBlock(unref(Button), {
|
|
466
|
+
key: 0,
|
|
467
|
+
type: "text",
|
|
468
|
+
danger: "",
|
|
469
|
+
onClick: resendHandler
|
|
470
|
+
}, {
|
|
471
|
+
icon: withCtx(() => [
|
|
472
|
+
createVNode(unref(ExclamationCircleFilled))
|
|
473
|
+
]),
|
|
474
|
+
_: 1
|
|
475
|
+
})) : __props.msg.deliveryStatus === "sending" ? (openBlock(), createBlock(unref(LoadingOutlined), { key: 1 })) : createCommentVNode("", true)
|
|
476
|
+
])
|
|
430
477
|
])
|
|
431
|
-
]),
|
|
478
|
+
], 64)),
|
|
432
479
|
withDirectives(createElementVNode("div", {
|
|
433
480
|
ref_key: "textMsgContextMenuRef",
|
|
434
481
|
ref: textMsgContextMenuRef,
|
|
@@ -442,7 +489,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
442
489
|
createElementVNode("div", {
|
|
443
490
|
class: "yx-chatCardTextMsgContextMenu-item",
|
|
444
491
|
onClick: onQuoteClick
|
|
445
|
-
}, "引用")
|
|
492
|
+
}, "引用"),
|
|
493
|
+
isRevocation.value ? (openBlock(), createElementBlock("div", {
|
|
494
|
+
key: 0,
|
|
495
|
+
class: "yx-chatCardTextMsgContextMenu-item",
|
|
496
|
+
onClick: onRevocationClick
|
|
497
|
+
}, " 撤回 ")) : createCommentVNode("", true)
|
|
446
498
|
], 4), [
|
|
447
499
|
[vShow, textMsgContextMenuVisible.value]
|
|
448
500
|
])
|