yx-web-sdk 0.0.22 → 0.0.23
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-content/index.vue.d.ts +2 -2
- package/dist/index/style4.css +1 -0
- package/dist/{index-CGhpFXlD.mjs → index-C4E0XZdw.mjs} +1 -1
- package/dist/{index-Dwglj7_M.mjs → index-CwFsDdl5.mjs} +1 -1
- package/dist/{index-BPnLB3av.mjs → index-DDCNub37.mjs} +1 -1
- package/dist/index-entry/index.js +4 -4
- package/dist/{index.vue_vue_type_script_setup_true_lang-CD6o8jT4.mjs → index.vue_vue_type_script_setup_true_lang-B4HvNhJp.mjs} +5 -4
- package/dist/{index.vue_vue_type_style_index_0_lang-iBkYSdDj.mjs → index.vue_vue_type_style_index_0_lang-BN-dkKAR.mjs} +29 -12
- package/dist/{index.vue_vue_type_style_index_0_lang-BJGCxPce.mjs → index.vue_vue_type_style_index_0_lang-CtXuRziq.mjs} +3 -3
- package/dist/{index.vue_vue_type_style_index_0_lang-CsNgkPt9.mjs → index.vue_vue_type_style_index_0_lang-DOnNj1Mm.mjs} +3 -2
- package/dist/{index.vue_vue_type_style_index_0_lang-BaKNB-4q.mjs → index.vue_vue_type_style_index_0_lang-Dx16RQv1.mjs} +1 -0
- package/dist/members-sidebar/index.js +1 -1
- package/dist/server-channel-sidebar/index.js +1 -1
- package/dist/stores/channel.d.ts +1 -0
- package/dist/style.css +1 -0
- package/dist/yx-web-sdk.es.js +32 -12
- package/dist/yx-web-sdk.umd.js +32 -12
- package/package.json +1 -1
package/dist/chat-card/index.js
CHANGED
package/dist/chat-page/index.js
CHANGED
package/dist/chat-room/index.js
CHANGED
|
@@ -27,14 +27,14 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
27
27
|
resendImg: (msg: QChatMessage) => any;
|
|
28
28
|
resendFile: (msg: QChatMessage) => any;
|
|
29
29
|
sendText: (text: string, option?: SendMsgOption | undefined) => any;
|
|
30
|
-
sendImg: (file: File) => any;
|
|
30
|
+
sendImg: (file: File, option?: SendMsgOption | undefined) => any;
|
|
31
31
|
sendFile: (file: File) => any;
|
|
32
32
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
33
33
|
onResendText?: ((msg: QChatMessage) => any) | undefined;
|
|
34
34
|
onResendImg?: ((msg: QChatMessage) => any) | undefined;
|
|
35
35
|
onResendFile?: ((msg: QChatMessage) => any) | undefined;
|
|
36
36
|
onSendText?: ((text: string, option?: SendMsgOption | undefined) => any) | undefined;
|
|
37
|
-
onSendImg?: ((file: File) => any) | undefined;
|
|
37
|
+
onSendImg?: ((file: File, option?: SendMsgOption | undefined) => any) | undefined;
|
|
38
38
|
onSendFile?: ((file: File) => any) | undefined;
|
|
39
39
|
}>, {
|
|
40
40
|
topic: string;
|
package/dist/index/style4.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode, defineComponent, ref, computed, watch, onUnmounted, openBlock, createElementBlock, normalizeClass, createElementVNode, unref, Fragment, renderList, withCtx, toDisplayString, createBlock, createCommentVNode, normalizeStyle, withModifiers, createTextVNode } from "vue";
|
|
2
2
|
import { Form, Tooltip, Badge, Modal, Input, Button, message } from "ant-design-vue";
|
|
3
|
-
import { c as useImSdkStore, a as useServerStore, u as useChannelStore, b as useUserStore, _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { c as useImSdkStore, a as useServerStore, u as useChannelStore, b as useUserStore, _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-Dx16RQv1.mjs";
|
|
4
4
|
import { I as IconFont } from "./index-L_drmZir.mjs";
|
|
5
5
|
import { I as Icon } from "./AntdIcon-DdvEPKFJ.mjs";
|
|
6
6
|
import { C as CloseOutlined } from "./CloseOutlined-BEcmJaCc.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, onBeforeUnmount, computed, openBlock, createBlock, Teleport, withDirectives, createElementVNode, normalizeStyle, createElementBlock, withModifiers, normalizeClass, toDisplayString, createCommentVNode, Fragment, renderList, createVNode, vShow } from "vue";
|
|
2
2
|
import { autoUpdate, computePosition, offset, flip, shift } from "@floating-ui/dom";
|
|
3
|
-
import { _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-Dx16RQv1.mjs";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
5
5
|
const _hoisted_1 = { class: "ait-person-popover-content" };
|
|
6
6
|
const _hoisted_2 = ["onMousedown"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode, defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, unref, withCtx, createBlock, Fragment, renderList } from "vue";
|
|
2
2
|
import { Tooltip, Spin } from "ant-design-vue";
|
|
3
|
-
import { u as useChannelStore, a as useServerStore, _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import { u as useChannelStore, a as useServerStore, _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-Dx16RQv1.mjs";
|
|
4
4
|
import { I as IconFont } from "./index-L_drmZir.mjs";
|
|
5
5
|
import { I as Icon } from "./AntdIcon-DdvEPKFJ.mjs";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, onMounted, onUnmounted, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, createElementVNode, Fragment, createBlock, createCommentVNode } from "vue";
|
|
2
2
|
import { useRouter } from "vue-router";
|
|
3
3
|
import { Spin, Result, Button, Empty, message } from "ant-design-vue";
|
|
4
|
-
import { s as setGlobalRequest, c as useImSdkStore, a as useServerStore, u as useChannelStore, b as useUserStore, d as useGlobalStore } from "../index.vue_vue_type_style_index_0_lang-
|
|
5
|
-
import { _ as _sfc_main$1 } from "../index.vue_vue_type_style_index_0_lang-
|
|
6
|
-
import { S as ServerChannelSidebar } from "../index-
|
|
7
|
-
import { M as MembersSidebar } from "../index-
|
|
4
|
+
import { s as setGlobalRequest, c as useImSdkStore, a as useServerStore, u as useChannelStore, b as useUserStore, d as useGlobalStore } from "../index.vue_vue_type_style_index_0_lang-Dx16RQv1.mjs";
|
|
5
|
+
import { _ as _sfc_main$1 } from "../index.vue_vue_type_style_index_0_lang-CtXuRziq.mjs";
|
|
6
|
+
import { S as ServerChannelSidebar } from "../index-C4E0XZdw.mjs";
|
|
7
|
+
import { M as MembersSidebar } from "../index-DDCNub37.mjs";
|
|
8
8
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
9
9
|
const _imports_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAB2lSURBVHgB7V17jF5Vtd9n2kJLOzPtUEpppyAoEdp7DT4SgUvCH+bWC5r4h20v8RUDNvGZWIpoNELt9Q8NhRKfMTw0ogRpMSExVwGjMXpv8ZGgjS3GSCG0PArclk5fU0pn37X27N+e31lnn2/K+b6ZGj0r+XrO2Wfvtdd7rb33fF+da6GFFlpooYUWWmihhRZaaKGFFlpooYUWWmihhRZaaKGFFlpo4R8RCnfqoE8+8+Rz+uzZs88YHR3V59Pk49Hh9NNPrww6duxYao/3hVy9tuEd94n4wGdhnj3hLWQMnhNOc19HS8IpbWPCz/GiKF49evTo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|
10
10
|
const _hoisted_1 = { class: "qchat-container" };
|
|
@@ -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 { u as useChannelStore, a as useServerStore, b 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-BN-dkKAR.mjs";
|
|
3
|
+
import { u as useChannelStore, a as useServerStore, b as useUserStore } from "./index.vue_vue_type_style_index_0_lang-Dx16RQv1.mjs";
|
|
4
4
|
const _hoisted_1 = { key: 1 };
|
|
5
5
|
const HISTORY_LIMIT = 100;
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -67,6 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
imgUploading.value = true;
|
|
68
68
|
channelStore.sendImageMsg({
|
|
69
69
|
file,
|
|
70
|
+
ext: option == null ? void 0 : option.ext,
|
|
70
71
|
onUploadStart: () => {
|
|
71
72
|
imgUploading.value = true;
|
|
72
73
|
},
|
|
@@ -112,8 +113,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
112
113
|
const handleSendText = (text, option) => {
|
|
113
114
|
checkSendAuth("textMsg", text, option);
|
|
114
115
|
};
|
|
115
|
-
const handleSendImg = (file) => {
|
|
116
|
-
checkSendAuth("SendImg", file);
|
|
116
|
+
const handleSendImg = (file, option) => {
|
|
117
|
+
checkSendAuth("SendImg", file, option);
|
|
117
118
|
};
|
|
118
119
|
const handleSendFile = (file) => {
|
|
119
120
|
checkSendAuth("SendFile", file);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createVNode, ref, computed, watch, nextTick, defineComponent, openBlock, createElementBlock, createElementVNode, normalizeStyle, unref, normalizeClass, createBlock, createCommentVNode, 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, a as _sfc_main$3 } from "./index.vue_vue_type_style_index_0_lang-
|
|
4
|
+
import { A as AitPersonPopover } from "./index-CwFsDdl5.mjs";
|
|
5
|
+
import { L as LoadingOutlined, _ as _sfc_main$2, a as _sfc_main$3 } from "./index.vue_vue_type_style_index_0_lang-DOnNj1Mm.mjs";
|
|
6
6
|
import { _ as _sfc_main$1 } from "./index.vue_vue_type_style_index_0_lang-BxXBf_VA.mjs";
|
|
7
|
-
import { a as useServerStore, g as getServerMembersByAccids, u 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, u as useChannelStore, e as getImageMsgDisplaySize, f as filterStr, i as isLt } from "./index.vue_vue_type_style_index_0_lang-Dx16RQv1.mjs";
|
|
8
8
|
import { useEventListener, useDebounceFn } from "@vueuse/core";
|
|
9
9
|
import { C as CloseOutlined } from "./CloseOutlined-BEcmJaCc.mjs";
|
|
10
10
|
import { I as Icon } from "./AntdIcon-DdvEPKFJ.mjs";
|
|
@@ -499,6 +499,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
499
499
|
setup(__props, { emit: __emit }) {
|
|
500
500
|
const router = useRouter();
|
|
501
501
|
const channelStore = useChannelStore();
|
|
502
|
+
const IMG_EXT = ["png", "jpg", "jpeg"];
|
|
502
503
|
const Textarea = Input.TextArea;
|
|
503
504
|
const props = __props;
|
|
504
505
|
const emit = __emit;
|
|
@@ -706,21 +707,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
706
707
|
}
|
|
707
708
|
};
|
|
708
709
|
const handleSendText = () => {
|
|
710
|
+
var _a;
|
|
709
711
|
const text = filterStr(curText.value.trim());
|
|
710
712
|
if (text) {
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
713
|
+
if (attachment.value) {
|
|
714
|
+
delete attachment.value.__file;
|
|
715
|
+
}
|
|
716
|
+
const sendOption = {
|
|
715
717
|
mentionAccids: mentionAccids.value,
|
|
716
718
|
attach: attachment.value
|
|
717
719
|
// 传递附件
|
|
718
|
-
}
|
|
720
|
+
};
|
|
721
|
+
if (quoteMsg.value) {
|
|
722
|
+
sendOption.ext = { quoteMsg: quoteMsg.value };
|
|
723
|
+
}
|
|
724
|
+
emit("sendText", text, sendOption);
|
|
719
725
|
curText.value = "";
|
|
720
726
|
quoteMsg.value = void 0;
|
|
721
727
|
attachment.value = void 0;
|
|
722
728
|
scrollToBottomAfterSend();
|
|
723
729
|
}
|
|
730
|
+
if (attachment.value && IMG_EXT.includes(attachment.value.ext) && ((_a = attachment.value) == null ? void 0 : _a.__file)) {
|
|
731
|
+
let sendOption;
|
|
732
|
+
if (quoteMsg.value) {
|
|
733
|
+
sendOption = { ext: { quoteMsg: quoteMsg.value } };
|
|
734
|
+
}
|
|
735
|
+
emit("sendImg", attachment.value.__file, sendOption);
|
|
736
|
+
quoteMsg.value = void 0;
|
|
737
|
+
attachment.value = void 0;
|
|
738
|
+
scrollToBottomAfterSend();
|
|
739
|
+
}
|
|
724
740
|
};
|
|
725
741
|
const scrollHandler = async (e) => {
|
|
726
742
|
var _a;
|
|
@@ -779,7 +795,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
779
795
|
};
|
|
780
796
|
const uploadImgHandler = async (file) => {
|
|
781
797
|
if (!isLt(file.size, MAX_IMG_SIZE)) {
|
|
782
|
-
message.error(`图片大小最大支持${MAX_IMG_SIZE}
|
|
798
|
+
message.error(`图片大小最大支持${MAX_IMG_SIZE}MB`);
|
|
783
799
|
return false;
|
|
784
800
|
}
|
|
785
801
|
attachmentUploading.value = true;
|
|
@@ -793,6 +809,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
793
809
|
attachmentUploading.value = false;
|
|
794
810
|
}
|
|
795
811
|
});
|
|
812
|
+
uploadResult.__file = file;
|
|
796
813
|
attachment.value = uploadResult;
|
|
797
814
|
} catch (error) {
|
|
798
815
|
console.error("上传图片失败:", error);
|
|
@@ -1038,7 +1055,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1038
1055
|
])) : createCommentVNode("", true)
|
|
1039
1056
|
])) : createCommentVNode("", true),
|
|
1040
1057
|
attachment.value ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
1041
|
-
|
|
1058
|
+
IMG_EXT.includes(attachment.value.ext || "") && attachment.value.url ? (openBlock(), createElementBlock("div", _hoisted_15, [
|
|
1042
1059
|
createElementVNode("div", _hoisted_16, [
|
|
1043
1060
|
createVNode(unref(DeleteOutlined), {
|
|
1044
1061
|
class: "chatroomInputAttachmentDeleteBtn",
|
|
@@ -1113,7 +1130,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1113
1130
|
createVNode(unref(Upload), {
|
|
1114
1131
|
"before-upload": uploadImgHandler,
|
|
1115
1132
|
"show-upload-list": false,
|
|
1116
|
-
accept:
|
|
1133
|
+
accept: IMG_EXT.map((ext) => `.${ext}`).join(","),
|
|
1117
1134
|
disabled: __props.sendDisabled || attachmentUploading.value,
|
|
1118
1135
|
class: "chatroomInputUpload"
|
|
1119
1136
|
}, {
|
|
@@ -1148,7 +1165,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1148
1165
|
}, 8, ["loading", "disabled"])
|
|
1149
1166
|
]),
|
|
1150
1167
|
_: 1
|
|
1151
|
-
}, 8, ["disabled"]),
|
|
1168
|
+
}, 8, ["accept", "disabled"]),
|
|
1152
1169
|
_cache[6] || (_cache[6] = createElementVNode("span", { class: "lineSeparator" }, null, -1)),
|
|
1153
1170
|
createVNode(unref(Button), {
|
|
1154
1171
|
class: "chatroomButtonArrowUp",
|
|
@@ -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, u 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-B4HvNhJp.mjs";
|
|
4
|
+
import { a as useServerStore, u as useChannelStore } from "./index.vue_vue_type_style_index_0_lang-Dx16RQv1.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-DOnNj1Mm.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
1
|
import { createVNode, defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, ref, onBeforeUnmount, computed, watch, nextTick, normalizeClass, Fragment, withModifiers, createBlock, 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 { h as getMByteSize, a as useServerStore, p as parseFileSize, m as matchExt, e as getImageMsgDisplaySize, _ as _sfc_main$2 } from "./index.vue_vue_type_style_index_0_lang-
|
|
4
|
+
import { h as getMByteSize, a as useServerStore, p as parseFileSize, m as matchExt, e as getImageMsgDisplaySize, _ as _sfc_main$2 } from "./index.vue_vue_type_style_index_0_lang-Dx16RQv1.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";
|
|
@@ -197,6 +197,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
197
197
|
emits: ["resendText", "resendImg", "resendFile", "quote", "contextMenuSwitch", "quoteMsgClick", "revokeMessage"],
|
|
198
198
|
setup(__props, { emit: __emit }) {
|
|
199
199
|
const serverStore = useServerStore();
|
|
200
|
+
const IMG_EXT = ["png", "jpg", "jpeg"];
|
|
200
201
|
const props = __props;
|
|
201
202
|
const nowTime = ref(Date.now());
|
|
202
203
|
let timer = null;
|
|
@@ -490,7 +491,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
490
491
|
}, [..._cache[1] || (_cache[1] = [
|
|
491
492
|
createElementVNode("div", { class: "textMsg" }, toDisplayString("暂不支持该消息"), -1)
|
|
492
493
|
])], 2)),
|
|
493
|
-
__props.msg.type === "text" &&
|
|
494
|
+
__props.msg.type === "text" && IMG_EXT.includes(((_j = (_i = __props.msg) == null ? void 0 : _i.attach) == null ? void 0 : _j.ext) || "") ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
494
495
|
((_l = (_k = __props.msg) == null ? void 0 : _k.attach) == null ? void 0 : _l.size) && ((_n = (_m = __props.msg) == null ? void 0 : _m.attach) == null ? void 0 : _n.size) < MAX_IMG_PREVIEW_SIZE ? (openBlock(), createBlock(unref(Image), {
|
|
495
496
|
key: 0,
|
|
496
497
|
class: "imgMsg",
|
|
@@ -36829,6 +36829,7 @@ const useChannelStore = defineStore("channel", {
|
|
|
36829
36829
|
channelId: this.currentChannel.channelId,
|
|
36830
36830
|
type: "image",
|
|
36831
36831
|
file: options.file,
|
|
36832
|
+
ext: (options == null ? void 0 : options.ext) ? JSON.stringify(options == null ? void 0 : options.ext) : void 0,
|
|
36832
36833
|
onUploadStart: options.onUploadStart,
|
|
36833
36834
|
onUploadDone: options.onUploadDone,
|
|
36834
36835
|
onSendBefore: (msg2) => {
|
package/dist/stores/channel.d.ts
CHANGED
|
@@ -134,6 +134,7 @@ export declare const useChannelStore: import("pinia").StoreDefinition<"channel",
|
|
|
134
134
|
}): Promise<void>;
|
|
135
135
|
sendImageMsg(options: {
|
|
136
136
|
file: IUploadFileOptions["file"];
|
|
137
|
+
ext?: SendMsgOption["ext"];
|
|
137
138
|
onUploadStart: IUploadFileOptions["onUploadStart"];
|
|
138
139
|
onUploadDone: IUploadFileOptions["onUploadDone"];
|
|
139
140
|
}): Promise<void>;
|
package/dist/style.css
CHANGED
package/dist/yx-web-sdk.es.js
CHANGED
|
@@ -38436,6 +38436,7 @@ const useChannelStore = defineStore("channel", {
|
|
|
38436
38436
|
channelId: this.currentChannel.channelId,
|
|
38437
38437
|
type: "image",
|
|
38438
38438
|
file: options.file,
|
|
38439
|
+
ext: (options == null ? void 0 : options.ext) ? JSON.stringify(options == null ? void 0 : options.ext) : void 0,
|
|
38439
38440
|
onUploadStart: options.onUploadStart,
|
|
38440
38441
|
onUploadDone: options.onUploadDone,
|
|
38441
38442
|
onSendBefore: (msg2) => {
|
|
@@ -38880,6 +38881,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
38880
38881
|
emits: ["resendText", "resendImg", "resendFile", "quote", "contextMenuSwitch", "quoteMsgClick", "revokeMessage"],
|
|
38881
38882
|
setup(__props, { emit: __emit }) {
|
|
38882
38883
|
const serverStore = useServerStore();
|
|
38884
|
+
const IMG_EXT = ["png", "jpg", "jpeg"];
|
|
38883
38885
|
const props = __props;
|
|
38884
38886
|
const nowTime = ref(Date.now());
|
|
38885
38887
|
let timer = null;
|
|
@@ -39176,7 +39178,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
39176
39178
|
}, [..._cache[1] || (_cache[1] = [
|
|
39177
39179
|
createElementVNode("div", { class: "textMsg" }, toDisplayString("暂不支持该消息"), -1)
|
|
39178
39180
|
])], 2)),
|
|
39179
|
-
__props.msg.type === "text" &&
|
|
39181
|
+
__props.msg.type === "text" && IMG_EXT.includes(((_j = (_i = __props.msg) == null ? void 0 : _i.attach) == null ? void 0 : _j.ext) || "") ? (openBlock(), createElementBlock("div", _hoisted_14$3, [
|
|
39180
39182
|
((_l = (_k = __props.msg) == null ? void 0 : _k.attach) == null ? void 0 : _l.size) && ((_n = (_m = __props.msg) == null ? void 0 : _m.attach) == null ? void 0 : _n.size) < MAX_IMG_PREVIEW_SIZE ? (openBlock(), createBlock(unref(Image), {
|
|
39181
39183
|
key: 0,
|
|
39182
39184
|
class: "imgMsg",
|
|
@@ -39974,6 +39976,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
39974
39976
|
setup(__props, { emit: __emit }) {
|
|
39975
39977
|
const router = useRouter();
|
|
39976
39978
|
const channelStore = useChannelStore();
|
|
39979
|
+
const IMG_EXT = ["png", "jpg", "jpeg"];
|
|
39977
39980
|
const Textarea = Input.TextArea;
|
|
39978
39981
|
const props = __props;
|
|
39979
39982
|
const emit = __emit;
|
|
@@ -40181,21 +40184,36 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
40181
40184
|
}
|
|
40182
40185
|
};
|
|
40183
40186
|
const handleSendText = () => {
|
|
40187
|
+
var _a;
|
|
40184
40188
|
const text = filterStr(curText.value.trim());
|
|
40185
40189
|
if (text) {
|
|
40186
|
-
|
|
40187
|
-
|
|
40188
|
-
|
|
40189
|
-
|
|
40190
|
+
if (attachment.value) {
|
|
40191
|
+
delete attachment.value.__file;
|
|
40192
|
+
}
|
|
40193
|
+
const sendOption = {
|
|
40190
40194
|
mentionAccids: mentionAccids.value,
|
|
40191
40195
|
attach: attachment.value
|
|
40192
40196
|
// 传递附件
|
|
40193
|
-
}
|
|
40197
|
+
};
|
|
40198
|
+
if (quoteMsg.value) {
|
|
40199
|
+
sendOption.ext = { quoteMsg: quoteMsg.value };
|
|
40200
|
+
}
|
|
40201
|
+
emit("sendText", text, sendOption);
|
|
40194
40202
|
curText.value = "";
|
|
40195
40203
|
quoteMsg.value = void 0;
|
|
40196
40204
|
attachment.value = void 0;
|
|
40197
40205
|
scrollToBottomAfterSend();
|
|
40198
40206
|
}
|
|
40207
|
+
if (attachment.value && IMG_EXT.includes(attachment.value.ext) && ((_a = attachment.value) == null ? void 0 : _a.__file)) {
|
|
40208
|
+
let sendOption;
|
|
40209
|
+
if (quoteMsg.value) {
|
|
40210
|
+
sendOption = { ext: { quoteMsg: quoteMsg.value } };
|
|
40211
|
+
}
|
|
40212
|
+
emit("sendImg", attachment.value.__file, sendOption);
|
|
40213
|
+
quoteMsg.value = void 0;
|
|
40214
|
+
attachment.value = void 0;
|
|
40215
|
+
scrollToBottomAfterSend();
|
|
40216
|
+
}
|
|
40199
40217
|
};
|
|
40200
40218
|
const scrollHandler = async (e) => {
|
|
40201
40219
|
var _a;
|
|
@@ -40254,7 +40272,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
40254
40272
|
};
|
|
40255
40273
|
const uploadImgHandler = async (file) => {
|
|
40256
40274
|
if (!isLt(file.size, MAX_IMG_SIZE)) {
|
|
40257
|
-
message.error(`图片大小最大支持${MAX_IMG_SIZE}
|
|
40275
|
+
message.error(`图片大小最大支持${MAX_IMG_SIZE}MB`);
|
|
40258
40276
|
return false;
|
|
40259
40277
|
}
|
|
40260
40278
|
attachmentUploading.value = true;
|
|
@@ -40268,6 +40286,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
40268
40286
|
attachmentUploading.value = false;
|
|
40269
40287
|
}
|
|
40270
40288
|
});
|
|
40289
|
+
uploadResult.__file = file;
|
|
40271
40290
|
attachment.value = uploadResult;
|
|
40272
40291
|
} catch (error) {
|
|
40273
40292
|
console.error("上传图片失败:", error);
|
|
@@ -40513,7 +40532,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
40513
40532
|
])) : createCommentVNode("", true)
|
|
40514
40533
|
])) : createCommentVNode("", true),
|
|
40515
40534
|
attachment.value ? (openBlock(), createElementBlock("div", _hoisted_14$2, [
|
|
40516
|
-
|
|
40535
|
+
IMG_EXT.includes(attachment.value.ext || "") && attachment.value.url ? (openBlock(), createElementBlock("div", _hoisted_15$2, [
|
|
40517
40536
|
createElementVNode("div", _hoisted_16$1, [
|
|
40518
40537
|
createVNode(unref(DeleteOutlined), {
|
|
40519
40538
|
class: "chatroomInputAttachmentDeleteBtn",
|
|
@@ -40588,7 +40607,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
40588
40607
|
createVNode(unref(Upload), {
|
|
40589
40608
|
"before-upload": uploadImgHandler,
|
|
40590
40609
|
"show-upload-list": false,
|
|
40591
|
-
accept:
|
|
40610
|
+
accept: IMG_EXT.map((ext) => `.${ext}`).join(","),
|
|
40592
40611
|
disabled: __props.sendDisabled || attachmentUploading.value,
|
|
40593
40612
|
class: "chatroomInputUpload"
|
|
40594
40613
|
}, {
|
|
@@ -40623,7 +40642,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
40623
40642
|
}, 8, ["loading", "disabled"])
|
|
40624
40643
|
]),
|
|
40625
40644
|
_: 1
|
|
40626
|
-
}, 8, ["disabled"]),
|
|
40645
|
+
}, 8, ["accept", "disabled"]),
|
|
40627
40646
|
_cache[6] || (_cache[6] = createElementVNode("span", { class: "lineSeparator" }, null, -1)),
|
|
40628
40647
|
createVNode(unref(Button), {
|
|
40629
40648
|
class: "chatroomButtonArrowUp",
|
|
@@ -40736,6 +40755,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
40736
40755
|
imgUploading.value = true;
|
|
40737
40756
|
channelStore.sendImageMsg({
|
|
40738
40757
|
file,
|
|
40758
|
+
ext: option == null ? void 0 : option.ext,
|
|
40739
40759
|
onUploadStart: () => {
|
|
40740
40760
|
imgUploading.value = true;
|
|
40741
40761
|
},
|
|
@@ -40781,8 +40801,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
40781
40801
|
const handleSendText = (text, option) => {
|
|
40782
40802
|
checkSendAuth("textMsg", text, option);
|
|
40783
40803
|
};
|
|
40784
|
-
const handleSendImg = (file) => {
|
|
40785
|
-
checkSendAuth("SendImg", file);
|
|
40804
|
+
const handleSendImg = (file, option) => {
|
|
40805
|
+
checkSendAuth("SendImg", file, option);
|
|
40786
40806
|
};
|
|
40787
40807
|
const handleSendFile = (file) => {
|
|
40788
40808
|
checkSendAuth("SendFile", file);
|
package/dist/yx-web-sdk.umd.js
CHANGED
|
@@ -38433,6 +38433,7 @@
|
|
|
38433
38433
|
channelId: this.currentChannel.channelId,
|
|
38434
38434
|
type: "image",
|
|
38435
38435
|
file: options.file,
|
|
38436
|
+
ext: (options == null ? void 0 : options.ext) ? JSON.stringify(options == null ? void 0 : options.ext) : void 0,
|
|
38436
38437
|
onUploadStart: options.onUploadStart,
|
|
38437
38438
|
onUploadDone: options.onUploadDone,
|
|
38438
38439
|
onSendBefore: (msg2) => {
|
|
@@ -38877,6 +38878,7 @@
|
|
|
38877
38878
|
emits: ["resendText", "resendImg", "resendFile", "quote", "contextMenuSwitch", "quoteMsgClick", "revokeMessage"],
|
|
38878
38879
|
setup(__props, { emit: __emit }) {
|
|
38879
38880
|
const serverStore = useServerStore();
|
|
38881
|
+
const IMG_EXT = ["png", "jpg", "jpeg"];
|
|
38880
38882
|
const props = __props;
|
|
38881
38883
|
const nowTime = vue.ref(Date.now());
|
|
38882
38884
|
let timer = null;
|
|
@@ -39173,7 +39175,7 @@
|
|
|
39173
39175
|
}, [..._cache[1] || (_cache[1] = [
|
|
39174
39176
|
vue.createElementVNode("div", { class: "textMsg" }, vue.toDisplayString("暂不支持该消息"), -1)
|
|
39175
39177
|
])], 2)),
|
|
39176
|
-
__props.msg.type === "text" &&
|
|
39178
|
+
__props.msg.type === "text" && IMG_EXT.includes(((_j = (_i = __props.msg) == null ? void 0 : _i.attach) == null ? void 0 : _j.ext) || "") ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14$3, [
|
|
39177
39179
|
((_l = (_k = __props.msg) == null ? void 0 : _k.attach) == null ? void 0 : _l.size) && ((_n = (_m = __props.msg) == null ? void 0 : _m.attach) == null ? void 0 : _n.size) < MAX_IMG_PREVIEW_SIZE ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Image), {
|
|
39178
39180
|
key: 0,
|
|
39179
39181
|
class: "imgMsg",
|
|
@@ -39971,6 +39973,7 @@
|
|
|
39971
39973
|
setup(__props, { emit: __emit }) {
|
|
39972
39974
|
const router = vueRouter.useRouter();
|
|
39973
39975
|
const channelStore = useChannelStore();
|
|
39976
|
+
const IMG_EXT = ["png", "jpg", "jpeg"];
|
|
39974
39977
|
const Textarea = antDesignVue.Input.TextArea;
|
|
39975
39978
|
const props = __props;
|
|
39976
39979
|
const emit = __emit;
|
|
@@ -40178,21 +40181,36 @@
|
|
|
40178
40181
|
}
|
|
40179
40182
|
};
|
|
40180
40183
|
const handleSendText = () => {
|
|
40184
|
+
var _a;
|
|
40181
40185
|
const text = filterStr(curText.value.trim());
|
|
40182
40186
|
if (text) {
|
|
40183
|
-
|
|
40184
|
-
|
|
40185
|
-
|
|
40186
|
-
|
|
40187
|
+
if (attachment.value) {
|
|
40188
|
+
delete attachment.value.__file;
|
|
40189
|
+
}
|
|
40190
|
+
const sendOption = {
|
|
40187
40191
|
mentionAccids: mentionAccids.value,
|
|
40188
40192
|
attach: attachment.value
|
|
40189
40193
|
// 传递附件
|
|
40190
|
-
}
|
|
40194
|
+
};
|
|
40195
|
+
if (quoteMsg.value) {
|
|
40196
|
+
sendOption.ext = { quoteMsg: quoteMsg.value };
|
|
40197
|
+
}
|
|
40198
|
+
emit("sendText", text, sendOption);
|
|
40191
40199
|
curText.value = "";
|
|
40192
40200
|
quoteMsg.value = void 0;
|
|
40193
40201
|
attachment.value = void 0;
|
|
40194
40202
|
scrollToBottomAfterSend();
|
|
40195
40203
|
}
|
|
40204
|
+
if (attachment.value && IMG_EXT.includes(attachment.value.ext) && ((_a = attachment.value) == null ? void 0 : _a.__file)) {
|
|
40205
|
+
let sendOption;
|
|
40206
|
+
if (quoteMsg.value) {
|
|
40207
|
+
sendOption = { ext: { quoteMsg: quoteMsg.value } };
|
|
40208
|
+
}
|
|
40209
|
+
emit("sendImg", attachment.value.__file, sendOption);
|
|
40210
|
+
quoteMsg.value = void 0;
|
|
40211
|
+
attachment.value = void 0;
|
|
40212
|
+
scrollToBottomAfterSend();
|
|
40213
|
+
}
|
|
40196
40214
|
};
|
|
40197
40215
|
const scrollHandler = async (e) => {
|
|
40198
40216
|
var _a;
|
|
@@ -40251,7 +40269,7 @@
|
|
|
40251
40269
|
};
|
|
40252
40270
|
const uploadImgHandler = async (file) => {
|
|
40253
40271
|
if (!isLt(file.size, MAX_IMG_SIZE)) {
|
|
40254
|
-
antDesignVue.message.error(`图片大小最大支持${MAX_IMG_SIZE}
|
|
40272
|
+
antDesignVue.message.error(`图片大小最大支持${MAX_IMG_SIZE}MB`);
|
|
40255
40273
|
return false;
|
|
40256
40274
|
}
|
|
40257
40275
|
attachmentUploading.value = true;
|
|
@@ -40265,6 +40283,7 @@
|
|
|
40265
40283
|
attachmentUploading.value = false;
|
|
40266
40284
|
}
|
|
40267
40285
|
});
|
|
40286
|
+
uploadResult.__file = file;
|
|
40268
40287
|
attachment.value = uploadResult;
|
|
40269
40288
|
} catch (error) {
|
|
40270
40289
|
console.error("上传图片失败:", error);
|
|
@@ -40510,7 +40529,7 @@
|
|
|
40510
40529
|
])) : vue.createCommentVNode("", true)
|
|
40511
40530
|
])) : vue.createCommentVNode("", true),
|
|
40512
40531
|
attachment.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14$2, [
|
|
40513
|
-
|
|
40532
|
+
IMG_EXT.includes(attachment.value.ext || "") && attachment.value.url ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15$2, [
|
|
40514
40533
|
vue.createElementVNode("div", _hoisted_16$1, [
|
|
40515
40534
|
vue.createVNode(vue.unref(DeleteOutlined), {
|
|
40516
40535
|
class: "chatroomInputAttachmentDeleteBtn",
|
|
@@ -40585,7 +40604,7 @@
|
|
|
40585
40604
|
vue.createVNode(vue.unref(antDesignVue.Upload), {
|
|
40586
40605
|
"before-upload": uploadImgHandler,
|
|
40587
40606
|
"show-upload-list": false,
|
|
40588
|
-
accept:
|
|
40607
|
+
accept: IMG_EXT.map((ext) => `.${ext}`).join(","),
|
|
40589
40608
|
disabled: __props.sendDisabled || attachmentUploading.value,
|
|
40590
40609
|
class: "chatroomInputUpload"
|
|
40591
40610
|
}, {
|
|
@@ -40620,7 +40639,7 @@
|
|
|
40620
40639
|
}, 8, ["loading", "disabled"])
|
|
40621
40640
|
]),
|
|
40622
40641
|
_: 1
|
|
40623
|
-
}, 8, ["disabled"]),
|
|
40642
|
+
}, 8, ["accept", "disabled"]),
|
|
40624
40643
|
_cache[6] || (_cache[6] = vue.createElementVNode("span", { class: "lineSeparator" }, null, -1)),
|
|
40625
40644
|
vue.createVNode(vue.unref(antDesignVue.Button), {
|
|
40626
40645
|
class: "chatroomButtonArrowUp",
|
|
@@ -40733,6 +40752,7 @@
|
|
|
40733
40752
|
imgUploading.value = true;
|
|
40734
40753
|
channelStore.sendImageMsg({
|
|
40735
40754
|
file,
|
|
40755
|
+
ext: option == null ? void 0 : option.ext,
|
|
40736
40756
|
onUploadStart: () => {
|
|
40737
40757
|
imgUploading.value = true;
|
|
40738
40758
|
},
|
|
@@ -40778,8 +40798,8 @@
|
|
|
40778
40798
|
const handleSendText = (text, option) => {
|
|
40779
40799
|
checkSendAuth("textMsg", text, option);
|
|
40780
40800
|
};
|
|
40781
|
-
const handleSendImg = (file) => {
|
|
40782
|
-
checkSendAuth("SendImg", file);
|
|
40801
|
+
const handleSendImg = (file, option) => {
|
|
40802
|
+
checkSendAuth("SendImg", file, option);
|
|
40783
40803
|
};
|
|
40784
40804
|
const handleSendFile = (file) => {
|
|
40785
40805
|
checkSendAuth("SendFile", file);
|