yx-web-sdk 0.0.18 → 0.0.20
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/components/img-info-wrapper/index.d.ts +0 -0
- package/dist/{chat-page → components/img-info-wrapper}/index.vue.d.ts +2 -2
- package/dist/img-info-wrapper/index.js +1 -0
- package/dist/index/style2.css +30 -162
- package/dist/index/style4.css +177 -120
- package/dist/index/style6.css +513 -25
- package/dist/index/style7.css +143 -466
- package/dist/{index-0o2Mn1Jl.mjs → index-BPnLB3av.mjs} +1 -1
- package/dist/{index-C14AY1pk.mjs → index-DME8_VYv.mjs} +7 -6
- package/dist/{index-sJcDnl5D.mjs → index-Dwglj7_M.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-C18d9C8W.mjs} +9 -3
- package/dist/{index.vue_vue_type_style_index_0_lang-UfvEW_0n.mjs → index.vue_vue_type_style_index_0_lang-BaKNB-4q.mjs} +137 -57
- package/dist/index.vue_vue_type_style_index_0_lang-CBpDXwwP.mjs +589 -0
- package/dist/{index.vue_vue_type_style_index_0_lang-BxxUcry3.mjs → index.vue_vue_type_style_index_0_lang-E3PcX8MA.mjs} +3 -3
- package/dist/{index.vue_vue_type_style_index_0_lang-BdIDeEyF.mjs → index.vue_vue_type_style_index_0_lang-QCNj8WyS.mjs} +171 -40
- package/dist/members-sidebar/index.js +1 -1
- package/dist/notice-box/index.js +1 -1
- package/dist/server-channel-sidebar/index.js +1 -1
- package/dist/stores/channel.d.ts +50 -14
- 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 +180 -90
- package/dist/types/qchat-server.d.ts +1 -1
- package/dist/utils/index.d.ts +10 -2
- package/dist/yx-web-sdk.es.js +644 -296
- package/dist/yx-web-sdk.umd.js +643 -295
- 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-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/index.vue_vue_type_style_index_0_lang-oO4NDv0U.mjs +0 -456
- 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
- /package/dist/{index.vue_vue_type_style_index_0_lang-B2YRkoln.mjs → index.vue_vue_type_style_index_0_lang-BxXBf_VA.mjs} +0 -0
package/dist/yx-web-sdk.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject, ref, getCurrentInstance, nextTick, h, reactive, defineComponent, createVNode, computed, openBlock, createElementBlock, normalizeStyle, createCommentVNode, toDisplayString,
|
|
1
|
+
import { inject, ref, getCurrentInstance, nextTick, h, reactive, defineComponent, createVNode, computed, openBlock, createElementBlock, normalizeStyle, createCommentVNode, toDisplayString, createElementVNode, unref, onBeforeUnmount, watch, normalizeClass, Fragment, withModifiers, createBlock, withCtx, withDirectives, vShow, Teleport, renderList, onMounted, onUnmounted, createTextVNode } from "vue";
|
|
2
2
|
import { useClipboard, useEventListener, useDebounceFn, useLocalStorage } from "@vueuse/core";
|
|
3
3
|
import { message, Image, Button, Input, Popover, Upload, List, Typography, Form, Tooltip, Badge, Modal, Spin as Spin$1, Result, Empty } from "ant-design-vue";
|
|
4
4
|
import { defineStore, createPinia } from "pinia";
|
|
@@ -718,7 +718,7 @@ function updateCSS(css, key) {
|
|
|
718
718
|
newNode.setAttribute(getMark(option), key);
|
|
719
719
|
return newNode;
|
|
720
720
|
}
|
|
721
|
-
function _objectSpread$
|
|
721
|
+
function _objectSpread$c(target) {
|
|
722
722
|
for (var i = 1; i < arguments.length; i++) {
|
|
723
723
|
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
724
724
|
var ownKeys = Object.keys(source);
|
|
@@ -728,12 +728,12 @@ function _objectSpread$b(target) {
|
|
|
728
728
|
}));
|
|
729
729
|
}
|
|
730
730
|
ownKeys.forEach(function(key) {
|
|
731
|
-
_defineProperty$
|
|
731
|
+
_defineProperty$c(target, key, source[key]);
|
|
732
732
|
});
|
|
733
733
|
}
|
|
734
734
|
return target;
|
|
735
735
|
}
|
|
736
|
-
function _defineProperty$
|
|
736
|
+
function _defineProperty$c(obj, key, value) {
|
|
737
737
|
if (key in obj) {
|
|
738
738
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
739
739
|
} else {
|
|
@@ -754,13 +754,13 @@ function isIconDefinition(target) {
|
|
|
754
754
|
}
|
|
755
755
|
function generate(node, key, rootProps) {
|
|
756
756
|
if (!rootProps) {
|
|
757
|
-
return h(node.tag, _objectSpread$
|
|
757
|
+
return h(node.tag, _objectSpread$c({
|
|
758
758
|
key
|
|
759
759
|
}, node.attrs), (node.children || []).map(function(child, index2) {
|
|
760
760
|
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index2));
|
|
761
761
|
}));
|
|
762
762
|
}
|
|
763
|
-
return h(node.tag, _objectSpread$
|
|
763
|
+
return h(node.tag, _objectSpread$c({
|
|
764
764
|
key
|
|
765
765
|
}, rootProps, node.attrs), (node.children || []).map(function(child, index2) {
|
|
766
766
|
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index2));
|
|
@@ -843,7 +843,7 @@ function _objectWithoutPropertiesLoose$3(source, excluded) {
|
|
|
843
843
|
}
|
|
844
844
|
return target;
|
|
845
845
|
}
|
|
846
|
-
function _objectSpread$
|
|
846
|
+
function _objectSpread$b(target) {
|
|
847
847
|
for (var i = 1; i < arguments.length; i++) {
|
|
848
848
|
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
849
849
|
var ownKeys = Object.keys(source);
|
|
@@ -853,12 +853,12 @@ function _objectSpread$a(target) {
|
|
|
853
853
|
}));
|
|
854
854
|
}
|
|
855
855
|
ownKeys.forEach(function(key) {
|
|
856
|
-
_defineProperty$
|
|
856
|
+
_defineProperty$b(target, key, source[key]);
|
|
857
857
|
});
|
|
858
858
|
}
|
|
859
859
|
return target;
|
|
860
860
|
}
|
|
861
|
-
function _defineProperty$
|
|
861
|
+
function _defineProperty$b(obj, key, value) {
|
|
862
862
|
if (key in obj) {
|
|
863
863
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
864
864
|
} else {
|
|
@@ -878,10 +878,10 @@ function setTwoToneColors(_ref) {
|
|
|
878
878
|
twoToneColorPalette.calculated = !!secondaryColor;
|
|
879
879
|
}
|
|
880
880
|
function getTwoToneColors() {
|
|
881
|
-
return _objectSpread$
|
|
881
|
+
return _objectSpread$b({}, twoToneColorPalette);
|
|
882
882
|
}
|
|
883
883
|
var IconBase = function IconBase2(props, context) {
|
|
884
|
-
var _props$context$attrs = _objectSpread$
|
|
884
|
+
var _props$context$attrs = _objectSpread$b({}, props, context.attrs), icon = _props$context$attrs.icon, primaryColor = _props$context$attrs.primaryColor, secondaryColor = _props$context$attrs.secondaryColor, restProps = _objectWithoutProperties$3(_props$context$attrs, _excluded$3);
|
|
885
885
|
var colors = twoToneColorPalette;
|
|
886
886
|
if (primaryColor) {
|
|
887
887
|
colors = {
|
|
@@ -895,11 +895,11 @@ var IconBase = function IconBase2(props, context) {
|
|
|
895
895
|
}
|
|
896
896
|
var target = icon;
|
|
897
897
|
if (target && typeof target.icon === "function") {
|
|
898
|
-
target = _objectSpread$
|
|
898
|
+
target = _objectSpread$b({}, target, {
|
|
899
899
|
icon: target.icon(colors.primaryColor, colors.secondaryColor)
|
|
900
900
|
});
|
|
901
901
|
}
|
|
902
|
-
return generate(target.icon, "svg-".concat(target.name), _objectSpread$
|
|
902
|
+
return generate(target.icon, "svg-".concat(target.name), _objectSpread$b({}, restProps, {
|
|
903
903
|
"data-icon": target.name,
|
|
904
904
|
width: "1em",
|
|
905
905
|
height: "1em",
|
|
@@ -1037,7 +1037,7 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
1037
1037
|
function _arrayWithHoles(arr) {
|
|
1038
1038
|
if (Array.isArray(arr)) return arr;
|
|
1039
1039
|
}
|
|
1040
|
-
function _objectSpread$
|
|
1040
|
+
function _objectSpread$a(target) {
|
|
1041
1041
|
for (var i = 1; i < arguments.length; i++) {
|
|
1042
1042
|
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
1043
1043
|
var ownKeys = Object.keys(source);
|
|
@@ -1047,12 +1047,12 @@ function _objectSpread$9(target) {
|
|
|
1047
1047
|
}));
|
|
1048
1048
|
}
|
|
1049
1049
|
ownKeys.forEach(function(key) {
|
|
1050
|
-
_defineProperty$
|
|
1050
|
+
_defineProperty$a(target, key, source[key]);
|
|
1051
1051
|
});
|
|
1052
1052
|
}
|
|
1053
1053
|
return target;
|
|
1054
1054
|
}
|
|
1055
|
-
function _defineProperty$
|
|
1055
|
+
function _defineProperty$a(obj, key, value) {
|
|
1056
1056
|
if (key in obj) {
|
|
1057
1057
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
1058
1058
|
} else {
|
|
@@ -1090,9 +1090,9 @@ function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
|
1090
1090
|
setTwoToneColor(blue.primary);
|
|
1091
1091
|
var Icon$1 = function Icon(props, context) {
|
|
1092
1092
|
var _classObj;
|
|
1093
|
-
var _props$context$attrs = _objectSpread$
|
|
1093
|
+
var _props$context$attrs = _objectSpread$a({}, props, context.attrs), cls = _props$context$attrs["class"], icon = _props$context$attrs.icon, spin = _props$context$attrs.spin, rotate = _props$context$attrs.rotate, tabindex = _props$context$attrs.tabindex, twoToneColor = _props$context$attrs.twoToneColor, onClick = _props$context$attrs.onClick, restProps = _objectWithoutProperties$2(_props$context$attrs, _excluded$2);
|
|
1094
1094
|
var _useInjectIconContext = useInjectIconContext(), prefixCls = _useInjectIconContext.prefixCls, rootClassName = _useInjectIconContext.rootClassName;
|
|
1095
|
-
var classObj = (_classObj = {}, _defineProperty$
|
|
1095
|
+
var classObj = (_classObj = {}, _defineProperty$a(_classObj, rootClassName.value, !!rootClassName.value), _defineProperty$a(_classObj, prefixCls.value, true), _defineProperty$a(_classObj, "".concat(prefixCls.value, "-").concat(icon.name), Boolean(icon.name)), _defineProperty$a(_classObj, "".concat(prefixCls.value, "-spin"), !!spin || icon.name === "loading"), _classObj);
|
|
1096
1096
|
var iconTabIndex = tabindex;
|
|
1097
1097
|
if (iconTabIndex === void 0 && onClick) {
|
|
1098
1098
|
iconTabIndex = -1;
|
|
@@ -1102,7 +1102,7 @@ var Icon$1 = function Icon(props, context) {
|
|
|
1102
1102
|
transform: "rotate(".concat(rotate, "deg)")
|
|
1103
1103
|
} : void 0;
|
|
1104
1104
|
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
|
|
1105
|
-
return createVNode("span", _objectSpread$
|
|
1105
|
+
return createVNode("span", _objectSpread$a({
|
|
1106
1106
|
"role": "img",
|
|
1107
1107
|
"aria-label": icon.name
|
|
1108
1108
|
}, restProps, {
|
|
@@ -1127,7 +1127,7 @@ Icon$1.inheritAttrs = false;
|
|
|
1127
1127
|
Icon$1.getTwoToneColor = getTwoToneColor;
|
|
1128
1128
|
Icon$1.setTwoToneColor = setTwoToneColor;
|
|
1129
1129
|
var CloseOutlined$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, "name": "close", "theme": "outlined" };
|
|
1130
|
-
function _objectSpread$
|
|
1130
|
+
function _objectSpread$9(target) {
|
|
1131
1131
|
for (var i = 1; i < arguments.length; i++) {
|
|
1132
1132
|
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
1133
1133
|
var ownKeys = Object.keys(source);
|
|
@@ -1137,12 +1137,12 @@ function _objectSpread$8(target) {
|
|
|
1137
1137
|
}));
|
|
1138
1138
|
}
|
|
1139
1139
|
ownKeys.forEach(function(key) {
|
|
1140
|
-
_defineProperty$
|
|
1140
|
+
_defineProperty$9(target, key, source[key]);
|
|
1141
1141
|
});
|
|
1142
1142
|
}
|
|
1143
1143
|
return target;
|
|
1144
1144
|
}
|
|
1145
|
-
function _defineProperty$
|
|
1145
|
+
function _defineProperty$9(obj, key, value) {
|
|
1146
1146
|
if (key in obj) {
|
|
1147
1147
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
1148
1148
|
} else {
|
|
@@ -1151,14 +1151,46 @@ function _defineProperty$8(obj, key, value) {
|
|
|
1151
1151
|
return obj;
|
|
1152
1152
|
}
|
|
1153
1153
|
var CloseOutlined = function CloseOutlined2(props, context) {
|
|
1154
|
-
var p = _objectSpread$
|
|
1155
|
-
return createVNode(Icon$1, _objectSpread$
|
|
1154
|
+
var p = _objectSpread$9({}, props, context.attrs);
|
|
1155
|
+
return createVNode(Icon$1, _objectSpread$9({}, p, {
|
|
1156
1156
|
"icon": CloseOutlined$1
|
|
1157
1157
|
}), null);
|
|
1158
1158
|
};
|
|
1159
1159
|
CloseOutlined.displayName = "CloseOutlined";
|
|
1160
1160
|
CloseOutlined.inheritAttrs = false;
|
|
1161
1161
|
var CrownOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z" } }] }, "name": "crown", "theme": "outlined" };
|
|
1162
|
+
function _objectSpread$8(target) {
|
|
1163
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
1164
|
+
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
1165
|
+
var ownKeys = Object.keys(source);
|
|
1166
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
1167
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1168
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1169
|
+
}));
|
|
1170
|
+
}
|
|
1171
|
+
ownKeys.forEach(function(key) {
|
|
1172
|
+
_defineProperty$8(target, key, source[key]);
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
return target;
|
|
1176
|
+
}
|
|
1177
|
+
function _defineProperty$8(obj, key, value) {
|
|
1178
|
+
if (key in obj) {
|
|
1179
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
1180
|
+
} else {
|
|
1181
|
+
obj[key] = value;
|
|
1182
|
+
}
|
|
1183
|
+
return obj;
|
|
1184
|
+
}
|
|
1185
|
+
var CrownOutlined = function CrownOutlined2(props, context) {
|
|
1186
|
+
var p = _objectSpread$8({}, props, context.attrs);
|
|
1187
|
+
return createVNode(Icon$1, _objectSpread$8({}, p, {
|
|
1188
|
+
"icon": CrownOutlined$1
|
|
1189
|
+
}), null);
|
|
1190
|
+
};
|
|
1191
|
+
CrownOutlined.displayName = "CrownOutlined";
|
|
1192
|
+
CrownOutlined.inheritAttrs = false;
|
|
1193
|
+
var DeleteOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" } }] }, "name": "delete", "theme": "outlined" };
|
|
1162
1194
|
function _objectSpread$7(target) {
|
|
1163
1195
|
for (var i = 1; i < arguments.length; i++) {
|
|
1164
1196
|
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
@@ -1182,14 +1214,14 @@ function _defineProperty$7(obj, key, value) {
|
|
|
1182
1214
|
}
|
|
1183
1215
|
return obj;
|
|
1184
1216
|
}
|
|
1185
|
-
var
|
|
1217
|
+
var DeleteOutlined = function DeleteOutlined2(props, context) {
|
|
1186
1218
|
var p = _objectSpread$7({}, props, context.attrs);
|
|
1187
1219
|
return createVNode(Icon$1, _objectSpread$7({}, p, {
|
|
1188
|
-
"icon":
|
|
1220
|
+
"icon": DeleteOutlined$1
|
|
1189
1221
|
}), null);
|
|
1190
1222
|
};
|
|
1191
|
-
|
|
1192
|
-
|
|
1223
|
+
DeleteOutlined.displayName = "DeleteOutlined";
|
|
1224
|
+
DeleteOutlined.inheritAttrs = false;
|
|
1193
1225
|
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" };
|
|
1194
1226
|
function _objectSpread$6(target) {
|
|
1195
1227
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -1661,12 +1693,12 @@ const promiseDebounce = (func, wait) => {
|
|
|
1661
1693
|
return function(...args) {
|
|
1662
1694
|
return new Promise((resolve, reject) => {
|
|
1663
1695
|
queue.push([resolve, reject]);
|
|
1664
|
-
clearTimeout(timer);
|
|
1696
|
+
clearTimeout(timer != null ? timer : void 0);
|
|
1665
1697
|
timer = setTimeout(() => {
|
|
1666
1698
|
func.apply(this, args).then((res) => {
|
|
1667
|
-
queue.
|
|
1699
|
+
queue.forEach(([resolver]) => resolver(res));
|
|
1668
1700
|
}).catch((err) => {
|
|
1669
|
-
queue.
|
|
1701
|
+
queue.forEach(([, rejecter]) => rejecter(err));
|
|
1670
1702
|
}).finally(() => {
|
|
1671
1703
|
queue.length = 0;
|
|
1672
1704
|
timer = null;
|
|
@@ -1694,6 +1726,9 @@ function getImageMsgDisplaySize(attach) {
|
|
|
1694
1726
|
h2 = Math.min(IMG_MSG_SIDE_MAX, h0 * scale);
|
|
1695
1727
|
return { width: Math.round(w), height: Math.round(h2) };
|
|
1696
1728
|
}
|
|
1729
|
+
const getMByteSize = (size) => {
|
|
1730
|
+
return (size / 1024 / 1024).toFixed(2);
|
|
1731
|
+
};
|
|
1697
1732
|
const useGlobalStore = defineStore("global", {
|
|
1698
1733
|
state: () => ({
|
|
1699
1734
|
loginStatus: false
|
|
@@ -37640,7 +37675,6 @@ const useServerStore = defineStore("server", {
|
|
|
37640
37675
|
async getSeverList(options) {
|
|
37641
37676
|
if (window.qchat) {
|
|
37642
37677
|
const res = await window.qchat.qchatServer.getServersByPage(options);
|
|
37643
|
-
console.log("getSeverList", res);
|
|
37644
37678
|
this.setSeverList(res);
|
|
37645
37679
|
}
|
|
37646
37680
|
},
|
|
@@ -37940,8 +37974,11 @@ const useChannelStore = defineStore("channel", {
|
|
|
37940
37974
|
serverUnReadCountList: []
|
|
37941
37975
|
}),
|
|
37942
37976
|
actions: {
|
|
37943
|
-
|
|
37944
|
-
|
|
37977
|
+
/**
|
|
37978
|
+
* 设置频道列表并获取未读数
|
|
37979
|
+
* @param payload 频道列表数据
|
|
37980
|
+
*/
|
|
37981
|
+
async setChannelList(payload) {
|
|
37945
37982
|
const serverStore = useServerStore();
|
|
37946
37983
|
serverStore.resetServerUnReadCount();
|
|
37947
37984
|
this.channelList = payload.datas;
|
|
@@ -37957,65 +37994,89 @@ const useChannelStore = defineStore("channel", {
|
|
|
37957
37994
|
});
|
|
37958
37995
|
}
|
|
37959
37996
|
this.channelListQueryTag = payload.listQueryTag;
|
|
37997
|
+
await this.subscribleChannels();
|
|
37960
37998
|
},
|
|
37961
|
-
|
|
37962
|
-
|
|
37999
|
+
/**
|
|
38000
|
+
* 订阅频道并获取未读数
|
|
38001
|
+
* @description 先使用 getChannelUnreadInfos 主动查询未读数(获取登录前积累的未读),再订阅频道接收实时更新
|
|
38002
|
+
*/
|
|
38003
|
+
async subscribleChannels() {
|
|
38004
|
+
var _a, _b;
|
|
37963
38005
|
this.channelUnReadInfoList = [];
|
|
37964
38006
|
const channels = [];
|
|
37965
38007
|
this.channelList.forEach((item) => {
|
|
37966
38008
|
channels.push({ serverId: item.serverId, channelId: item.channelId });
|
|
37967
38009
|
});
|
|
37968
|
-
|
|
38010
|
+
if (channels.length === 0) {
|
|
38011
|
+
return;
|
|
38012
|
+
}
|
|
38013
|
+
try {
|
|
38014
|
+
const unreadInfos = await ((_a = window.qchat) == null ? void 0 : _a.qchatChannel.getChannelUnreadInfos({
|
|
38015
|
+
channels
|
|
38016
|
+
}));
|
|
38017
|
+
this.applyUnreadInfosToChannels(unreadInfos);
|
|
38018
|
+
} catch (error) {
|
|
38019
|
+
console.error("[subscribleChannels] 查询未读数失败:", error);
|
|
38020
|
+
}
|
|
38021
|
+
(_b = window.qchat) == null ? void 0 : _b.qchatChannel.subscribeChannel({
|
|
37969
38022
|
type: 2,
|
|
37970
38023
|
opeType: 1,
|
|
37971
38024
|
channels
|
|
37972
|
-
}).
|
|
37973
|
-
|
|
37974
|
-
|
|
37975
|
-
|
|
37976
|
-
|
|
37977
|
-
|
|
37978
|
-
|
|
37979
|
-
|
|
37980
|
-
|
|
37981
|
-
|
|
37982
|
-
|
|
37983
|
-
|
|
37984
|
-
|
|
37985
|
-
|
|
37986
|
-
});
|
|
37987
|
-
});
|
|
37988
|
-
this.serverUnReadCountList = [];
|
|
37989
|
-
this.channelUnReadInfoList.forEach((item) => {
|
|
37990
|
-
let existsFlag = false;
|
|
37991
|
-
for (let index2 = 0; index2 < this.serverUnReadCountList.length; index2++) {
|
|
37992
|
-
const serverCount = this.serverUnReadCountList[index2];
|
|
37993
|
-
if (serverCount.serverId === item.serverId) {
|
|
37994
|
-
existsFlag = true;
|
|
37995
|
-
break;
|
|
37996
|
-
}
|
|
37997
|
-
}
|
|
37998
|
-
if (!existsFlag) {
|
|
37999
|
-
this.serverUnReadCountList.push({
|
|
38000
|
-
serverId: item.serverId,
|
|
38001
|
-
unreadCount: item.unreadCount
|
|
38002
|
-
});
|
|
38003
|
-
} else {
|
|
38004
|
-
for (let index2 = 0; index2 < this.serverUnReadCountList.length; index2++) {
|
|
38005
|
-
const serverUnReadCountAgg = this.serverUnReadCountList[index2];
|
|
38006
|
-
if (serverUnReadCountAgg.serverId == item.serverId) {
|
|
38007
|
-
serverUnReadCountAgg.unreadCount = serverUnReadCountAgg.unreadCount + item.unreadCount;
|
|
38008
|
-
break;
|
|
38009
|
-
}
|
|
38025
|
+
}).catch((error) => {
|
|
38026
|
+
console.error("[subscribleChannels] 订阅频道失败:", error);
|
|
38027
|
+
});
|
|
38028
|
+
},
|
|
38029
|
+
/**
|
|
38030
|
+
* 将未读信息应用到频道列表
|
|
38031
|
+
* @param unreadInfos 未读信息列表
|
|
38032
|
+
*/
|
|
38033
|
+
applyUnreadInfosToChannels(unreadInfos) {
|
|
38034
|
+
unreadInfos.forEach((item) => {
|
|
38035
|
+
if (this.channelList && this.channelList.length > 0) {
|
|
38036
|
+
this.channelList.forEach((channelItem) => {
|
|
38037
|
+
if (channelItem.channelId === item.channelId) {
|
|
38038
|
+
channelItem["unreadCount"] = item.unreadCount;
|
|
38010
38039
|
}
|
|
38011
|
-
}
|
|
38040
|
+
});
|
|
38041
|
+
}
|
|
38042
|
+
this.channelUnReadInfoList.push({
|
|
38043
|
+
channelId: item.channelId,
|
|
38044
|
+
unreadCount: item.unreadCount,
|
|
38045
|
+
serverId: item.serverId
|
|
38012
38046
|
});
|
|
38013
|
-
const serverStore = useServerStore();
|
|
38014
|
-
serverStore.setUnReadInfo(this.serverUnReadCountList);
|
|
38015
38047
|
});
|
|
38048
|
+
this.serverUnReadCountList = [];
|
|
38049
|
+
this.channelUnReadInfoList.forEach((item) => {
|
|
38050
|
+
const existingServer = this.serverUnReadCountList.find(
|
|
38051
|
+
(s) => s.serverId === item.serverId
|
|
38052
|
+
);
|
|
38053
|
+
if (existingServer) {
|
|
38054
|
+
existingServer.unreadCount += item.unreadCount;
|
|
38055
|
+
} else {
|
|
38056
|
+
this.serverUnReadCountList.push({
|
|
38057
|
+
serverId: item.serverId,
|
|
38058
|
+
unreadCount: item.unreadCount
|
|
38059
|
+
});
|
|
38060
|
+
}
|
|
38061
|
+
});
|
|
38062
|
+
const serverStore = useServerStore();
|
|
38063
|
+
serverStore.setUnReadInfo(this.serverUnReadCountList);
|
|
38016
38064
|
},
|
|
38017
|
-
|
|
38065
|
+
/**
|
|
38066
|
+
* 设置 channel 的未读消息数
|
|
38067
|
+
* @param payload 未读信息
|
|
38068
|
+
* @description 如果是当前频道的未读更新,会忽略(因为用户正在查看该频道)
|
|
38069
|
+
*/
|
|
38018
38070
|
setUnReadNum(payload) {
|
|
38071
|
+
var _a;
|
|
38072
|
+
if (this.currentChannel && this.currentChannel.channelId === payload.channelId) {
|
|
38073
|
+
(_a = window.qchat) == null ? void 0 : _a.qchatMsg.markMessageRead({
|
|
38074
|
+
serverId: payload.serverId,
|
|
38075
|
+
channelId: payload.channelId,
|
|
38076
|
+
time: Date.now()
|
|
38077
|
+
});
|
|
38078
|
+
return;
|
|
38079
|
+
}
|
|
38019
38080
|
if (this.channelList && this.channelList.length > 0) {
|
|
38020
38081
|
this.channelList.forEach((channelItem) => {
|
|
38021
38082
|
if (channelItem.channelId === payload.channelId) {
|
|
@@ -38092,6 +38153,7 @@ const useChannelStore = defineStore("channel", {
|
|
|
38092
38153
|
},
|
|
38093
38154
|
// 重置频道未读计数(原 mutations 转为 actions)
|
|
38094
38155
|
resetChannelUnReadCount() {
|
|
38156
|
+
var _a;
|
|
38095
38157
|
if (this.currentChannel) {
|
|
38096
38158
|
if (this.channelUnReadInfoList) {
|
|
38097
38159
|
let finalIndex = -1;
|
|
@@ -38125,7 +38187,7 @@ const useChannelStore = defineStore("channel", {
|
|
|
38125
38187
|
maxCount: 99,
|
|
38126
38188
|
lastMsgTime: (/* @__PURE__ */ new Date()).getTime()
|
|
38127
38189
|
};
|
|
38128
|
-
window.qchat.qchatMsg.markMessageRead(markMessageReadOption);
|
|
38190
|
+
(_a = window.qchat) == null ? void 0 : _a.qchatMsg.markMessageRead(markMessageReadOption);
|
|
38129
38191
|
this.currentChannel["unreadCount"] = 0;
|
|
38130
38192
|
}
|
|
38131
38193
|
},
|
|
@@ -38174,6 +38236,15 @@ const useChannelStore = defineStore("channel", {
|
|
|
38174
38236
|
(i) => payload.every((j) => j.msgIdClient !== i.msgIdClient)
|
|
38175
38237
|
);
|
|
38176
38238
|
},
|
|
38239
|
+
// 更新当前频道消息
|
|
38240
|
+
updateCurChannelMsgs(msg) {
|
|
38241
|
+
this.currentChannelMsgs = this.currentChannelMsgs.map((msgItem) => {
|
|
38242
|
+
if (msgItem.msgIdClient === msg.msgIdClient) {
|
|
38243
|
+
return msg;
|
|
38244
|
+
}
|
|
38245
|
+
return msgItem;
|
|
38246
|
+
});
|
|
38247
|
+
},
|
|
38177
38248
|
// 设置当前频道消息(原 mutations 转为 actions)
|
|
38178
38249
|
setCurChannelMsgs(payload) {
|
|
38179
38250
|
this.currentChannelMsgs = payload;
|
|
@@ -38190,7 +38261,7 @@ const useChannelStore = defineStore("channel", {
|
|
|
38190
38261
|
throw new Error("QChat no login");
|
|
38191
38262
|
}
|
|
38192
38263
|
const res = await window.qchat.qchatChannel.getChannelsByPage(options);
|
|
38193
|
-
this.setChannelList(res);
|
|
38264
|
+
await this.setChannelList(res);
|
|
38194
38265
|
},
|
|
38195
38266
|
1e3
|
|
38196
38267
|
);
|
|
@@ -38266,7 +38337,27 @@ const useChannelStore = defineStore("channel", {
|
|
|
38266
38337
|
});
|
|
38267
38338
|
return msgs;
|
|
38268
38339
|
},
|
|
38269
|
-
|
|
38340
|
+
/**
|
|
38341
|
+
* 上传图片
|
|
38342
|
+
* @param options - 上传选项,包含图片文件和回调函数
|
|
38343
|
+
* @returns Promise<UploadFileResult> 返回上传结果,包含图片URL、宽高等信息
|
|
38344
|
+
*/
|
|
38345
|
+
async uploadImage(options) {
|
|
38346
|
+
if (!window.qchat) {
|
|
38347
|
+
throw new Error("QChat no login");
|
|
38348
|
+
}
|
|
38349
|
+
const uploadResult = await window.qchat.cloudStorage.uploadFile({
|
|
38350
|
+
type: "image",
|
|
38351
|
+
file: options.file,
|
|
38352
|
+
onUploadStart: options.onUploadStart,
|
|
38353
|
+
onUploadDone: options.onUploadDone
|
|
38354
|
+
});
|
|
38355
|
+
return uploadResult;
|
|
38356
|
+
},
|
|
38357
|
+
/**
|
|
38358
|
+
* 发送文本消息
|
|
38359
|
+
* @param options - 发送选项,包含消息内容和可选附件
|
|
38360
|
+
*/
|
|
38270
38361
|
async sendTextMsg(options) {
|
|
38271
38362
|
var _a;
|
|
38272
38363
|
if (!window.qchat) {
|
|
@@ -38281,6 +38372,8 @@ const useChannelStore = defineStore("channel", {
|
|
|
38281
38372
|
channelId: this.currentChannel.channelId,
|
|
38282
38373
|
type: "text",
|
|
38283
38374
|
body: options.body,
|
|
38375
|
+
attach: options == null ? void 0 : options.attach,
|
|
38376
|
+
// 如果有附件,塞到attach字段
|
|
38284
38377
|
ext: (options == null ? void 0 : options.ext) ? JSON.stringify(options == null ? void 0 : options.ext) : void 0,
|
|
38285
38378
|
mentionAccids: options == null ? void 0 : options.mentionAccids,
|
|
38286
38379
|
onSendBefore: (msg2) => {
|
|
@@ -38427,6 +38520,15 @@ const useChannelStore = defineStore("channel", {
|
|
|
38427
38520
|
this.addCurChannelMsgs({ data: [msg], isUnShift: false });
|
|
38428
38521
|
}
|
|
38429
38522
|
},
|
|
38523
|
+
// 撤回消息
|
|
38524
|
+
async revokeMessage(options) {
|
|
38525
|
+
if (!window.qchat) {
|
|
38526
|
+
throw new Error("QChat no login");
|
|
38527
|
+
}
|
|
38528
|
+
window.qchat.qchatMsg.revokeMessage(options).then((res) => {
|
|
38529
|
+
this.updateCurChannelMsgs(res);
|
|
38530
|
+
});
|
|
38531
|
+
},
|
|
38430
38532
|
// 获取频道黑白名单
|
|
38431
38533
|
async getWhiteBlackMembersPage(options) {
|
|
38432
38534
|
if (!window.qchat) {
|
|
@@ -38467,6 +38569,9 @@ const useChannelStore = defineStore("channel", {
|
|
|
38467
38569
|
},
|
|
38468
38570
|
// 获取频道身份组
|
|
38469
38571
|
async getChannelRoles(options) {
|
|
38572
|
+
if (!window.qchat) {
|
|
38573
|
+
throw new Error("QChat no login");
|
|
38574
|
+
}
|
|
38470
38575
|
const res = await window.qchat.qchatRole.getChannelRoles(options);
|
|
38471
38576
|
return res;
|
|
38472
38577
|
},
|
|
@@ -38526,11 +38631,17 @@ const useChannelStore = defineStore("channel", {
|
|
|
38526
38631
|
},
|
|
38527
38632
|
// 获取成员角色
|
|
38528
38633
|
async getMemberRoles(options) {
|
|
38634
|
+
if (!window.qchat) {
|
|
38635
|
+
throw new Error("QChat no login");
|
|
38636
|
+
}
|
|
38529
38637
|
const res = await window.qchat.qchatRole.getMemberRoles(options);
|
|
38530
38638
|
return res;
|
|
38531
38639
|
},
|
|
38532
38640
|
// 获取已存在的成员角色 accids
|
|
38533
38641
|
async getExistingAccidsOfMemberRoles(options) {
|
|
38642
|
+
if (!window.qchat) {
|
|
38643
|
+
throw new Error("QChat no login");
|
|
38644
|
+
}
|
|
38534
38645
|
const res = await window.qchat.qchatRole.getExistingAccidsOfMemberRoles(
|
|
38535
38646
|
options
|
|
38536
38647
|
);
|
|
@@ -38559,9 +38670,9 @@ const useUserStore = defineStore("user", {
|
|
|
38559
38670
|
}
|
|
38560
38671
|
});
|
|
38561
38672
|
createPinia();
|
|
38562
|
-
const _hoisted_1$
|
|
38563
|
-
const _hoisted_2$
|
|
38564
|
-
const _sfc_main$
|
|
38673
|
+
const _hoisted_1$a = { class: "yx-common-avatar-container" };
|
|
38674
|
+
const _hoisted_2$9 = ["src"];
|
|
38675
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
38565
38676
|
...{
|
|
38566
38677
|
name: "CommonAvatar"
|
|
38567
38678
|
},
|
|
@@ -38617,14 +38728,14 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
38617
38728
|
});
|
|
38618
38729
|
return (_ctx, _cache) => {
|
|
38619
38730
|
var _a, _b;
|
|
38620
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
38731
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
38621
38732
|
__props.avatar || ((_a = matchedMember.value) == null ? void 0 : _a.avatar) ? (openBlock(), createElementBlock("img", {
|
|
38622
38733
|
key: 0,
|
|
38623
38734
|
alt: "",
|
|
38624
38735
|
class: "image",
|
|
38625
38736
|
src: __props.avatar,
|
|
38626
38737
|
style: normalizeStyle("width:" + widthAndHeight.value + "height:" + widthAndHeight.value + "border:" + borderStyle.value)
|
|
38627
|
-
}, null, 12, _hoisted_2$
|
|
38738
|
+
}, null, 12, _hoisted_2$9)) : createCommentVNode("", true),
|
|
38628
38739
|
!__props.avatar && !((_b = matchedMember.value) == null ? void 0 : _b.avatar) ? (openBlock(), createElementBlock("div", {
|
|
38629
38740
|
key: 1,
|
|
38630
38741
|
class: "text",
|
|
@@ -38673,26 +38784,87 @@ const IconFont$1 = defineComponent({
|
|
|
38673
38784
|
};
|
|
38674
38785
|
}
|
|
38675
38786
|
});
|
|
38787
|
+
const _hoisted_1$9 = { class: "yx-attach-box-img-info-wrapper" };
|
|
38788
|
+
const _hoisted_2$8 = {
|
|
38789
|
+
style: { "min-width": "21px", "min-height": "18px" },
|
|
38790
|
+
width: "21",
|
|
38791
|
+
height: "18",
|
|
38792
|
+
viewBox: "0 0 21 18",
|
|
38793
|
+
fill: "var(--theme-head-title-link, #3B3E55)",
|
|
38794
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
38795
|
+
};
|
|
38796
|
+
const _hoisted_3$8 = { class: "yx-attach-box-img-info-text" };
|
|
38797
|
+
const _hoisted_4$8 = { class: "yx-attach-box-img-info-text-name" };
|
|
38798
|
+
const _hoisted_5$7 = ["href", "download"];
|
|
38799
|
+
const _hoisted_6$7 = { class: "yx-attach-box-img-info-text-size" };
|
|
38800
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
38801
|
+
...{ name: "ImgInfoWrapper" },
|
|
38802
|
+
__name: "index",
|
|
38803
|
+
props: {
|
|
38804
|
+
attach: {}
|
|
38805
|
+
},
|
|
38806
|
+
setup(__props) {
|
|
38807
|
+
return (_ctx, _cache) => {
|
|
38808
|
+
var _a, _b, _c, _d;
|
|
38809
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
38810
|
+
(openBlock(), createElementBlock("svg", _hoisted_2$8, [..._cache[0] || (_cache[0] = [
|
|
38811
|
+
createElementVNode("path", {
|
|
38812
|
+
d: "M15.75 9C16.9926 9 18 7.99264 18 6.75C18 5.50736 16.9926 4.5 15.75 4.5C14.5074 4.5 13.5 5.50736 13.5 6.75C13.5 7.99264 14.5074 9 15.75 9Z",
|
|
38813
|
+
fill: "#9198A1"
|
|
38814
|
+
}, null, -1),
|
|
38815
|
+
createElementVNode("path", {
|
|
38816
|
+
"fill-rule": "evenodd",
|
|
38817
|
+
"clip-rule": "evenodd",
|
|
38818
|
+
d: "M3 0C1.34315 0 0 1.34315 0 3V15C0 16.6569 1.34315 18 3 18H18C19.6569 18 21 16.6569 21 15V3C21 1.34315 19.6569 0 18 0H3ZM18 1.5H3C2.17157 1.5 1.5 2.17157 1.5 3V8.68934L6 4.18934L18.2838 16.4732C18.9765 16.3405 19.5 15.7314 19.5 15V3C19.5 2.17157 18.8284 1.5 18 1.5ZM1.5 15V10.8107L6 6.31066L16.1893 16.5H3C2.17157 16.5 1.5 15.8284 1.5 15Z",
|
|
38819
|
+
fill: "#9198A1"
|
|
38820
|
+
}, null, -1)
|
|
38821
|
+
])])),
|
|
38822
|
+
createElementVNode("div", _hoisted_3$8, [
|
|
38823
|
+
createElementVNode("div", _hoisted_4$8, [
|
|
38824
|
+
createElementVNode("a", {
|
|
38825
|
+
class: "yx-attach-box-img-info-text-name-link",
|
|
38826
|
+
href: (_a = __props.attach) == null ? void 0 : _a.url,
|
|
38827
|
+
download: (_b = __props.attach) == null ? void 0 : _b.name
|
|
38828
|
+
}, toDisplayString((_c = __props.attach) == null ? void 0 : _c.name), 9, _hoisted_5$7)
|
|
38829
|
+
]),
|
|
38830
|
+
createElementVNode("div", _hoisted_6$7, toDisplayString(unref(getMByteSize)(((_d = __props.attach) == null ? void 0 : _d.size) || 0)) + "MB", 1)
|
|
38831
|
+
])
|
|
38832
|
+
]);
|
|
38833
|
+
};
|
|
38834
|
+
}
|
|
38835
|
+
});
|
|
38676
38836
|
const _hoisted_1$8 = ["data-msg-id-client"];
|
|
38677
|
-
const _hoisted_2$7 = {
|
|
38678
|
-
|
|
38679
|
-
|
|
38680
|
-
|
|
38681
|
-
const
|
|
38682
|
-
const
|
|
38683
|
-
const
|
|
38684
|
-
const
|
|
38685
|
-
const
|
|
38686
|
-
const
|
|
38687
|
-
const
|
|
38688
|
-
const
|
|
38837
|
+
const _hoisted_2$7 = {
|
|
38838
|
+
key: 0,
|
|
38839
|
+
class: "chat-withdraw-msg"
|
|
38840
|
+
};
|
|
38841
|
+
const _hoisted_3$7 = { class: "chatCardAvatar" };
|
|
38842
|
+
const _hoisted_4$7 = { class: "chatCardContent" };
|
|
38843
|
+
const _hoisted_5$6 = { class: "chatCardInfo" };
|
|
38844
|
+
const _hoisted_6$6 = { class: "chatCardInfoName" };
|
|
38845
|
+
const _hoisted_7$4 = { class: "chatCardInfoTime" };
|
|
38846
|
+
const _hoisted_8$4 = ["innerHTML"];
|
|
38847
|
+
const _hoisted_9$3 = ["href"];
|
|
38848
|
+
const _hoisted_10$3 = { class: "fileMsgContent" };
|
|
38849
|
+
const _hoisted_11$3 = { class: "fileMsgName" };
|
|
38850
|
+
const _hoisted_12$3 = { class: "fileMsgSize" };
|
|
38851
|
+
const _hoisted_13$3 = { class: "ant-image-mask-info" };
|
|
38852
|
+
const _hoisted_14$3 = {
|
|
38689
38853
|
key: 4,
|
|
38854
|
+
class: "chatCardMainContent attach-box"
|
|
38855
|
+
};
|
|
38856
|
+
const _hoisted_15$3 = { class: "ant-image-mask-info" };
|
|
38857
|
+
const _hoisted_16$2 = {
|
|
38858
|
+
key: 5,
|
|
38690
38859
|
class: "chatCardMainContent"
|
|
38691
38860
|
};
|
|
38692
|
-
const
|
|
38693
|
-
const
|
|
38694
|
-
const
|
|
38695
|
-
const
|
|
38861
|
+
const _hoisted_17$2 = { class: "chatCardQuoteMsgAttachBox" };
|
|
38862
|
+
const _hoisted_18$2 = { class: "chatCardQuoteMsgName" };
|
|
38863
|
+
const _hoisted_19$2 = ["innerHTML"];
|
|
38864
|
+
const _hoisted_20$2 = { class: "ant-image-mask-info" };
|
|
38865
|
+
const _hoisted_21$2 = { class: "chatCardStatus" };
|
|
38866
|
+
const MAX_IMG_PREVIEW_SIZE = 2 * 1024 * 1024;
|
|
38867
|
+
const REVOCATION_INTERVAL = 120 * 1e3;
|
|
38696
38868
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
38697
38869
|
...{
|
|
38698
38870
|
name: "ChatCard"
|
|
@@ -38702,10 +38874,30 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
38702
38874
|
msg: {},
|
|
38703
38875
|
myAccid: { default: "" }
|
|
38704
38876
|
},
|
|
38705
|
-
emits: ["resendText", "resendImg", "resendFile", "quote", "contextMenuSwitch", "quoteMsgClick"],
|
|
38877
|
+
emits: ["resendText", "resendImg", "resendFile", "quote", "contextMenuSwitch", "quoteMsgClick", "revokeMessage"],
|
|
38706
38878
|
setup(__props, { emit: __emit }) {
|
|
38707
38879
|
const serverStore = useServerStore();
|
|
38708
38880
|
const props = __props;
|
|
38881
|
+
const nowTime = ref(Date.now());
|
|
38882
|
+
let timer = null;
|
|
38883
|
+
timer = setInterval(() => {
|
|
38884
|
+
nowTime.value = Date.now();
|
|
38885
|
+
if (nowTime.value - props.msg.time > REVOCATION_INTERVAL) {
|
|
38886
|
+
if (timer) {
|
|
38887
|
+
clearInterval(timer);
|
|
38888
|
+
timer = null;
|
|
38889
|
+
}
|
|
38890
|
+
}
|
|
38891
|
+
}, 1e3);
|
|
38892
|
+
onBeforeUnmount(() => {
|
|
38893
|
+
if (timer) {
|
|
38894
|
+
clearInterval(timer);
|
|
38895
|
+
timer = null;
|
|
38896
|
+
}
|
|
38897
|
+
});
|
|
38898
|
+
const isRevocation = computed(() => {
|
|
38899
|
+
return props.msg.fromAccount === props.myAccid && nowTime.value - props.msg.time <= REVOCATION_INTERVAL;
|
|
38900
|
+
});
|
|
38709
38901
|
const { copy } = useClipboard();
|
|
38710
38902
|
const emit = __emit;
|
|
38711
38903
|
const textMsgContextMenuVisible = ref(false);
|
|
@@ -38718,13 +38910,25 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
38718
38910
|
textMsgContextMenuVisible.value = true;
|
|
38719
38911
|
}
|
|
38720
38912
|
function onCopyClick() {
|
|
38721
|
-
|
|
38722
|
-
|
|
38723
|
-
|
|
38724
|
-
|
|
38725
|
-
|
|
38726
|
-
|
|
38727
|
-
|
|
38913
|
+
var _a;
|
|
38914
|
+
if (props.msg.type === "text") {
|
|
38915
|
+
copy(props.msg.body).then(() => {
|
|
38916
|
+
}).catch((err) => {
|
|
38917
|
+
console.error("copy error: ", err);
|
|
38918
|
+
message.error("复制失败");
|
|
38919
|
+
}).finally(() => {
|
|
38920
|
+
textMsgContextMenuVisible.value = false;
|
|
38921
|
+
});
|
|
38922
|
+
}
|
|
38923
|
+
if (props.msg.type === "image") {
|
|
38924
|
+
copy((_a = props.msg.attach) == null ? void 0 : _a.url).then(() => {
|
|
38925
|
+
}).catch((err) => {
|
|
38926
|
+
console.error("copy error: ", err);
|
|
38927
|
+
message.error("复制失败");
|
|
38928
|
+
}).finally(() => {
|
|
38929
|
+
textMsgContextMenuVisible.value = false;
|
|
38930
|
+
});
|
|
38931
|
+
}
|
|
38728
38932
|
}
|
|
38729
38933
|
function onQuoteClick() {
|
|
38730
38934
|
var _a;
|
|
@@ -38743,6 +38947,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
38743
38947
|
emit("quote", msg);
|
|
38744
38948
|
textMsgContextMenuVisible.value = false;
|
|
38745
38949
|
}
|
|
38950
|
+
const onRevocationClick = () => {
|
|
38951
|
+
textMsgContextMenuVisible.value = false;
|
|
38952
|
+
if (!isRevocation.value) {
|
|
38953
|
+
message.error("消息已超过撤回时间");
|
|
38954
|
+
return;
|
|
38955
|
+
}
|
|
38956
|
+
emit("revokeMessage", props.msg);
|
|
38957
|
+
};
|
|
38746
38958
|
function onQuoteMsgClick() {
|
|
38747
38959
|
var _a;
|
|
38748
38960
|
emit("quoteMsgClick", (_a = msgExt.value) == null ? void 0 : _a.quoteMsg);
|
|
@@ -38851,159 +39063,185 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
38851
39063
|
}
|
|
38852
39064
|
};
|
|
38853
39065
|
return (_ctx, _cache) => {
|
|
38854
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
39066
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
38855
39067
|
return openBlock(), createElementBlock("div", {
|
|
38856
39068
|
class: normalizeClass(["yx-chatCardWrapper", { reverse: __props.msg.fromAccount === __props.myAccid }]),
|
|
38857
39069
|
"data-msg-id-client": __props.msg.msgIdClient
|
|
38858
39070
|
}, [
|
|
38859
|
-
|
|
38860
|
-
|
|
38861
|
-
|
|
38862
|
-
|
|
38863
|
-
|
|
38864
|
-
|
|
38865
|
-
|
|
38866
|
-
|
|
38867
|
-
|
|
38868
|
-
|
|
38869
|
-
|
|
38870
|
-
createElementVNode("div",
|
|
38871
|
-
createElementVNode("div",
|
|
38872
|
-
createElementVNode("
|
|
38873
|
-
|
|
38874
|
-
|
|
38875
|
-
|
|
38876
|
-
|
|
38877
|
-
|
|
38878
|
-
|
|
38879
|
-
createElementVNode("div", {
|
|
38880
|
-
class: "textMsg flash-target",
|
|
38881
|
-
onContextmenu: withModifiers(onTextMsgContextMenu, ["prevent"]),
|
|
38882
|
-
innerHTML: textMsgBody.value
|
|
38883
|
-
}, null, 40, _hoisted_7$4)
|
|
38884
|
-
], 2)) : __props.msg.type === "file" ? (openBlock(), createElementBlock("div", {
|
|
38885
|
-
key: 1,
|
|
38886
|
-
class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
|
|
38887
|
-
}, [
|
|
38888
|
-
createElementVNode("a", {
|
|
38889
|
-
class: "fileMsg",
|
|
38890
|
-
target: "_blank",
|
|
38891
|
-
href: (_b = (_a = __props.msg) == null ? void 0 : _a.attach) == null ? void 0 : _b.url
|
|
39071
|
+
((_a = __props.msg.updateOperatorInfo) == null ? void 0 : _a.ps) ? (openBlock(), createElementBlock("div", _hoisted_2$7, 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 }, [
|
|
39072
|
+
createElementVNode("div", _hoisted_3$7, [
|
|
39073
|
+
createVNode(_sfc_main$a, {
|
|
39074
|
+
avatar: myAvatar.value,
|
|
39075
|
+
nick: __props.msg.fromNick,
|
|
39076
|
+
accid: __props.msg.fromAccount,
|
|
39077
|
+
width: 32,
|
|
39078
|
+
border: 0,
|
|
39079
|
+
style: { "min-width": "32px" }
|
|
39080
|
+
}, null, 8, ["avatar", "nick", "accid"])
|
|
39081
|
+
]),
|
|
39082
|
+
createElementVNode("div", _hoisted_4$7, [
|
|
39083
|
+
createElementVNode("div", null, [
|
|
39084
|
+
createElementVNode("div", _hoisted_5$6, [
|
|
39085
|
+
createElementVNode("span", _hoisted_6$6, toDisplayString(__props.msg.fromNick), 1),
|
|
39086
|
+
createElementVNode("span", _hoisted_7$4, toDisplayString(time.value), 1)
|
|
39087
|
+
]),
|
|
39088
|
+
__props.msg.type === "text" ? (openBlock(), createElementBlock("div", {
|
|
39089
|
+
key: 0,
|
|
39090
|
+
class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
|
|
38892
39091
|
}, [
|
|
38893
|
-
|
|
38894
|
-
|
|
38895
|
-
|
|
38896
|
-
|
|
38897
|
-
}
|
|
38898
|
-
|
|
38899
|
-
|
|
38900
|
-
|
|
38901
|
-
|
|
38902
|
-
|
|
38903
|
-
|
|
38904
|
-
|
|
38905
|
-
|
|
38906
|
-
|
|
38907
|
-
|
|
38908
|
-
|
|
38909
|
-
|
|
38910
|
-
|
|
38911
|
-
|
|
38912
|
-
|
|
38913
|
-
|
|
38914
|
-
|
|
38915
|
-
|
|
38916
|
-
|
|
38917
|
-
|
|
38918
|
-
|
|
38919
|
-
|
|
38920
|
-
|
|
38921
|
-
|
|
38922
|
-
|
|
38923
|
-
|
|
38924
|
-
|
|
38925
|
-
|
|
38926
|
-
|
|
38927
|
-
|
|
38928
|
-
|
|
38929
|
-
|
|
38930
|
-
|
|
38931
|
-
|
|
38932
|
-
|
|
38933
|
-
|
|
38934
|
-
|
|
38935
|
-
|
|
38936
|
-
|
|
38937
|
-
|
|
38938
|
-
|
|
38939
|
-
|
|
38940
|
-
|
|
38941
|
-
|
|
38942
|
-
|
|
38943
|
-
|
|
38944
|
-
|
|
38945
|
-
|
|
38946
|
-
|
|
38947
|
-
|
|
38948
|
-
|
|
38949
|
-
|
|
38950
|
-
|
|
38951
|
-
createElementVNode("div", _hoisted_12$3, [
|
|
38952
|
-
createVNode(unref(EyeOutlined))
|
|
39092
|
+
createElementVNode("div", {
|
|
39093
|
+
class: "textMsg flash-target",
|
|
39094
|
+
onContextmenu: withModifiers(onTextMsgContextMenu, ["prevent"]),
|
|
39095
|
+
innerHTML: textMsgBody.value
|
|
39096
|
+
}, null, 40, _hoisted_8$4)
|
|
39097
|
+
], 2)) : __props.msg.type === "file" ? (openBlock(), createElementBlock("div", {
|
|
39098
|
+
key: 1,
|
|
39099
|
+
class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
|
|
39100
|
+
}, [
|
|
39101
|
+
createElementVNode("a", {
|
|
39102
|
+
class: "fileMsg",
|
|
39103
|
+
target: "_blank",
|
|
39104
|
+
href: (_d = (_c = __props.msg) == null ? void 0 : _c.attach) == null ? void 0 : _d.url
|
|
39105
|
+
}, [
|
|
39106
|
+
ext.value === "pdf" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
39107
|
+
key: 0,
|
|
39108
|
+
type: "icon-PDF",
|
|
39109
|
+
style: { "font-size": "40px" }
|
|
39110
|
+
})) : ext.value === "word" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
39111
|
+
key: 1,
|
|
39112
|
+
type: "icon-Word",
|
|
39113
|
+
style: { "font-size": "40px" }
|
|
39114
|
+
})) : ext.value === "excel" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
39115
|
+
key: 2,
|
|
39116
|
+
type: "icon-Excel",
|
|
39117
|
+
style: { "font-size": "40px" }
|
|
39118
|
+
})) : ext.value === "ppt" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
39119
|
+
key: 3,
|
|
39120
|
+
type: "icon-PPT",
|
|
39121
|
+
style: { "font-size": "40px" }
|
|
39122
|
+
})) : ext.value === "zip" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
39123
|
+
key: 4,
|
|
39124
|
+
type: "icon-RAR1",
|
|
39125
|
+
style: { "font-size": "40px" }
|
|
39126
|
+
})) : ext.value === "video" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
39127
|
+
key: 5,
|
|
39128
|
+
type: "icon-shipin",
|
|
39129
|
+
style: { "font-size": "40px" }
|
|
39130
|
+
})) : ext.value === "audio" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
39131
|
+
key: 6,
|
|
39132
|
+
type: "icon-yinle",
|
|
39133
|
+
style: { "font-size": "40px" }
|
|
39134
|
+
})) : ext.value === "img" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
39135
|
+
key: 7,
|
|
39136
|
+
type: "icon-tupian2",
|
|
39137
|
+
style: { "font-size": "40px" }
|
|
39138
|
+
})) : ext.value === "txt" ? (openBlock(), createBlock(unref(FileIconFont), {
|
|
39139
|
+
key: 8,
|
|
39140
|
+
type: "icon-qita",
|
|
39141
|
+
style: { "font-size": "40px" }
|
|
39142
|
+
})) : (openBlock(), createBlock(unref(FileIconFont), {
|
|
39143
|
+
key: 9,
|
|
39144
|
+
type: "icon-weizhiwenjian",
|
|
39145
|
+
style: { "font-size": "40px" }
|
|
39146
|
+
})),
|
|
39147
|
+
createElementVNode("div", _hoisted_10$3, [
|
|
39148
|
+
createElementVNode("div", _hoisted_11$3, toDisplayString((_f = (_e = __props.msg) == null ? void 0 : _e.attach) == null ? void 0 : _f.name), 1),
|
|
39149
|
+
createElementVNode("div", _hoisted_12$3, toDisplayString(size.value), 1)
|
|
38953
39150
|
])
|
|
38954
|
-
])
|
|
38955
|
-
|
|
38956
|
-
|
|
38957
|
-
|
|
38958
|
-
|
|
38959
|
-
class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
|
|
38960
|
-
}, [..._cache[1] || (_cache[1] = [
|
|
38961
|
-
createElementVNode("div", { class: "textMsg" }, toDisplayString("暂不支持该消息"), -1)
|
|
38962
|
-
])], 2)),
|
|
38963
|
-
((_g = msgExt.value) == null ? void 0 : _g.quoteMsg) ? (openBlock(), createElementBlock("div", _hoisted_13$3, [
|
|
38964
|
-
createElementVNode("div", {
|
|
38965
|
-
class: "chatCardQuoteMsg",
|
|
38966
|
-
onClick: onQuoteMsgClick
|
|
39151
|
+
], 8, _hoisted_9$3)
|
|
39152
|
+
], 2)) : __props.msg.type === "image" ? (openBlock(), createElementBlock("div", {
|
|
39153
|
+
key: 2,
|
|
39154
|
+
class: normalizeClass(["chatCardMainContent flash-target", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }]),
|
|
39155
|
+
onContextmenu: withModifiers(onTextMsgContextMenu, ["prevent"])
|
|
38967
39156
|
}, [
|
|
38968
|
-
|
|
38969
|
-
|
|
39157
|
+
createVNode(unref(Image), {
|
|
39158
|
+
class: "imgMsg",
|
|
39159
|
+
src: (_h = (_g = __props.msg) == null ? void 0 : _g.attach) == null ? void 0 : _h.url,
|
|
39160
|
+
width: imageMsgSize.value.width,
|
|
39161
|
+
height: imageMsgSize.value.height
|
|
39162
|
+
}, {
|
|
39163
|
+
previewMask: withCtx(() => [
|
|
39164
|
+
createElementVNode("div", _hoisted_13$3, [
|
|
39165
|
+
createVNode(unref(EyeOutlined))
|
|
39166
|
+
])
|
|
39167
|
+
]),
|
|
39168
|
+
_: 1
|
|
39169
|
+
}, 8, ["src", "width", "height"])
|
|
39170
|
+
], 34)) : (openBlock(), createElementBlock("div", {
|
|
39171
|
+
key: 3,
|
|
39172
|
+
class: normalizeClass(["chatCardMainContent", { myMsg: __props.msg.fromAccount === __props.myAccid, otherMsg: __props.msg.fromAccount !== __props.myAccid }])
|
|
39173
|
+
}, [..._cache[1] || (_cache[1] = [
|
|
39174
|
+
createElementVNode("div", { class: "textMsg" }, toDisplayString("暂不支持该消息"), -1)
|
|
39175
|
+
])], 2)),
|
|
39176
|
+
__props.msg.type === "text" && ["jpg", "jpeg", "png", "gif"].includes(((_j = (_i = __props.msg) == null ? void 0 : _i.attach) == null ? void 0 : _j.ext) || "") ? (openBlock(), createElementBlock("div", _hoisted_14$3, [
|
|
39177
|
+
((_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), {
|
|
38970
39178
|
key: 0,
|
|
38971
|
-
class: "
|
|
38972
|
-
|
|
38973
|
-
|
|
38974
|
-
|
|
38975
|
-
key: 1,
|
|
38976
|
-
class: "imgMsg quoteMsgImg",
|
|
38977
|
-
src: (_h = msgExt.value.quoteMsg.attach) == null ? void 0 : _h.url,
|
|
38978
|
-
width: quoteImageMsgSize.value.width,
|
|
38979
|
-
height: quoteImageMsgSize.value.height,
|
|
38980
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
38981
|
-
}, ["stop", "prevent"]))
|
|
39179
|
+
class: "imgMsg",
|
|
39180
|
+
src: (_p = (_o = __props.msg) == null ? void 0 : _o.attach) == null ? void 0 : _p.url,
|
|
39181
|
+
width: imageMsgSize.value.width,
|
|
39182
|
+
height: imageMsgSize.value.height
|
|
38982
39183
|
}, {
|
|
38983
39184
|
previewMask: withCtx(() => [
|
|
38984
|
-
createElementVNode("div",
|
|
39185
|
+
createElementVNode("div", _hoisted_15$3, [
|
|
38985
39186
|
createVNode(unref(EyeOutlined))
|
|
38986
39187
|
])
|
|
38987
39188
|
]),
|
|
38988
39189
|
_: 1
|
|
38989
|
-
}, 8, ["src", "width", "height"])) :
|
|
38990
|
-
|
|
38991
|
-
|
|
38992
|
-
|
|
38993
|
-
|
|
38994
|
-
|
|
38995
|
-
|
|
38996
|
-
|
|
38997
|
-
|
|
38998
|
-
|
|
38999
|
-
|
|
39000
|
-
|
|
39001
|
-
|
|
39002
|
-
|
|
39003
|
-
|
|
39004
|
-
|
|
39190
|
+
}, 8, ["src", "width", "height"])) : (openBlock(), createBlock(_sfc_main$9, {
|
|
39191
|
+
key: 1,
|
|
39192
|
+
attach: (_q = __props.msg) == null ? void 0 : _q.attach
|
|
39193
|
+
}, null, 8, ["attach"]))
|
|
39194
|
+
])) : createCommentVNode("", true),
|
|
39195
|
+
((_r = msgExt.value) == null ? void 0 : _r.quoteMsg) ? (openBlock(), createElementBlock("div", _hoisted_16$2, [
|
|
39196
|
+
createElementVNode("div", {
|
|
39197
|
+
class: "chatCardQuoteMsg",
|
|
39198
|
+
onClick: onQuoteMsgClick
|
|
39199
|
+
}, [
|
|
39200
|
+
createElementVNode("div", _hoisted_17$2, [
|
|
39201
|
+
createVNode(_sfc_main$9, {
|
|
39202
|
+
attach: msgExt.value.quoteMsg.attach
|
|
39203
|
+
}, null, 8, ["attach"])
|
|
39204
|
+
]),
|
|
39205
|
+
createElementVNode("div", _hoisted_18$2, toDisplayString(msgExt.value.quoteMsg.fromNick) + ":", 1),
|
|
39206
|
+
msgExt.value.quoteMsg.body ? (openBlock(), createElementBlock("div", {
|
|
39207
|
+
key: 0,
|
|
39208
|
+
class: "quoteMsgText",
|
|
39209
|
+
innerHTML: msgExt.value.quoteMsg.body
|
|
39210
|
+
}, null, 8, _hoisted_19$2)) : createCommentVNode("", true),
|
|
39211
|
+
msgExt.value.quoteMsg.type === "image" ? (openBlock(), createBlock(unref(Image), {
|
|
39212
|
+
key: 1,
|
|
39213
|
+
class: "imgMsg quoteMsgImg",
|
|
39214
|
+
src: (_s = msgExt.value.quoteMsg.attach) == null ? void 0 : _s.url,
|
|
39215
|
+
width: quoteImageMsgSize.value.width,
|
|
39216
|
+
height: quoteImageMsgSize.value.height,
|
|
39217
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
39218
|
+
}, ["stop", "prevent"]))
|
|
39219
|
+
}, {
|
|
39220
|
+
previewMask: withCtx(() => [
|
|
39221
|
+
createElementVNode("div", _hoisted_20$2, [
|
|
39222
|
+
createVNode(unref(EyeOutlined))
|
|
39223
|
+
])
|
|
39224
|
+
]),
|
|
39225
|
+
_: 1
|
|
39226
|
+
}, 8, ["src", "width", "height"])) : createCommentVNode("", true)
|
|
39227
|
+
])
|
|
39228
|
+
])) : createCommentVNode("", true)
|
|
39229
|
+
]),
|
|
39230
|
+
createElementVNode("div", _hoisted_21$2, [
|
|
39231
|
+
__props.msg.deliveryStatus === "failed" ? (openBlock(), createBlock(unref(Button), {
|
|
39232
|
+
key: 0,
|
|
39233
|
+
type: "text",
|
|
39234
|
+
danger: "",
|
|
39235
|
+
onClick: resendHandler
|
|
39236
|
+
}, {
|
|
39237
|
+
icon: withCtx(() => [
|
|
39238
|
+
createVNode(unref(ExclamationCircleFilled))
|
|
39239
|
+
]),
|
|
39240
|
+
_: 1
|
|
39241
|
+
})) : __props.msg.deliveryStatus === "sending" ? (openBlock(), createBlock(unref(LoadingOutlined), { key: 1 })) : createCommentVNode("", true)
|
|
39242
|
+
])
|
|
39005
39243
|
])
|
|
39006
|
-
]),
|
|
39244
|
+
], 64)),
|
|
39007
39245
|
withDirectives(createElementVNode("div", {
|
|
39008
39246
|
ref_key: "textMsgContextMenuRef",
|
|
39009
39247
|
ref: textMsgContextMenuRef,
|
|
@@ -39017,7 +39255,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
39017
39255
|
createElementVNode("div", {
|
|
39018
39256
|
class: "yx-chatCardTextMsgContextMenu-item",
|
|
39019
39257
|
onClick: onQuoteClick
|
|
39020
|
-
}, "引用")
|
|
39258
|
+
}, "引用"),
|
|
39259
|
+
isRevocation.value ? (openBlock(), createElementBlock("div", {
|
|
39260
|
+
key: 0,
|
|
39261
|
+
class: "yx-chatCardTextMsgContextMenu-item",
|
|
39262
|
+
onClick: onRevocationClick
|
|
39263
|
+
}, " 撤回 ")) : createCommentVNode("", true)
|
|
39021
39264
|
], 4), [
|
|
39022
39265
|
[vShow, textMsgContextMenuVisible.value]
|
|
39023
39266
|
])
|
|
@@ -39139,7 +39382,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
39139
39382
|
onMousedown: withModifiers(($event) => onSelect($event, index2), ["prevent"])
|
|
39140
39383
|
}, [
|
|
39141
39384
|
createElementVNode("div", _hoisted_3$6, [
|
|
39142
|
-
createVNode(_sfc_main$
|
|
39385
|
+
createVNode(_sfc_main$a, {
|
|
39143
39386
|
avatar: item.avatar,
|
|
39144
39387
|
nick: item.nick,
|
|
39145
39388
|
accid: item.accid,
|
|
@@ -39681,19 +39924,29 @@ const _hoisted_8$3 = {
|
|
|
39681
39924
|
key: 0,
|
|
39682
39925
|
class: "chatroomInputQuoteWrapper"
|
|
39683
39926
|
};
|
|
39684
|
-
const _hoisted_9$2 = { class: "
|
|
39685
|
-
const _hoisted_10$2 = { class: "
|
|
39686
|
-
const _hoisted_11$2 =
|
|
39687
|
-
const _hoisted_12$2 =
|
|
39927
|
+
const _hoisted_9$2 = { class: "chatroomInputQuoteAttachBox" };
|
|
39928
|
+
const _hoisted_10$2 = { class: "chatroomInputQuoteText" };
|
|
39929
|
+
const _hoisted_11$2 = { class: "chatroomInputQuoteTextName" };
|
|
39930
|
+
const _hoisted_12$2 = ["innerHTML"];
|
|
39931
|
+
const _hoisted_13$2 = {
|
|
39688
39932
|
key: 0,
|
|
39689
39933
|
class: "chatroomInputQuoteWrapperImg"
|
|
39690
39934
|
};
|
|
39691
|
-
const
|
|
39692
|
-
|
|
39693
|
-
|
|
39694
|
-
|
|
39695
|
-
const
|
|
39696
|
-
|
|
39935
|
+
const _hoisted_14$2 = {
|
|
39936
|
+
key: 1,
|
|
39937
|
+
class: "chatroomInputAttachmentWrapper"
|
|
39938
|
+
};
|
|
39939
|
+
const _hoisted_15$2 = {
|
|
39940
|
+
key: 0,
|
|
39941
|
+
class: "chatroomInputAttachmentWrapperImg"
|
|
39942
|
+
};
|
|
39943
|
+
const _hoisted_16$1 = { class: "chatroomInputAttachmentWrapperImgMask" };
|
|
39944
|
+
const _hoisted_17$1 = { class: "chatroomInputWrapper" };
|
|
39945
|
+
const _hoisted_18$1 = { class: "chatroomInputLeft" };
|
|
39946
|
+
const _hoisted_19$1 = { style: { "width": "400px" } };
|
|
39947
|
+
const _hoisted_20$1 = ["onClick"];
|
|
39948
|
+
const _hoisted_21$1 = { class: "chatroomController" };
|
|
39949
|
+
const MAX_IMG_SIZE = 10;
|
|
39697
39950
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
39698
39951
|
...{
|
|
39699
39952
|
name: "ChatContent"
|
|
@@ -39719,8 +39972,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
39719
39972
|
const props = __props;
|
|
39720
39973
|
const emit = __emit;
|
|
39721
39974
|
const quoteMsg = ref();
|
|
39975
|
+
const attachment = ref();
|
|
39722
39976
|
const curText = ref("");
|
|
39723
39977
|
const cursorIndex = ref(0);
|
|
39978
|
+
const attachmentUploading = ref(false);
|
|
39724
39979
|
const contentRef = ref();
|
|
39725
39980
|
const contentScrollLocked = ref(false);
|
|
39726
39981
|
const loadingMore = ref(false);
|
|
@@ -39808,9 +40063,18 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
39808
40063
|
}
|
|
39809
40064
|
});
|
|
39810
40065
|
};
|
|
40066
|
+
const handleRevokeMessage = (msg) => {
|
|
40067
|
+
channelStore.revokeMessage({
|
|
40068
|
+
ps: "撤回了一条消息",
|
|
40069
|
+
message: msg
|
|
40070
|
+
});
|
|
40071
|
+
};
|
|
39811
40072
|
const handleDeleteQuoteMsg = () => {
|
|
39812
40073
|
quoteMsg.value = void 0;
|
|
39813
40074
|
};
|
|
40075
|
+
const handleDeleteAttachment = () => {
|
|
40076
|
+
attachment.value = void 0;
|
|
40077
|
+
};
|
|
39814
40078
|
watch(
|
|
39815
40079
|
() => props.msgs,
|
|
39816
40080
|
(value, oldValue) => {
|
|
@@ -39842,11 +40106,27 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
39842
40106
|
}
|
|
39843
40107
|
}
|
|
39844
40108
|
);
|
|
40109
|
+
const inputMap = /* @__PURE__ */ new Map();
|
|
39845
40110
|
watch(
|
|
39846
40111
|
() => channelStore.currentChannel,
|
|
39847
|
-
() => {
|
|
39848
|
-
|
|
39849
|
-
|
|
40112
|
+
(value, oldValue) => {
|
|
40113
|
+
if (oldValue == null ? void 0 : oldValue.channelId) {
|
|
40114
|
+
inputMap.set(oldValue == null ? void 0 : oldValue.channelId, {
|
|
40115
|
+
input: curText.value,
|
|
40116
|
+
quoteMsg: quoteMsg.value,
|
|
40117
|
+
attachment: attachment.value
|
|
40118
|
+
});
|
|
40119
|
+
}
|
|
40120
|
+
if ((value == null ? void 0 : value.channelId) && inputMap.has((value == null ? void 0 : value.channelId) || "")) {
|
|
40121
|
+
const mapValue = inputMap.get((value == null ? void 0 : value.channelId) || "");
|
|
40122
|
+
curText.value = (mapValue == null ? void 0 : mapValue.input) || "";
|
|
40123
|
+
quoteMsg.value = mapValue == null ? void 0 : mapValue.quoteMsg;
|
|
40124
|
+
attachment.value = mapValue == null ? void 0 : mapValue.attachment;
|
|
40125
|
+
} else {
|
|
40126
|
+
curText.value = "";
|
|
40127
|
+
quoteMsg.value = void 0;
|
|
40128
|
+
attachment.value = void 0;
|
|
40129
|
+
}
|
|
39850
40130
|
}
|
|
39851
40131
|
);
|
|
39852
40132
|
const inputPlaceholder = computed(
|
|
@@ -39882,10 +40162,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
39882
40162
|
ext: {
|
|
39883
40163
|
quoteMsg: quoteMsg.value
|
|
39884
40164
|
},
|
|
39885
|
-
mentionAccids: mentionAccids.value
|
|
40165
|
+
mentionAccids: mentionAccids.value,
|
|
40166
|
+
attach: attachment.value
|
|
40167
|
+
// 传递附件
|
|
39886
40168
|
});
|
|
39887
40169
|
curText.value = "";
|
|
39888
40170
|
quoteMsg.value = void 0;
|
|
40171
|
+
attachment.value = void 0;
|
|
39889
40172
|
scrollToBottomAfterSend();
|
|
39890
40173
|
}
|
|
39891
40174
|
}
|
|
@@ -39897,10 +40180,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
39897
40180
|
ext: {
|
|
39898
40181
|
quoteMsg: quoteMsg.value
|
|
39899
40182
|
},
|
|
39900
|
-
mentionAccids: mentionAccids.value
|
|
40183
|
+
mentionAccids: mentionAccids.value,
|
|
40184
|
+
attach: attachment.value
|
|
40185
|
+
// 传递附件
|
|
39901
40186
|
});
|
|
39902
40187
|
curText.value = "";
|
|
39903
40188
|
quoteMsg.value = void 0;
|
|
40189
|
+
attachment.value = void 0;
|
|
39904
40190
|
scrollToBottomAfterSend();
|
|
39905
40191
|
}
|
|
39906
40192
|
};
|
|
@@ -39922,8 +40208,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
39922
40208
|
});
|
|
39923
40209
|
}
|
|
39924
40210
|
};
|
|
39925
|
-
const handlePaste = (e) => {
|
|
39926
|
-
if (props.sendDisabled) return;
|
|
40211
|
+
const handlePaste = async (e) => {
|
|
40212
|
+
if (props.sendDisabled || attachmentUploading.value) return;
|
|
39927
40213
|
const clipboardData = e.clipboardData;
|
|
39928
40214
|
if (!clipboardData) return;
|
|
39929
40215
|
const items = clipboardData.items;
|
|
@@ -39937,20 +40223,51 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
39937
40223
|
message.error("图片大小最大支持20M");
|
|
39938
40224
|
return;
|
|
39939
40225
|
}
|
|
39940
|
-
|
|
39941
|
-
|
|
40226
|
+
attachmentUploading.value = true;
|
|
40227
|
+
try {
|
|
40228
|
+
const uploadResult = await channelStore.uploadImage({
|
|
40229
|
+
file,
|
|
40230
|
+
onUploadStart: () => {
|
|
40231
|
+
attachmentUploading.value = true;
|
|
40232
|
+
},
|
|
40233
|
+
onUploadDone: () => {
|
|
40234
|
+
attachmentUploading.value = false;
|
|
40235
|
+
}
|
|
40236
|
+
});
|
|
40237
|
+
attachment.value = uploadResult;
|
|
40238
|
+
} catch (error) {
|
|
40239
|
+
console.error("上传图片失败:", error);
|
|
40240
|
+
message.error("上传图片失败");
|
|
40241
|
+
attachmentUploading.value = false;
|
|
40242
|
+
}
|
|
39942
40243
|
}
|
|
39943
40244
|
return;
|
|
39944
40245
|
}
|
|
39945
40246
|
}
|
|
39946
40247
|
};
|
|
39947
|
-
const uploadImgHandler = (file) => {
|
|
40248
|
+
const uploadImgHandler = async (file) => {
|
|
39948
40249
|
if (!isLt(file.size, MAX_IMG_SIZE)) {
|
|
39949
40250
|
message.error(`图片大小最大支持${MAX_IMG_SIZE}M`);
|
|
39950
|
-
return;
|
|
40251
|
+
return false;
|
|
39951
40252
|
}
|
|
39952
|
-
|
|
39953
|
-
|
|
40253
|
+
attachmentUploading.value = true;
|
|
40254
|
+
try {
|
|
40255
|
+
const uploadResult = await channelStore.uploadImage({
|
|
40256
|
+
file,
|
|
40257
|
+
onUploadStart: () => {
|
|
40258
|
+
attachmentUploading.value = true;
|
|
40259
|
+
},
|
|
40260
|
+
onUploadDone: () => {
|
|
40261
|
+
attachmentUploading.value = false;
|
|
40262
|
+
}
|
|
40263
|
+
});
|
|
40264
|
+
attachment.value = uploadResult;
|
|
40265
|
+
} catch (error) {
|
|
40266
|
+
console.error("上传图片失败:", error);
|
|
40267
|
+
message.error("上传图片失败");
|
|
40268
|
+
attachmentUploading.value = false;
|
|
40269
|
+
}
|
|
40270
|
+
return false;
|
|
39954
40271
|
};
|
|
39955
40272
|
const emjjData = [
|
|
39956
40273
|
"😀",
|
|
@@ -40144,7 +40461,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
40144
40461
|
onResendFile: handleResendFile,
|
|
40145
40462
|
onContextMenuSwitch,
|
|
40146
40463
|
onQuote: handleQuote,
|
|
40147
|
-
onQuoteMsgClick: handleQuoteMsgClick
|
|
40464
|
+
onQuoteMsgClick: handleQuoteMsgClick,
|
|
40465
|
+
onRevokeMessage: handleRevokeMessage
|
|
40148
40466
|
}, null, 8, ["msg", "my-avatar", "my-accid"]);
|
|
40149
40467
|
}), 128))
|
|
40150
40468
|
])) : (openBlock(), createElementBlock("div", {
|
|
@@ -40165,14 +40483,19 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
40165
40483
|
onClick: handleDeleteQuoteMsg
|
|
40166
40484
|
}),
|
|
40167
40485
|
createElementVNode("div", _hoisted_9$2, [
|
|
40168
|
-
|
|
40486
|
+
createVNode(_sfc_main$9, {
|
|
40487
|
+
attach: quoteMsg.value.attach
|
|
40488
|
+
}, null, 8, ["attach"])
|
|
40489
|
+
]),
|
|
40490
|
+
createElementVNode("div", _hoisted_10$2, [
|
|
40491
|
+
createElementVNode("div", _hoisted_11$2, toDisplayString(quoteMsg.value.fromNick) + ":", 1),
|
|
40169
40492
|
((_d = quoteMsg.value) == null ? void 0 : _d.body) ? (openBlock(), createElementBlock("div", {
|
|
40170
40493
|
key: 0,
|
|
40171
40494
|
class: "chatroomInputQuoteTextBody",
|
|
40172
40495
|
innerHTML: (_e = quoteMsg.value) == null ? void 0 : _e.body
|
|
40173
|
-
}, null, 8,
|
|
40496
|
+
}, null, 8, _hoisted_12$2)) : createCommentVNode("", true)
|
|
40174
40497
|
]),
|
|
40175
|
-
quoteMsg.value.type === "image" ? (openBlock(), createElementBlock("div",
|
|
40498
|
+
quoteMsg.value.type === "image" ? (openBlock(), createElementBlock("div", _hoisted_13$2, [
|
|
40176
40499
|
createVNode(unref(Image), {
|
|
40177
40500
|
preview: false,
|
|
40178
40501
|
class: "imgMsg quoteImg",
|
|
@@ -40182,17 +40505,34 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
40182
40505
|
}, null, 8, ["src", "width", "height"])
|
|
40183
40506
|
])) : createCommentVNode("", true)
|
|
40184
40507
|
])) : createCommentVNode("", true),
|
|
40185
|
-
|
|
40186
|
-
|
|
40508
|
+
attachment.value ? (openBlock(), createElementBlock("div", _hoisted_14$2, [
|
|
40509
|
+
["jpg", "jpeg", "png", "gif"].includes(attachment.value.ext || "") && attachment.value.url ? (openBlock(), createElementBlock("div", _hoisted_15$2, [
|
|
40510
|
+
createElementVNode("div", _hoisted_16$1, [
|
|
40511
|
+
createVNode(unref(DeleteOutlined), {
|
|
40512
|
+
class: "chatroomInputAttachmentDeleteBtn",
|
|
40513
|
+
onClick: handleDeleteAttachment
|
|
40514
|
+
})
|
|
40515
|
+
]),
|
|
40516
|
+
createVNode(unref(Image), {
|
|
40517
|
+
preview: false,
|
|
40518
|
+
class: "imgMsg quoteImg",
|
|
40519
|
+
src: attachment.value.url,
|
|
40520
|
+
width: 60,
|
|
40521
|
+
height: 60
|
|
40522
|
+
}, null, 8, ["src"])
|
|
40523
|
+
])) : createCommentVNode("", true)
|
|
40524
|
+
])) : createCommentVNode("", true),
|
|
40525
|
+
createElementVNode("div", _hoisted_17$1, [
|
|
40526
|
+
createElementVNode("div", _hoisted_18$1, [
|
|
40187
40527
|
createVNode(unref(Popover), { placement: "topLeft" }, {
|
|
40188
40528
|
content: withCtx(() => [
|
|
40189
|
-
createElementVNode("div",
|
|
40529
|
+
createElementVNode("div", _hoisted_19$1, [
|
|
40190
40530
|
(openBlock(), createElementBlock(Fragment, null, renderList(emjjData, (value, i) => {
|
|
40191
40531
|
return createElementVNode("span", {
|
|
40192
40532
|
key: i,
|
|
40193
40533
|
style: { "font-size": "16px", "cursor": "pointer" },
|
|
40194
40534
|
onClick: ($event) => insertEmj(i)
|
|
40195
|
-
}, toDisplayString(value), 9,
|
|
40535
|
+
}, toDisplayString(value), 9, _hoisted_20$1);
|
|
40196
40536
|
}), 64))
|
|
40197
40537
|
])
|
|
40198
40538
|
]),
|
|
@@ -40237,19 +40577,20 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
40237
40577
|
onBlur: handleInputBlur,
|
|
40238
40578
|
onPaste: handlePaste
|
|
40239
40579
|
}, null, 8, ["value", "placeholder", "disabled", "onKeydown", "onClick"]),
|
|
40240
|
-
createElementVNode("div",
|
|
40580
|
+
createElementVNode("div", _hoisted_21$1, [
|
|
40241
40581
|
createVNode(unref(Upload), {
|
|
40242
40582
|
"before-upload": uploadImgHandler,
|
|
40243
40583
|
"show-upload-list": false,
|
|
40244
40584
|
accept: ".jpg,.png,.jpeg",
|
|
40245
|
-
disabled: __props.sendDisabled
|
|
40585
|
+
disabled: __props.sendDisabled || attachmentUploading.value,
|
|
40586
|
+
class: "chatroomInputUpload"
|
|
40246
40587
|
}, {
|
|
40247
40588
|
default: withCtx(() => [
|
|
40248
40589
|
createVNode(unref(Button), {
|
|
40249
40590
|
class: "chatroomButton",
|
|
40250
40591
|
type: "text",
|
|
40251
|
-
loading:
|
|
40252
|
-
disabled: __props.sendDisabled
|
|
40592
|
+
loading: attachmentUploading.value,
|
|
40593
|
+
disabled: __props.sendDisabled || attachmentUploading.value
|
|
40253
40594
|
}, {
|
|
40254
40595
|
icon: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
40255
40596
|
createElementVNode("svg", {
|
|
@@ -40375,7 +40716,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
40375
40716
|
);
|
|
40376
40717
|
const sendMessage = (type, file, option) => {
|
|
40377
40718
|
if (type === "textMsg") {
|
|
40378
|
-
channelStore.sendTextMsg({
|
|
40719
|
+
channelStore.sendTextMsg({
|
|
40720
|
+
body: file,
|
|
40721
|
+
ext: option == null ? void 0 : option.ext,
|
|
40722
|
+
mentionAccids: option == null ? void 0 : option.mentionAccids,
|
|
40723
|
+
attach: option == null ? void 0 : option.attach
|
|
40724
|
+
// 传递附件
|
|
40725
|
+
});
|
|
40379
40726
|
return;
|
|
40380
40727
|
}
|
|
40381
40728
|
if (type === "SendImg") {
|
|
@@ -40869,6 +41216,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
40869
41216
|
};
|
|
40870
41217
|
const getChannelUnread = (channelId) => {
|
|
40871
41218
|
const channel = channelList.value.find((c) => c.channelId === channelId);
|
|
41219
|
+
console.log("channel", channel);
|
|
40872
41220
|
return (channel == null ? void 0 : channel.unreadCount) || 0;
|
|
40873
41221
|
};
|
|
40874
41222
|
const handleSelectServer = async (server) => {
|
|
@@ -40958,11 +41306,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
40958
41306
|
cancelText: "取消",
|
|
40959
41307
|
wrapClassName: "delete-channel-modal",
|
|
40960
41308
|
async onOk() {
|
|
40961
|
-
var _a;
|
|
41309
|
+
var _a, _b;
|
|
40962
41310
|
try {
|
|
40963
|
-
await window.qchat.qchatChannel.deleteChannel({
|
|
41311
|
+
await ((_a = window.qchat) == null ? void 0 : _a.qchatChannel.deleteChannel({
|
|
40964
41312
|
channelId: channelForm.value.channelId
|
|
40965
|
-
});
|
|
41313
|
+
}));
|
|
40966
41314
|
message.success("删除成功");
|
|
40967
41315
|
channelModalVisible.value = false;
|
|
40968
41316
|
await channelStore.getChannelsByPage({
|
|
@@ -40970,7 +41318,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
40970
41318
|
timetag: 0,
|
|
40971
41319
|
limit
|
|
40972
41320
|
});
|
|
40973
|
-
if (((
|
|
41321
|
+
if (((_b = currentChannel.value) == null ? void 0 : _b.channelId) === channelForm.value.channelId) {
|
|
40974
41322
|
if (channelStore.channelList.length > 0) {
|
|
40975
41323
|
emit("selectChannel", channelStore.channelList[0]);
|
|
40976
41324
|
} else {
|
|
@@ -41140,7 +41488,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
41140
41488
|
style: normalizeStyle({ width: userPanelWidth.value + "px" })
|
|
41141
41489
|
}, [
|
|
41142
41490
|
createElementVNode("div", _hoisted_15, [
|
|
41143
|
-
createVNode(_sfc_main$
|
|
41491
|
+
createVNode(_sfc_main$a, {
|
|
41144
41492
|
avatar: userProfile.value.avatar,
|
|
41145
41493
|
nick: userProfile.value.nick,
|
|
41146
41494
|
accid: currentAccount.value,
|
|
@@ -41319,7 +41667,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
41319
41667
|
};
|
|
41320
41668
|
}
|
|
41321
41669
|
});
|
|
41322
|
-
const ServerChannelSidebar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
41670
|
+
const ServerChannelSidebar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-961f30d7"]]);
|
|
41323
41671
|
const _hoisted_1$1 = { class: "members-header" };
|
|
41324
41672
|
const _hoisted_2$1 = {
|
|
41325
41673
|
key: 0,
|
|
@@ -41456,7 +41804,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
41456
41804
|
}, {
|
|
41457
41805
|
default: withCtx(() => [
|
|
41458
41806
|
createElementVNode("div", _hoisted_4$1, [
|
|
41459
|
-
createVNode(_sfc_main$
|
|
41807
|
+
createVNode(_sfc_main$a, {
|
|
41460
41808
|
avatar: member.avatar,
|
|
41461
41809
|
nick: member.nick,
|
|
41462
41810
|
accid: member.accid,
|
|
@@ -41829,7 +42177,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41829
42177
|
};
|
|
41830
42178
|
}
|
|
41831
42179
|
});
|
|
41832
|
-
const IndexEntry = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
42180
|
+
const IndexEntry = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-240f366f"]]);
|
|
41833
42181
|
const componentList = [
|
|
41834
42182
|
"chat-card",
|
|
41835
42183
|
"chat-content",
|
|
@@ -41850,7 +42198,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
41850
42198
|
ChatContent: _sfc_main$5,
|
|
41851
42199
|
ChatPage: _sfc_main$3,
|
|
41852
42200
|
ChatRoom: _sfc_main$4,
|
|
41853
|
-
CommonAvatar: _sfc_main$
|
|
42201
|
+
CommonAvatar: _sfc_main$a,
|
|
41854
42202
|
IconFont: IconFont$1,
|
|
41855
42203
|
IndexEntry,
|
|
41856
42204
|
MembersSidebar,
|