yx-web-sdk 0.0.19 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/ait-person-popover/index.js +1 -1
  2. package/dist/chat-card/index.js +1 -1
  3. package/dist/chat-content/index.js +1 -1
  4. package/dist/chat-page/index.js +1 -1
  5. package/dist/chat-room/index.js +1 -1
  6. package/dist/common-avatar/index.js +1 -1
  7. package/dist/components/img-info-wrapper/index.d.ts +0 -0
  8. package/dist/components/img-info-wrapper/index.vue.d.ts +6 -0
  9. package/dist/img-info-wrapper/index.js +1 -0
  10. package/dist/index/style2.css +30 -162
  11. package/dist/index/style4.css +177 -125
  12. package/dist/index/style6.css +513 -25
  13. package/dist/index/style7.css +143 -466
  14. package/dist/{index-DHnPD8u9.mjs → index-BPnLB3av.mjs} +1 -1
  15. package/dist/{index-BjIqS2ZC.mjs → index-DME8_VYv.mjs} +2 -2
  16. package/dist/{index-D5gp5t2F.mjs → index-Dwglj7_M.mjs} +1 -1
  17. package/dist/index-entry/index.js +4 -4
  18. package/dist/{index.vue_vue_type_script_setup_true_lang-CkWszgC3.mjs → index.vue_vue_type_script_setup_true_lang-CD6o8jT4.mjs} +9 -3
  19. package/dist/{index.vue_vue_type_style_index_0_lang-C-imP01W.mjs → index.vue_vue_type_style_index_0_lang-BJGCxPce.mjs} +3 -3
  20. package/dist/{index.vue_vue_type_style_index_0_lang-CAZ44kgX.mjs → index.vue_vue_type_style_index_0_lang-BaKNB-4q.mjs} +33 -7
  21. package/dist/{index.vue_vue_type_style_index_0_lang-CA27kCm1.mjs → index.vue_vue_type_style_index_0_lang-CsNgkPt9.mjs} +101 -17
  22. package/dist/{index.vue_vue_type_style_index_0_lang-5DeqmRdw.mjs → index.vue_vue_type_style_index_0_lang-iBkYSdDj.mjs} +156 -38
  23. package/dist/members-sidebar/index.js +1 -1
  24. package/dist/notice-box/index.js +1 -1
  25. package/dist/server-channel-sidebar/index.js +1 -1
  26. package/dist/stores/channel.d.ts +18 -2
  27. package/dist/style.css +155 -70
  28. package/dist/utils/index.d.ts +10 -2
  29. package/dist/yx-web-sdk.es.js +321 -90
  30. package/dist/yx-web-sdk.umd.js +320 -89
  31. package/package.json +1 -1
  32. /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
@@ -715,7 +715,7 @@
715
715
  newNode.setAttribute(getMark(option), key);
716
716
  return newNode;
717
717
  }
718
- function _objectSpread$b(target) {
718
+ function _objectSpread$c(target) {
719
719
  for (var i = 1; i < arguments.length; i++) {
720
720
  var source = arguments[i] != null ? Object(arguments[i]) : {};
721
721
  var ownKeys = Object.keys(source);
@@ -725,12 +725,12 @@
725
725
  }));
726
726
  }
727
727
  ownKeys.forEach(function(key) {
728
- _defineProperty$b(target, key, source[key]);
728
+ _defineProperty$c(target, key, source[key]);
729
729
  });
730
730
  }
731
731
  return target;
732
732
  }
733
- function _defineProperty$b(obj, key, value) {
733
+ function _defineProperty$c(obj, key, value) {
734
734
  if (key in obj) {
735
735
  Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
736
736
  } else {
@@ -751,13 +751,13 @@
751
751
  }
752
752
  function generate(node, key, rootProps) {
753
753
  if (!rootProps) {
754
- return vue.h(node.tag, _objectSpread$b({
754
+ return vue.h(node.tag, _objectSpread$c({
755
755
  key
756
756
  }, node.attrs), (node.children || []).map(function(child, index2) {
757
757
  return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index2));
758
758
  }));
759
759
  }
760
- return vue.h(node.tag, _objectSpread$b({
760
+ return vue.h(node.tag, _objectSpread$c({
761
761
  key
762
762
  }, rootProps, node.attrs), (node.children || []).map(function(child, index2) {
763
763
  return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index2));
@@ -840,7 +840,7 @@
840
840
  }
841
841
  return target;
842
842
  }
843
- function _objectSpread$a(target) {
843
+ function _objectSpread$b(target) {
844
844
  for (var i = 1; i < arguments.length; i++) {
845
845
  var source = arguments[i] != null ? Object(arguments[i]) : {};
846
846
  var ownKeys = Object.keys(source);
@@ -850,12 +850,12 @@
850
850
  }));
851
851
  }
852
852
  ownKeys.forEach(function(key) {
853
- _defineProperty$a(target, key, source[key]);
853
+ _defineProperty$b(target, key, source[key]);
854
854
  });
855
855
  }
856
856
  return target;
857
857
  }
858
- function _defineProperty$a(obj, key, value) {
858
+ function _defineProperty$b(obj, key, value) {
859
859
  if (key in obj) {
860
860
  Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
861
861
  } else {
@@ -875,10 +875,10 @@
875
875
  twoToneColorPalette.calculated = !!secondaryColor;
876
876
  }
877
877
  function getTwoToneColors() {
878
- return _objectSpread$a({}, twoToneColorPalette);
878
+ return _objectSpread$b({}, twoToneColorPalette);
879
879
  }
880
880
  var IconBase = function IconBase2(props, context) {
881
- var _props$context$attrs = _objectSpread$a({}, 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);
881
+ 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);
882
882
  var colors = twoToneColorPalette;
883
883
  if (primaryColor) {
884
884
  colors = {
@@ -892,11 +892,11 @@
892
892
  }
893
893
  var target = icon;
894
894
  if (target && typeof target.icon === "function") {
895
- target = _objectSpread$a({}, target, {
895
+ target = _objectSpread$b({}, target, {
896
896
  icon: target.icon(colors.primaryColor, colors.secondaryColor)
897
897
  });
898
898
  }
899
- return generate(target.icon, "svg-".concat(target.name), _objectSpread$a({}, restProps, {
899
+ return generate(target.icon, "svg-".concat(target.name), _objectSpread$b({}, restProps, {
900
900
  "data-icon": target.name,
901
901
  width: "1em",
902
902
  height: "1em",
@@ -1034,7 +1034,7 @@
1034
1034
  function _arrayWithHoles(arr) {
1035
1035
  if (Array.isArray(arr)) return arr;
1036
1036
  }
1037
- function _objectSpread$9(target) {
1037
+ function _objectSpread$a(target) {
1038
1038
  for (var i = 1; i < arguments.length; i++) {
1039
1039
  var source = arguments[i] != null ? Object(arguments[i]) : {};
1040
1040
  var ownKeys = Object.keys(source);
@@ -1044,12 +1044,12 @@
1044
1044
  }));
1045
1045
  }
1046
1046
  ownKeys.forEach(function(key) {
1047
- _defineProperty$9(target, key, source[key]);
1047
+ _defineProperty$a(target, key, source[key]);
1048
1048
  });
1049
1049
  }
1050
1050
  return target;
1051
1051
  }
1052
- function _defineProperty$9(obj, key, value) {
1052
+ function _defineProperty$a(obj, key, value) {
1053
1053
  if (key in obj) {
1054
1054
  Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
1055
1055
  } else {
@@ -1087,9 +1087,9 @@
1087
1087
  setTwoToneColor(blue.primary);
1088
1088
  var Icon$1 = function Icon2(props, context) {
1089
1089
  var _classObj;
1090
- var _props$context$attrs = _objectSpread$9({}, 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);
1090
+ 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);
1091
1091
  var _useInjectIconContext = useInjectIconContext(), prefixCls = _useInjectIconContext.prefixCls, rootClassName = _useInjectIconContext.rootClassName;
1092
- var classObj = (_classObj = {}, _defineProperty$9(_classObj, rootClassName.value, !!rootClassName.value), _defineProperty$9(_classObj, prefixCls.value, true), _defineProperty$9(_classObj, "".concat(prefixCls.value, "-").concat(icon.name), Boolean(icon.name)), _defineProperty$9(_classObj, "".concat(prefixCls.value, "-spin"), !!spin || icon.name === "loading"), _classObj);
1092
+ 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);
1093
1093
  var iconTabIndex = tabindex;
1094
1094
  if (iconTabIndex === void 0 && onClick) {
1095
1095
  iconTabIndex = -1;
@@ -1099,7 +1099,7 @@
1099
1099
  transform: "rotate(".concat(rotate, "deg)")
1100
1100
  } : void 0;
1101
1101
  var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
1102
- return vue.createVNode("span", _objectSpread$9({
1102
+ return vue.createVNode("span", _objectSpread$a({
1103
1103
  "role": "img",
1104
1104
  "aria-label": icon.name
1105
1105
  }, restProps, {
@@ -1124,7 +1124,7 @@
1124
1124
  Icon$1.getTwoToneColor = getTwoToneColor;
1125
1125
  Icon$1.setTwoToneColor = setTwoToneColor;
1126
1126
  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" };
1127
- function _objectSpread$8(target) {
1127
+ function _objectSpread$9(target) {
1128
1128
  for (var i = 1; i < arguments.length; i++) {
1129
1129
  var source = arguments[i] != null ? Object(arguments[i]) : {};
1130
1130
  var ownKeys = Object.keys(source);
@@ -1134,12 +1134,12 @@
1134
1134
  }));
1135
1135
  }
1136
1136
  ownKeys.forEach(function(key) {
1137
- _defineProperty$8(target, key, source[key]);
1137
+ _defineProperty$9(target, key, source[key]);
1138
1138
  });
1139
1139
  }
1140
1140
  return target;
1141
1141
  }
1142
- function _defineProperty$8(obj, key, value) {
1142
+ function _defineProperty$9(obj, key, value) {
1143
1143
  if (key in obj) {
1144
1144
  Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
1145
1145
  } else {
@@ -1148,14 +1148,46 @@
1148
1148
  return obj;
1149
1149
  }
1150
1150
  var CloseOutlined = function CloseOutlined2(props, context) {
1151
- var p = _objectSpread$8({}, props, context.attrs);
1152
- return vue.createVNode(Icon$1, _objectSpread$8({}, p, {
1151
+ var p = _objectSpread$9({}, props, context.attrs);
1152
+ return vue.createVNode(Icon$1, _objectSpread$9({}, p, {
1153
1153
  "icon": CloseOutlined$1
1154
1154
  }), null);
1155
1155
  };
1156
1156
  CloseOutlined.displayName = "CloseOutlined";
1157
1157
  CloseOutlined.inheritAttrs = false;
1158
1158
  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" };
1159
+ function _objectSpread$8(target) {
1160
+ for (var i = 1; i < arguments.length; i++) {
1161
+ var source = arguments[i] != null ? Object(arguments[i]) : {};
1162
+ var ownKeys = Object.keys(source);
1163
+ if (typeof Object.getOwnPropertySymbols === "function") {
1164
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1165
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1166
+ }));
1167
+ }
1168
+ ownKeys.forEach(function(key) {
1169
+ _defineProperty$8(target, key, source[key]);
1170
+ });
1171
+ }
1172
+ return target;
1173
+ }
1174
+ function _defineProperty$8(obj, key, value) {
1175
+ if (key in obj) {
1176
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
1177
+ } else {
1178
+ obj[key] = value;
1179
+ }
1180
+ return obj;
1181
+ }
1182
+ var CrownOutlined = function CrownOutlined2(props, context) {
1183
+ var p = _objectSpread$8({}, props, context.attrs);
1184
+ return vue.createVNode(Icon$1, _objectSpread$8({}, p, {
1185
+ "icon": CrownOutlined$1
1186
+ }), null);
1187
+ };
1188
+ CrownOutlined.displayName = "CrownOutlined";
1189
+ CrownOutlined.inheritAttrs = false;
1190
+ 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" };
1159
1191
  function _objectSpread$7(target) {
1160
1192
  for (var i = 1; i < arguments.length; i++) {
1161
1193
  var source = arguments[i] != null ? Object(arguments[i]) : {};
@@ -1179,14 +1211,14 @@
1179
1211
  }
1180
1212
  return obj;
1181
1213
  }
1182
- var CrownOutlined = function CrownOutlined2(props, context) {
1214
+ var DeleteOutlined = function DeleteOutlined2(props, context) {
1183
1215
  var p = _objectSpread$7({}, props, context.attrs);
1184
1216
  return vue.createVNode(Icon$1, _objectSpread$7({}, p, {
1185
- "icon": CrownOutlined$1
1217
+ "icon": DeleteOutlined$1
1186
1218
  }), null);
1187
1219
  };
1188
- CrownOutlined.displayName = "CrownOutlined";
1189
- CrownOutlined.inheritAttrs = false;
1220
+ DeleteOutlined.displayName = "DeleteOutlined";
1221
+ DeleteOutlined.inheritAttrs = false;
1190
1222
  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" };
1191
1223
  function _objectSpread$6(target) {
1192
1224
  for (var i = 1; i < arguments.length; i++) {
@@ -1658,12 +1690,12 @@
1658
1690
  return function(...args) {
1659
1691
  return new Promise((resolve, reject) => {
1660
1692
  queue.push([resolve, reject]);
1661
- clearTimeout(timer);
1693
+ clearTimeout(timer != null ? timer : void 0);
1662
1694
  timer = setTimeout(() => {
1663
1695
  func.apply(this, args).then((res) => {
1664
- queue.map((item) => item[0]).forEach((item) => item(res));
1696
+ queue.forEach(([resolver]) => resolver(res));
1665
1697
  }).catch((err) => {
1666
- queue.map((item) => item[1]).forEach((item) => item(err));
1698
+ queue.forEach(([, rejecter]) => rejecter(err));
1667
1699
  }).finally(() => {
1668
1700
  queue.length = 0;
1669
1701
  timer = null;
@@ -1691,6 +1723,9 @@
1691
1723
  h = Math.min(IMG_MSG_SIDE_MAX, h0 * scale);
1692
1724
  return { width: Math.round(w), height: Math.round(h) };
1693
1725
  }
1726
+ const getMByteSize = (size) => {
1727
+ return (size / 1024 / 1024).toFixed(2);
1728
+ };
1694
1729
  const useGlobalStore = pinia.defineStore("global", {
1695
1730
  state: () => ({
1696
1731
  loginStatus: false
@@ -38299,7 +38334,27 @@
38299
38334
  });
38300
38335
  return msgs;
38301
38336
  },
38302
- // 发送文本消息
38337
+ /**
38338
+ * 上传图片
38339
+ * @param options - 上传选项,包含图片文件和回调函数
38340
+ * @returns Promise<UploadFileResult> 返回上传结果,包含图片URL、宽高等信息
38341
+ */
38342
+ async uploadImage(options) {
38343
+ if (!window.qchat) {
38344
+ throw new Error("QChat no login");
38345
+ }
38346
+ const uploadResult = await window.qchat.cloudStorage.uploadFile({
38347
+ type: "image",
38348
+ file: options.file,
38349
+ onUploadStart: options.onUploadStart,
38350
+ onUploadDone: options.onUploadDone
38351
+ });
38352
+ return uploadResult;
38353
+ },
38354
+ /**
38355
+ * 发送文本消息
38356
+ * @param options - 发送选项,包含消息内容和可选附件
38357
+ */
38303
38358
  async sendTextMsg(options) {
38304
38359
  var _a;
38305
38360
  if (!window.qchat) {
@@ -38314,6 +38369,8 @@
38314
38369
  channelId: this.currentChannel.channelId,
38315
38370
  type: "text",
38316
38371
  body: options.body,
38372
+ attach: options == null ? void 0 : options.attach,
38373
+ // 如果有附件,塞到attach字段
38317
38374
  ext: (options == null ? void 0 : options.ext) ? JSON.stringify(options == null ? void 0 : options.ext) : void 0,
38318
38375
  mentionAccids: options == null ? void 0 : options.mentionAccids,
38319
38376
  onSendBefore: (msg2) => {
@@ -38610,9 +38667,9 @@
38610
38667
  }
38611
38668
  });
38612
38669
  pinia.createPinia();
38613
- const _hoisted_1$9 = { class: "yx-common-avatar-container" };
38614
- const _hoisted_2$8 = ["src"];
38615
- const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
38670
+ const _hoisted_1$a = { class: "yx-common-avatar-container" };
38671
+ const _hoisted_2$9 = ["src"];
38672
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
38616
38673
  ...{
38617
38674
  name: "CommonAvatar"
38618
38675
  },
@@ -38668,14 +38725,14 @@
38668
38725
  });
38669
38726
  return (_ctx, _cache) => {
38670
38727
  var _a, _b;
38671
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
38728
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
38672
38729
  __props.avatar || ((_a = matchedMember.value) == null ? void 0 : _a.avatar) ? (vue.openBlock(), vue.createElementBlock("img", {
38673
38730
  key: 0,
38674
38731
  alt: "",
38675
38732
  class: "image",
38676
38733
  src: __props.avatar,
38677
38734
  style: vue.normalizeStyle("width:" + widthAndHeight.value + "height:" + widthAndHeight.value + "border:" + borderStyle.value)
38678
- }, null, 12, _hoisted_2$8)) : vue.createCommentVNode("", true),
38735
+ }, null, 12, _hoisted_2$9)) : vue.createCommentVNode("", true),
38679
38736
  !__props.avatar && !((_b = matchedMember.value) == null ? void 0 : _b.avatar) ? (vue.openBlock(), vue.createElementBlock("div", {
38680
38737
  key: 1,
38681
38738
  class: "text",
@@ -38724,6 +38781,55 @@
38724
38781
  };
38725
38782
  }
38726
38783
  });
38784
+ const _hoisted_1$9 = { class: "yx-attach-box-img-info-wrapper" };
38785
+ const _hoisted_2$8 = {
38786
+ style: { "min-width": "21px", "min-height": "18px" },
38787
+ width: "21",
38788
+ height: "18",
38789
+ viewBox: "0 0 21 18",
38790
+ fill: "var(--theme-head-title-link, #3B3E55)",
38791
+ xmlns: "http://www.w3.org/2000/svg"
38792
+ };
38793
+ const _hoisted_3$8 = { class: "yx-attach-box-img-info-text" };
38794
+ const _hoisted_4$8 = { class: "yx-attach-box-img-info-text-name" };
38795
+ const _hoisted_5$7 = ["href", "download"];
38796
+ const _hoisted_6$7 = { class: "yx-attach-box-img-info-text-size" };
38797
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
38798
+ ...{ name: "ImgInfoWrapper" },
38799
+ __name: "index",
38800
+ props: {
38801
+ attach: {}
38802
+ },
38803
+ setup(__props) {
38804
+ return (_ctx, _cache) => {
38805
+ var _a, _b, _c, _d;
38806
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
38807
+ (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$8, [..._cache[0] || (_cache[0] = [
38808
+ vue.createElementVNode("path", {
38809
+ 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",
38810
+ fill: "#9198A1"
38811
+ }, null, -1),
38812
+ vue.createElementVNode("path", {
38813
+ "fill-rule": "evenodd",
38814
+ "clip-rule": "evenodd",
38815
+ 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",
38816
+ fill: "#9198A1"
38817
+ }, null, -1)
38818
+ ])])),
38819
+ vue.createElementVNode("div", _hoisted_3$8, [
38820
+ vue.createElementVNode("div", _hoisted_4$8, [
38821
+ vue.createElementVNode("a", {
38822
+ class: "yx-attach-box-img-info-text-name-link",
38823
+ href: (_a = __props.attach) == null ? void 0 : _a.url,
38824
+ download: (_b = __props.attach) == null ? void 0 : _b.name
38825
+ }, vue.toDisplayString((_c = __props.attach) == null ? void 0 : _c.name), 9, _hoisted_5$7)
38826
+ ]),
38827
+ vue.createElementVNode("div", _hoisted_6$7, vue.toDisplayString(vue.unref(getMByteSize)(((_d = __props.attach) == null ? void 0 : _d.size) || 0)) + "MB", 1)
38828
+ ])
38829
+ ]);
38830
+ };
38831
+ }
38832
+ });
38727
38833
  const _hoisted_1$8 = ["data-msg-id-client"];
38728
38834
  const _hoisted_2$7 = {
38729
38835
  key: 0,
@@ -38742,12 +38848,22 @@
38742
38848
  const _hoisted_13$3 = { class: "ant-image-mask-info" };
38743
38849
  const _hoisted_14$3 = {
38744
38850
  key: 4,
38851
+ class: "chatCardMainContent attach-box"
38852
+ };
38853
+ const _hoisted_15$3 = { class: "ant-image-mask-info" };
38854
+ const _hoisted_16$2 = {
38855
+ key: 5,
38745
38856
  class: "chatCardMainContent"
38746
38857
  };
38747
- const _hoisted_15$3 = { class: "chatCardQuoteMsgName" };
38748
- const _hoisted_16$2 = ["innerHTML"];
38749
- const _hoisted_17$2 = { class: "ant-image-mask-info" };
38750
- const _hoisted_18$1 = { class: "chatCardStatus" };
38858
+ const _hoisted_17$2 = {
38859
+ key: 0,
38860
+ class: "chatCardQuoteMsgAttachBox"
38861
+ };
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;
38751
38867
  const REVOCATION_INTERVAL = 120 * 1e3;
38752
38868
  const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
38753
38869
  ...{
@@ -38947,14 +39063,14 @@
38947
39063
  }
38948
39064
  };
38949
39065
  return (_ctx, _cache) => {
38950
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
39066
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
38951
39067
  return vue.openBlock(), vue.createElementBlock("div", {
38952
39068
  class: vue.normalizeClass(["yx-chatCardWrapper", { reverse: __props.msg.fromAccount === __props.myAccid }]),
38953
39069
  "data-msg-id-client": __props.msg.msgIdClient
38954
39070
  }, [
38955
39071
  ((_a = __props.msg.updateOperatorInfo) == null ? void 0 : _a.ps) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, vue.toDisplayString(__props.msg.fromAccount === __props.myAccid ? "你" : `“${__props.msg.fromNick}”`) + " " + vue.toDisplayString((_b = __props.msg.updateOperatorInfo) == null ? void 0 : _b.ps), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
38956
39072
  vue.createElementVNode("div", _hoisted_3$7, [
38957
- vue.createVNode(_sfc_main$9, {
39073
+ vue.createVNode(_sfc_main$a, {
38958
39074
  avatar: myAvatar.value,
38959
39075
  nick: __props.msg.fromNick,
38960
39076
  accid: __props.msg.fromAccount,
@@ -39057,28 +39173,52 @@
39057
39173
  }, [..._cache[1] || (_cache[1] = [
39058
39174
  vue.createElementVNode("div", { class: "textMsg" }, vue.toDisplayString("暂不支持该消息"), -1)
39059
39175
  ])], 2)),
39060
- ((_i = msgExt.value) == null ? void 0 : _i.quoteMsg) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14$3, [
39176
+ __props.msg.type === "text" && ["jpg", "jpeg", "png", "gif"].includes(((_j = (_i = __props.msg) == null ? void 0 : _i.attach) == null ? void 0 : _j.ext) || "") ? (vue.openBlock(), vue.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 ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Image), {
39178
+ key: 0,
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
39183
+ }, {
39184
+ previewMask: vue.withCtx(() => [
39185
+ vue.createElementVNode("div", _hoisted_15$3, [
39186
+ vue.createVNode(vue.unref(EyeOutlined))
39187
+ ])
39188
+ ]),
39189
+ _: 1
39190
+ }, 8, ["src", "width", "height"])) : (vue.openBlock(), vue.createBlock(_sfc_main$9, {
39191
+ key: 1,
39192
+ attach: (_q = __props.msg) == null ? void 0 : _q.attach
39193
+ }, null, 8, ["attach"]))
39194
+ ])) : vue.createCommentVNode("", true),
39195
+ ((_r = msgExt.value) == null ? void 0 : _r.quoteMsg) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$2, [
39061
39196
  vue.createElementVNode("div", {
39062
39197
  class: "chatCardQuoteMsg",
39063
39198
  onClick: onQuoteMsgClick
39064
39199
  }, [
39065
- vue.createElementVNode("div", _hoisted_15$3, vue.toDisplayString(msgExt.value.quoteMsg.fromNick) + "", 1),
39200
+ msgExt.value.quoteMsg.type === "text" && msgExt.value.quoteMsg.attach ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17$2, [
39201
+ vue.createVNode(_sfc_main$9, {
39202
+ attach: msgExt.value.quoteMsg.attach
39203
+ }, null, 8, ["attach"])
39204
+ ])) : vue.createCommentVNode("", true),
39205
+ vue.createElementVNode("div", _hoisted_18$2, vue.toDisplayString(msgExt.value.quoteMsg.fromNick) + ":", 1),
39066
39206
  msgExt.value.quoteMsg.body ? (vue.openBlock(), vue.createElementBlock("div", {
39067
- key: 0,
39207
+ key: 1,
39068
39208
  class: "quoteMsgText",
39069
39209
  innerHTML: msgExt.value.quoteMsg.body
39070
- }, null, 8, _hoisted_16$2)) : vue.createCommentVNode("", true),
39210
+ }, null, 8, _hoisted_19$2)) : vue.createCommentVNode("", true),
39071
39211
  msgExt.value.quoteMsg.type === "image" ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Image), {
39072
- key: 1,
39212
+ key: 2,
39073
39213
  class: "imgMsg quoteMsgImg",
39074
- src: (_j = msgExt.value.quoteMsg.attach) == null ? void 0 : _j.url,
39214
+ src: (_s = msgExt.value.quoteMsg.attach) == null ? void 0 : _s.url,
39075
39215
  width: quoteImageMsgSize.value.width,
39076
39216
  height: quoteImageMsgSize.value.height,
39077
39217
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
39078
39218
  }, ["stop", "prevent"]))
39079
39219
  }, {
39080
39220
  previewMask: vue.withCtx(() => [
39081
- vue.createElementVNode("div", _hoisted_17$2, [
39221
+ vue.createElementVNode("div", _hoisted_20$2, [
39082
39222
  vue.createVNode(vue.unref(EyeOutlined))
39083
39223
  ])
39084
39224
  ]),
@@ -39087,7 +39227,7 @@
39087
39227
  ])
39088
39228
  ])) : vue.createCommentVNode("", true)
39089
39229
  ]),
39090
- vue.createElementVNode("div", _hoisted_18$1, [
39230
+ vue.createElementVNode("div", _hoisted_21$2, [
39091
39231
  __props.msg.deliveryStatus === "failed" ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Button), {
39092
39232
  key: 0,
39093
39233
  type: "text",
@@ -39242,7 +39382,7 @@
39242
39382
  onMousedown: vue.withModifiers(($event) => onSelect($event, index2), ["prevent"])
39243
39383
  }, [
39244
39384
  vue.createElementVNode("div", _hoisted_3$6, [
39245
- vue.createVNode(_sfc_main$9, {
39385
+ vue.createVNode(_sfc_main$a, {
39246
39386
  avatar: item.avatar,
39247
39387
  nick: item.nick,
39248
39388
  accid: item.accid,
@@ -39784,19 +39924,32 @@
39784
39924
  key: 0,
39785
39925
  class: "chatroomInputQuoteWrapper"
39786
39926
  };
39787
- const _hoisted_9$2 = { class: "chatroomInputQuoteText" };
39788
- const _hoisted_10$2 = { class: "chatroomInputQuoteTextName" };
39789
- const _hoisted_11$2 = ["innerHTML"];
39790
- const _hoisted_12$2 = {
39927
+ const _hoisted_9$2 = {
39791
39928
  key: 0,
39929
+ class: "chatroomInputQuoteAttachBox"
39930
+ };
39931
+ const _hoisted_10$2 = { class: "chatroomInputQuoteText" };
39932
+ const _hoisted_11$2 = { class: "chatroomInputQuoteTextName" };
39933
+ const _hoisted_12$2 = ["innerHTML"];
39934
+ const _hoisted_13$2 = {
39935
+ key: 1,
39792
39936
  class: "chatroomInputQuoteWrapperImg"
39793
39937
  };
39794
- const _hoisted_13$2 = { class: "chatroomInputWrapper" };
39795
- const _hoisted_14$2 = { class: "chatroomInputLeft" };
39796
- const _hoisted_15$2 = { style: { "width": "400px" } };
39797
- const _hoisted_16$1 = ["onClick"];
39798
- const _hoisted_17$1 = { class: "chatroomController" };
39799
- const MAX_IMG_SIZE = 20;
39938
+ const _hoisted_14$2 = {
39939
+ key: 1,
39940
+ class: "chatroomInputAttachmentWrapper"
39941
+ };
39942
+ const _hoisted_15$2 = {
39943
+ key: 0,
39944
+ class: "chatroomInputAttachmentWrapperImg"
39945
+ };
39946
+ const _hoisted_16$1 = { class: "chatroomInputAttachmentWrapperImgMask" };
39947
+ const _hoisted_17$1 = { class: "chatroomInputWrapper" };
39948
+ const _hoisted_18$1 = { class: "chatroomInputLeft" };
39949
+ const _hoisted_19$1 = { style: { "width": "400px" } };
39950
+ const _hoisted_20$1 = ["onClick"];
39951
+ const _hoisted_21$1 = { class: "chatroomController" };
39952
+ const MAX_IMG_SIZE = 10;
39800
39953
  const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
39801
39954
  ...{
39802
39955
  name: "ChatContent"
@@ -39822,8 +39975,10 @@
39822
39975
  const props = __props;
39823
39976
  const emit = __emit;
39824
39977
  const quoteMsg = vue.ref();
39978
+ const attachment = vue.ref();
39825
39979
  const curText = vue.ref("");
39826
39980
  const cursorIndex = vue.ref(0);
39981
+ const attachmentUploading = vue.ref(false);
39827
39982
  const contentRef = vue.ref();
39828
39983
  const contentScrollLocked = vue.ref(false);
39829
39984
  const loadingMore = vue.ref(false);
@@ -39919,6 +40074,10 @@
39919
40074
  };
39920
40075
  const handleDeleteQuoteMsg = () => {
39921
40076
  quoteMsg.value = void 0;
40077
+ console.log("handleDeleteQuoteMsg", quoteMsg.value);
40078
+ };
40079
+ const handleDeleteAttachment = () => {
40080
+ attachment.value = void 0;
39922
40081
  };
39923
40082
  vue.watch(
39924
40083
  () => props.msgs,
@@ -39956,15 +40115,21 @@
39956
40115
  () => channelStore.currentChannel,
39957
40116
  (value, oldValue) => {
39958
40117
  if (oldValue == null ? void 0 : oldValue.channelId) {
39959
- inputMap.set(oldValue == null ? void 0 : oldValue.channelId, { input: curText.value, quoteMsg: quoteMsg.value });
40118
+ inputMap.set(oldValue == null ? void 0 : oldValue.channelId, {
40119
+ input: curText.value,
40120
+ quoteMsg: quoteMsg.value,
40121
+ attachment: attachment.value
40122
+ });
39960
40123
  }
39961
40124
  if ((value == null ? void 0 : value.channelId) && inputMap.has((value == null ? void 0 : value.channelId) || "")) {
39962
40125
  const mapValue = inputMap.get((value == null ? void 0 : value.channelId) || "");
39963
40126
  curText.value = (mapValue == null ? void 0 : mapValue.input) || "";
39964
40127
  quoteMsg.value = mapValue == null ? void 0 : mapValue.quoteMsg;
40128
+ attachment.value = mapValue == null ? void 0 : mapValue.attachment;
39965
40129
  } else {
39966
40130
  curText.value = "";
39967
40131
  quoteMsg.value = void 0;
40132
+ attachment.value = void 0;
39968
40133
  }
39969
40134
  }
39970
40135
  );
@@ -40001,10 +40166,13 @@
40001
40166
  ext: {
40002
40167
  quoteMsg: quoteMsg.value
40003
40168
  },
40004
- mentionAccids: mentionAccids.value
40169
+ mentionAccids: mentionAccids.value,
40170
+ attach: attachment.value
40171
+ // 传递附件
40005
40172
  });
40006
40173
  curText.value = "";
40007
40174
  quoteMsg.value = void 0;
40175
+ attachment.value = void 0;
40008
40176
  scrollToBottomAfterSend();
40009
40177
  }
40010
40178
  }
@@ -40016,10 +40184,13 @@
40016
40184
  ext: {
40017
40185
  quoteMsg: quoteMsg.value
40018
40186
  },
40019
- mentionAccids: mentionAccids.value
40187
+ mentionAccids: mentionAccids.value,
40188
+ attach: attachment.value
40189
+ // 传递附件
40020
40190
  });
40021
40191
  curText.value = "";
40022
40192
  quoteMsg.value = void 0;
40193
+ attachment.value = void 0;
40023
40194
  scrollToBottomAfterSend();
40024
40195
  }
40025
40196
  };
@@ -40041,8 +40212,8 @@
40041
40212
  });
40042
40213
  }
40043
40214
  };
40044
- const handlePaste = (e) => {
40045
- if (props.sendDisabled) return;
40215
+ const handlePaste = async (e) => {
40216
+ if (props.sendDisabled || attachmentUploading.value) return;
40046
40217
  const clipboardData = e.clipboardData;
40047
40218
  if (!clipboardData) return;
40048
40219
  const items = clipboardData.items;
@@ -40056,20 +40227,51 @@
40056
40227
  antDesignVue.message.error("图片大小最大支持20M");
40057
40228
  return;
40058
40229
  }
40059
- emit("sendImg", file);
40060
- scrollToBottomAfterSend();
40230
+ attachmentUploading.value = true;
40231
+ try {
40232
+ const uploadResult = await channelStore.uploadImage({
40233
+ file,
40234
+ onUploadStart: () => {
40235
+ attachmentUploading.value = true;
40236
+ },
40237
+ onUploadDone: () => {
40238
+ attachmentUploading.value = false;
40239
+ }
40240
+ });
40241
+ attachment.value = uploadResult;
40242
+ } catch (error) {
40243
+ console.error("上传图片失败:", error);
40244
+ antDesignVue.message.error("上传图片失败");
40245
+ attachmentUploading.value = false;
40246
+ }
40061
40247
  }
40062
40248
  return;
40063
40249
  }
40064
40250
  }
40065
40251
  };
40066
- const uploadImgHandler = (file) => {
40252
+ const uploadImgHandler = async (file) => {
40067
40253
  if (!isLt(file.size, MAX_IMG_SIZE)) {
40068
40254
  antDesignVue.message.error(`图片大小最大支持${MAX_IMG_SIZE}M`);
40069
- return;
40255
+ return false;
40070
40256
  }
40071
- emit("sendImg", file);
40072
- scrollToBottomAfterSend();
40257
+ attachmentUploading.value = true;
40258
+ try {
40259
+ const uploadResult = await channelStore.uploadImage({
40260
+ file,
40261
+ onUploadStart: () => {
40262
+ attachmentUploading.value = true;
40263
+ },
40264
+ onUploadDone: () => {
40265
+ attachmentUploading.value = false;
40266
+ }
40267
+ });
40268
+ attachment.value = uploadResult;
40269
+ } catch (error) {
40270
+ console.error("上传图片失败:", error);
40271
+ antDesignVue.message.error("上传图片失败");
40272
+ attachmentUploading.value = false;
40273
+ }
40274
+ return false;
40073
40275
  };
40074
40276
  const emjjData = [
40075
40277
  "😀",
@@ -40284,15 +40486,20 @@
40284
40486
  size: "12px",
40285
40487
  onClick: handleDeleteQuoteMsg
40286
40488
  }),
40287
- vue.createElementVNode("div", _hoisted_9$2, [
40288
- vue.createElementVNode("div", _hoisted_10$2, vue.toDisplayString(quoteMsg.value.fromNick) + ":", 1),
40489
+ quoteMsg.value.type === "text" && quoteMsg.value.attach ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9$2, [
40490
+ vue.createVNode(_sfc_main$9, {
40491
+ attach: quoteMsg.value.attach
40492
+ }, null, 8, ["attach"])
40493
+ ])) : vue.createCommentVNode("", true),
40494
+ vue.createElementVNode("div", _hoisted_10$2, [
40495
+ vue.createElementVNode("div", _hoisted_11$2, vue.toDisplayString(quoteMsg.value.fromNick) + ":", 1),
40289
40496
  ((_d = quoteMsg.value) == null ? void 0 : _d.body) ? (vue.openBlock(), vue.createElementBlock("div", {
40290
40497
  key: 0,
40291
40498
  class: "chatroomInputQuoteTextBody",
40292
40499
  innerHTML: (_e = quoteMsg.value) == null ? void 0 : _e.body
40293
- }, null, 8, _hoisted_11$2)) : vue.createCommentVNode("", true)
40500
+ }, null, 8, _hoisted_12$2)) : vue.createCommentVNode("", true)
40294
40501
  ]),
40295
- quoteMsg.value.type === "image" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$2, [
40502
+ quoteMsg.value.type === "image" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13$2, [
40296
40503
  vue.createVNode(vue.unref(antDesignVue.Image), {
40297
40504
  preview: false,
40298
40505
  class: "imgMsg quoteImg",
@@ -40302,17 +40509,34 @@
40302
40509
  }, null, 8, ["src", "width", "height"])
40303
40510
  ])) : vue.createCommentVNode("", true)
40304
40511
  ])) : vue.createCommentVNode("", true),
40305
- vue.createElementVNode("div", _hoisted_13$2, [
40306
- vue.createElementVNode("div", _hoisted_14$2, [
40512
+ attachment.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14$2, [
40513
+ ["jpg", "jpeg", "png", "gif"].includes(attachment.value.ext || "") && attachment.value.url ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15$2, [
40514
+ vue.createElementVNode("div", _hoisted_16$1, [
40515
+ vue.createVNode(vue.unref(DeleteOutlined), {
40516
+ class: "chatroomInputAttachmentDeleteBtn",
40517
+ onClick: handleDeleteAttachment
40518
+ })
40519
+ ]),
40520
+ vue.createVNode(vue.unref(antDesignVue.Image), {
40521
+ preview: false,
40522
+ class: "imgMsg quoteImg",
40523
+ src: attachment.value.url,
40524
+ width: 60,
40525
+ height: 60
40526
+ }, null, 8, ["src"])
40527
+ ])) : vue.createCommentVNode("", true)
40528
+ ])) : vue.createCommentVNode("", true),
40529
+ vue.createElementVNode("div", _hoisted_17$1, [
40530
+ vue.createElementVNode("div", _hoisted_18$1, [
40307
40531
  vue.createVNode(vue.unref(antDesignVue.Popover), { placement: "topLeft" }, {
40308
40532
  content: vue.withCtx(() => [
40309
- vue.createElementVNode("div", _hoisted_15$2, [
40533
+ vue.createElementVNode("div", _hoisted_19$1, [
40310
40534
  (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(emjjData, (value, i) => {
40311
40535
  return vue.createElementVNode("span", {
40312
40536
  key: i,
40313
40537
  style: { "font-size": "16px", "cursor": "pointer" },
40314
40538
  onClick: ($event) => insertEmj(i)
40315
- }, vue.toDisplayString(value), 9, _hoisted_16$1);
40539
+ }, vue.toDisplayString(value), 9, _hoisted_20$1);
40316
40540
  }), 64))
40317
40541
  ])
40318
40542
  ]),
@@ -40357,19 +40581,20 @@
40357
40581
  onBlur: handleInputBlur,
40358
40582
  onPaste: handlePaste
40359
40583
  }, null, 8, ["value", "placeholder", "disabled", "onKeydown", "onClick"]),
40360
- vue.createElementVNode("div", _hoisted_17$1, [
40584
+ vue.createElementVNode("div", _hoisted_21$1, [
40361
40585
  vue.createVNode(vue.unref(antDesignVue.Upload), {
40362
40586
  "before-upload": uploadImgHandler,
40363
40587
  "show-upload-list": false,
40364
40588
  accept: ".jpg,.png,.jpeg",
40365
- disabled: __props.sendDisabled
40589
+ disabled: __props.sendDisabled || attachmentUploading.value,
40590
+ class: "chatroomInputUpload"
40366
40591
  }, {
40367
40592
  default: vue.withCtx(() => [
40368
40593
  vue.createVNode(vue.unref(antDesignVue.Button), {
40369
40594
  class: "chatroomButton",
40370
40595
  type: "text",
40371
- loading: __props.imgUploading,
40372
- disabled: __props.sendDisabled
40596
+ loading: attachmentUploading.value,
40597
+ disabled: __props.sendDisabled || attachmentUploading.value
40373
40598
  }, {
40374
40599
  icon: vue.withCtx(() => [..._cache[4] || (_cache[4] = [
40375
40600
  vue.createElementVNode("svg", {
@@ -40495,7 +40720,13 @@
40495
40720
  );
40496
40721
  const sendMessage = (type, file, option) => {
40497
40722
  if (type === "textMsg") {
40498
- channelStore.sendTextMsg({ body: file, ext: option == null ? void 0 : option.ext, mentionAccids: option == null ? void 0 : option.mentionAccids });
40723
+ channelStore.sendTextMsg({
40724
+ body: file,
40725
+ ext: option == null ? void 0 : option.ext,
40726
+ mentionAccids: option == null ? void 0 : option.mentionAccids,
40727
+ attach: option == null ? void 0 : option.attach
40728
+ // 传递附件
40729
+ });
40499
40730
  return;
40500
40731
  }
40501
40732
  if (type === "SendImg") {
@@ -41261,7 +41492,7 @@
41261
41492
  style: vue.normalizeStyle({ width: userPanelWidth.value + "px" })
41262
41493
  }, [
41263
41494
  vue.createElementVNode("div", _hoisted_15, [
41264
- vue.createVNode(_sfc_main$9, {
41495
+ vue.createVNode(_sfc_main$a, {
41265
41496
  avatar: userProfile.value.avatar,
41266
41497
  nick: userProfile.value.nick,
41267
41498
  accid: currentAccount.value,
@@ -41440,7 +41671,7 @@
41440
41671
  };
41441
41672
  }
41442
41673
  });
41443
- const ServerChannelSidebar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-2f397ece"]]);
41674
+ const ServerChannelSidebar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-961f30d7"]]);
41444
41675
  const _hoisted_1$1 = { class: "members-header" };
41445
41676
  const _hoisted_2$1 = {
41446
41677
  key: 0,
@@ -41577,7 +41808,7 @@
41577
41808
  }, {
41578
41809
  default: vue.withCtx(() => [
41579
41810
  vue.createElementVNode("div", _hoisted_4$1, [
41580
- vue.createVNode(_sfc_main$9, {
41811
+ vue.createVNode(_sfc_main$a, {
41581
41812
  avatar: member.avatar,
41582
41813
  nick: member.nick,
41583
41814
  accid: member.accid,
@@ -41971,7 +42202,7 @@
41971
42202
  ChatContent: _sfc_main$5,
41972
42203
  ChatPage: _sfc_main$3,
41973
42204
  ChatRoom: _sfc_main$4,
41974
- CommonAvatar: _sfc_main$9,
42205
+ CommonAvatar: _sfc_main$a,
41975
42206
  IconFont: IconFont$1,
41976
42207
  IndexEntry,
41977
42208
  MembersSidebar,