cnhis-design-vue 3.3.3-beta.27 → 3.3.3-beta.29

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 (26) hide show
  1. package/README.md +87 -87
  2. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  3. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  4. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
  5. package/es/components/form-render/src/hooks/useLowCodeReactions.js +2 -1
  6. package/es/components/iho-chat/index.d.ts +4 -4
  7. package/es/components/iho-chat/src/Index.vue.d.ts +4 -4
  8. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +2 -2
  9. package/es/components/iho-chat/src/components/ChatFile.vue2.js +5 -15
  10. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  11. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +2 -2
  12. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +3 -3
  13. package/es/components/iho-chat/src/components/ChatMain.vue2.js +7 -4
  14. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +2 -2
  15. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +3 -3
  16. package/es/components/iho-chat/src/components/ContextMenu.js +3 -5
  17. package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +2 -2
  18. package/es/components/iho-chat/src/components/MessageMergeForward.vue2.js +3 -3
  19. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  20. package/es/components/iho-chat/src/hooks/useData.js +2 -7
  21. package/es/components/iho-chat/src/utils/index.d.ts +2 -4
  22. package/es/components/iho-chat/src/utils/index.js +10 -40
  23. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  24. package/es/env.d.ts +25 -25
  25. package/es/shared/package.json.js +1 -1
  26. package/package.json +3 -3
package/README.md CHANGED
@@ -1,87 +1,87 @@
1
- # 安装
2
-
3
- ```shell
4
- npm i cnhis-design-vue@[版本号]
5
- # or
6
- yarn add cnhis-design-vue@[版本号] #推荐
7
- ```
8
-
9
- ## 1.全局引入
10
-
11
- ```typescript
12
- // main.ts
13
- import { createApp } from 'vue';
14
- import App from './App.vue';
15
- import 'cnhis-design-vue/es/packages/index.css';
16
- import cui from 'cnhis-design-vue';
17
-
18
- const app = createApp(App);
19
- app.use(cui).mount('#app');
20
- ```
21
-
22
- ## 2. 按需引入
23
-
24
- 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
-
26
- ### 2.1 样式处理方式1 (按需引入样式)
27
-
28
- ```shell
29
- # 安装自动导入样式的插件
30
- npm i -d vite-plugin-style-import
31
- ```
32
-
33
- ```typescript
34
- // vite.config.ts
35
- import { defineConfig } from 'vite';
36
- import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
-
38
- export default defineConfig({
39
- plugins: [
40
- // ...otherPlugins
41
- createStyleImportPlugin({
42
- libs: [
43
- {
44
- libraryName: 'cnhis-design-vue',
45
- esModule: true,
46
- ensureStyleFile: true,
47
- resolveStyle: name => {
48
- return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
- }
50
- }
51
- ]
52
- })
53
- ]
54
- });
55
- ```
56
-
57
- ### 2.2 样式处理方式2 (全局引入样式)
58
-
59
- ```typescript
60
- // main.ts
61
- import 'cnhis-design-vue/es/components/index.css';
62
- ```
63
-
64
- ## 3.FAQ
65
-
66
- ### 3.1 项目打包后样式丢失
67
-
68
- 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
-
70
- ```typescript
71
- // vite.config.ts
72
- import { defineConfig } from 'vite';
73
-
74
- export default defineConfig({
75
- build: {
76
- rollupOptions: {
77
- // ..otherOptions
78
- output: {
79
- dir: './dist',
80
- manualChunks: {
81
- 'cnhis-vendor': ['cnhis-design-vue']
82
- }
83
- }
84
- }
85
- }
86
- });
87
- ```
1
+ # 安装
2
+
3
+ ```shell
4
+ npm i cnhis-design-vue@[版本号]
5
+ # or
6
+ yarn add cnhis-design-vue@[版本号] #推荐
7
+ ```
8
+
9
+ ## 1.全局引入
10
+
11
+ ```typescript
12
+ // main.ts
13
+ import { createApp } from 'vue';
14
+ import App from './App.vue';
15
+ import 'cnhis-design-vue/es/packages/index.css';
16
+ import cui from 'cnhis-design-vue';
17
+
18
+ const app = createApp(App);
19
+ app.use(cui).mount('#app');
20
+ ```
21
+
22
+ ## 2. 按需引入
23
+
24
+ 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
+
26
+ ### 2.1 样式处理方式1 (按需引入样式)
27
+
28
+ ```shell
29
+ # 安装自动导入样式的插件
30
+ npm i -d vite-plugin-style-import
31
+ ```
32
+
33
+ ```typescript
34
+ // vite.config.ts
35
+ import { defineConfig } from 'vite';
36
+ import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
+
38
+ export default defineConfig({
39
+ plugins: [
40
+ // ...otherPlugins
41
+ createStyleImportPlugin({
42
+ libs: [
43
+ {
44
+ libraryName: 'cnhis-design-vue',
45
+ esModule: true,
46
+ ensureStyleFile: true,
47
+ resolveStyle: name => {
48
+ return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
+ }
50
+ }
51
+ ]
52
+ })
53
+ ]
54
+ });
55
+ ```
56
+
57
+ ### 2.2 样式处理方式2 (全局引入样式)
58
+
59
+ ```typescript
60
+ // main.ts
61
+ import 'cnhis-design-vue/es/components/index.css';
62
+ ```
63
+
64
+ ## 3.FAQ
65
+
66
+ ### 3.1 项目打包后样式丢失
67
+
68
+ 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
+
70
+ ```typescript
71
+ // vite.config.ts
72
+ import { defineConfig } from 'vite';
73
+
74
+ export default defineConfig({
75
+ build: {
76
+ rollupOptions: {
77
+ // ..otherOptions
78
+ output: {
79
+ dir: './dist',
80
+ manualChunks: {
81
+ 'cnhis-vendor': ['cnhis-design-vue']
82
+ }
83
+ }
84
+ }
85
+ }
86
+ });
87
+ ```
@@ -438,7 +438,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
438
438
  params,
439
439
  signature: props.signature
440
440
  };
441
- printInstance.downloadPDF(queryParams, (res) => callLocalServicesSuccessCb(res, "preview"), callLocalServicesErrorCb);
441
+ printInstance.downloadPDF(queryParams, (res) => callLocalServicesSuccessCb(res, "download"), callLocalServicesErrorCb);
442
442
  }).catch(() => {
443
443
  prevFnError("download");
444
444
  state.spinning = false;
@@ -175,9 +175,6 @@ declare const _default: import("vue").DefineComponent<{
175
175
  modelValue: unknown[];
176
176
  componentData: Record<string, any>;
177
177
  } & {
178
- /**
179
- * 改变弹窗大小
180
- */
181
178
  itemKey?: string | Function | undefined;
182
179
  }>, {
183
180
  move: Function;
@@ -254,7 +254,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
254
254
  });
255
255
  return res;
256
256
  });
257
- const setValueTypes = ["INPUT", "SELECT", "SEARCH", "REMOTE_SEARCH"];
257
+ const setValueTypes = ["INPUT", "SELECT", "SEARCH", "REMOTE_SEARCH", "DIGITAL"];
258
258
  const setValueFieldOptions = computed(() => {
259
259
  return fieldOptions.value.filter((item) => {
260
260
  var _a;
@@ -29,7 +29,8 @@ function useLowCodeReactions(configListRef, formModel) {
29
29
  const targetConfig = (_a = config.setValueField) == null ? void 0 : _a.find((item) => item.field === field.path.toString());
30
30
  if (!targetConfig)
31
31
  return;
32
- field.value = targetConfig.value;
32
+ const value = targetConfig.value === "null" ? null : targetConfig.value === "undefined" ? void 0 : targetConfig.value;
33
+ field.value = value;
33
34
  })
34
35
  };
35
36
  function createFieldHandler(cb) {
@@ -933,7 +933,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
933
933
  OpenOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
934
934
  DownloadOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
935
935
  downloadFile: typeof import("./src/utils").downloadFile;
936
- getFileDetails: typeof import("./src/utils").getFileDetails;
936
+ formatJsonstr: typeof import("./src/utils").formatJsonstr;
937
937
  getFileType: typeof import("./src/utils").getFileType;
938
938
  getDetail: typeof import("./src/utils").getDetail;
939
939
  ChatAdd: import("vue").DefineComponent<{
@@ -1353,7 +1353,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
1353
1353
  formatTime: typeof import("./src/utils").formatTime;
1354
1354
  isDoctorRole: typeof import("./src/utils").isDoctorRole;
1355
1355
  getRoleName: typeof import("./src/utils").getRoleName;
1356
- getFileDetails: typeof import("./src/utils").getFileDetails;
1356
+ formatJsonstr: typeof import("./src/utils").formatJsonstr;
1357
1357
  getFileType: typeof import("./src/utils").getFileType;
1358
1358
  getDetail: typeof import("./src/utils").getDetail;
1359
1359
  showAudioAndVideoRecord: typeof import("./src/utils").showAudioAndVideoRecord;
@@ -1908,7 +1908,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
1908
1908
  getForwardTitle: typeof import("./src/utils").getForwardTitle;
1909
1909
  isDoctorRole: typeof import("./src/utils").isDoctorRole;
1910
1910
  getRoleName: typeof import("./src/utils").getRoleName;
1911
- getFileDetails: typeof import("./src/utils").getFileDetails;
1911
+ formatJsonstr: typeof import("./src/utils").formatJsonstr;
1912
1912
  getFileType: typeof import("./src/utils").getFileType;
1913
1913
  getDetail: typeof import("./src/utils").getDetail;
1914
1914
  showAudioAndVideoRecord: typeof import("./src/utils").showAudioAndVideoRecord;
@@ -2271,7 +2271,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
2271
2271
  isAudioOrVideoMessage: typeof import("./src/utils").isAudioOrVideoMessage;
2272
2272
  getAVTime: typeof import("./src/utils").getAVTime;
2273
2273
  getForwardTitle: typeof import("./src/utils").getForwardTitle;
2274
- formatJson: typeof import("./src/utils").formatJson;
2274
+ formatJsonstr: typeof import("./src/utils").formatJsonstr;
2275
2275
  MESSAGE_TYPE: typeof import("./src/constants").MESSAGE_TYPE;
2276
2276
  ChatbubbleEllipsesOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2277
2277
  EllipsisHorizontal: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
@@ -934,7 +934,7 @@ declare const _default: import("vue").DefineComponent<{
934
934
  OpenOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
935
935
  DownloadOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
936
936
  downloadFile: typeof import("./utils").downloadFile;
937
- getFileDetails: typeof import("./utils").getFileDetails;
937
+ formatJsonstr: typeof import("./utils").formatJsonstr;
938
938
  getFileType: typeof import("./utils").getFileType;
939
939
  getDetail: typeof import("./utils").getDetail;
940
940
  ChatAdd: import("vue").DefineComponent<{
@@ -1354,7 +1354,7 @@ declare const _default: import("vue").DefineComponent<{
1354
1354
  formatTime: typeof import("./utils").formatTime;
1355
1355
  isDoctorRole: typeof import("./utils").isDoctorRole;
1356
1356
  getRoleName: typeof import("./utils").getRoleName;
1357
- getFileDetails: typeof import("./utils").getFileDetails;
1357
+ formatJsonstr: typeof import("./utils").formatJsonstr;
1358
1358
  getFileType: typeof import("./utils").getFileType;
1359
1359
  getDetail: typeof import("./utils").getDetail;
1360
1360
  showAudioAndVideoRecord: typeof import("./utils").showAudioAndVideoRecord;
@@ -1909,7 +1909,7 @@ declare const _default: import("vue").DefineComponent<{
1909
1909
  getForwardTitle: typeof import("./utils").getForwardTitle;
1910
1910
  isDoctorRole: typeof import("./utils").isDoctorRole;
1911
1911
  getRoleName: typeof import("./utils").getRoleName;
1912
- getFileDetails: typeof import("./utils").getFileDetails;
1912
+ formatJsonstr: typeof import("./utils").formatJsonstr;
1913
1913
  getFileType: typeof import("./utils").getFileType;
1914
1914
  getDetail: typeof import("./utils").getDetail;
1915
1915
  showAudioAndVideoRecord: typeof import("./utils").showAudioAndVideoRecord;
@@ -2272,7 +2272,7 @@ declare const _default: import("vue").DefineComponent<{
2272
2272
  isAudioOrVideoMessage: typeof import("./utils").isAudioOrVideoMessage;
2273
2273
  getAVTime: typeof import("./utils").getAVTime;
2274
2274
  getForwardTitle: typeof import("./utils").getForwardTitle;
2275
- formatJson: typeof import("./utils").formatJson;
2275
+ formatJsonstr: typeof import("./utils").formatJsonstr;
2276
2276
  MESSAGE_TYPE: typeof import("./constants").MESSAGE_TYPE;
2277
2277
  ChatbubbleEllipsesOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2278
2278
  EllipsisHorizontal: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
@@ -1,6 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  import { AnyObject } from '../../../../shared/types';
3
- import { downloadFile, getFileDetails, getFileType, getDetail } from '../utils';
3
+ import { downloadFile, formatJsonstr, getFileType, getDetail } from '../utils';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  type: {
6
6
  type: StringConstructor;
@@ -82,7 +82,7 @@ declare const _default: import("vue").DefineComponent<{
82
82
  OpenOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
83
83
  DownloadOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
84
84
  downloadFile: typeof downloadFile;
85
- getFileDetails: typeof getFileDetails;
85
+ formatJsonstr: typeof formatJsonstr;
86
86
  getFileType: typeof getFileType;
87
87
  getDetail: typeof getDetail;
88
88
  ChatAdd: import("vue").DefineComponent<{
@@ -13,7 +13,7 @@ import { useScrollLoading } from '../../../../shared/hooks/useScrollLoading.js';
13
13
  import { useData } from '../hooks/useData.js';
14
14
  import 'stompjs';
15
15
  import 'sockjs-client/dist/sockjs.min.js';
16
- import { getFileSize, getFileDetails, getFileType, getDetail, downloadFile } from '../utils/index.js';
16
+ import { formatJsonstr, getFileType, getDetail, downloadFile } from '../utils/index.js';
17
17
  import 'trtc-sdk-v5';
18
18
  import ChatAdd from './ChatAdd.vue.js';
19
19
 
@@ -103,17 +103,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
103
103
  const newList = formatImageList(_list);
104
104
  imageList.value = pageInfo.page > 1 ? imageList.value.concat(newList) : newList;
105
105
  } else {
106
- const promiseList = _list.map((item) => {
107
- return new Promise(async (resolve) => {
108
- const size = await getFileSize(item.content.fileUrl);
109
- resolve({
110
- ...item,
111
- size
112
- });
113
- });
114
- });
115
- const newList = await Promise.all(promiseList);
116
- fileList.value = pageInfo.page > 1 ? fileList.value.concat(newList) : newList;
106
+ fileList.value = pageInfo.page > 1 ? fileList.value.concat(_list) : _list;
117
107
  }
118
108
  } catch (error) {
119
109
  } finally {
@@ -209,7 +199,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
209
199
  key: image,
210
200
  width: "80",
211
201
  height: "80",
212
- src: unref(getFileDetails)(image, "fileUrl")
202
+ src: unref(formatJsonstr)(image, "fileUrl")
213
203
  }, null, 8, ["src"]);
214
204
  }), 128))])]);
215
205
  }), 128))]),
@@ -246,7 +236,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
246
236
  return openBlock(), createElementBlock("div", {
247
237
  class: "file-item",
248
238
  key: i
249
- }, [createElementVNode("span", _hoisted_3, toDisplayString(unref(getFileType)(item.content.msg)), 1), createElementVNode("div", _hoisted_4, [createElementVNode("span", _hoisted_5, toDisplayString(unref(getFileDetails)(item.content.msg, "fileName")), 1), createElementVNode("span", _hoisted_6, toDisplayString(unref(getDetail)(item, true)), 1)]), createElementVNode("div", _hoisted_7, [createVNode(ChatAdd, {
239
+ }, [createElementVNode("span", _hoisted_3, toDisplayString(unref(getFileType)(item.content.msg)), 1), createElementVNode("div", _hoisted_4, [createElementVNode("span", _hoisted_5, toDisplayString(unref(formatJsonstr)(item.content.msg, "fileName")), 1), createElementVNode("span", _hoisted_6, toDisplayString(unref(getDetail)(item, true)), 1)]), createElementVNode("div", _hoisted_7, [createVNode(ChatAdd, {
250
240
  title: function() {
251
241
  var _a, _b, _c;
252
242
  try {
@@ -286,7 +276,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
286
276
  trigger: withCtx(() => [createVNode(unref(NIcon), {
287
277
  size: 16,
288
278
  component: unref(DownloadOutline),
289
- onClick: () => unref(downloadFile)(item.content.fileUr, item.content.msg)
279
+ onClick: () => unref(downloadFile)(item.content.msg)
290
280
  }, null, 8, ["component", "onClick"])]),
291
281
  default: withCtx(() => [createTextVNode(function() {
292
282
  var _a, _b, _c;
@@ -292,7 +292,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
292
292
  msg,
293
293
  chatMessageType
294
294
  };
295
- if (chatMessageType === MESSAGE_TYPE.FILE) {
295
+ if ([MESSAGE_TYPE.FILE, MESSAGE_TYPE.IMAGE].includes(chatMessageType)) {
296
296
  _content.fileUrl = url;
297
297
  }
298
298
  if (origin === "btn") {
@@ -401,7 +401,7 @@ declare const _default: import("vue").DefineComponent<{}, {
401
401
  OpenOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
402
402
  DownloadOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
403
403
  downloadFile: typeof import("../utils").downloadFile;
404
- getFileDetails: typeof import("../utils").getFileDetails;
404
+ formatJsonstr: typeof import("../utils").formatJsonstr;
405
405
  getFileType: typeof import("../utils").getFileType;
406
406
  getDetail: typeof import("../utils").getDetail;
407
407
  ChatAdd: import("vue").DefineComponent<{
@@ -821,7 +821,7 @@ declare const _default: import("vue").DefineComponent<{}, {
821
821
  formatTime: typeof import("../utils").formatTime;
822
822
  isDoctorRole: typeof import("../utils").isDoctorRole;
823
823
  getRoleName: typeof import("../utils").getRoleName;
824
- getFileDetails: typeof import("../utils").getFileDetails;
824
+ formatJsonstr: typeof import("../utils").formatJsonstr;
825
825
  getFileType: typeof import("../utils").getFileType;
826
826
  getDetail: typeof import("../utils").getDetail;
827
827
  showAudioAndVideoRecord: typeof import("../utils").showAudioAndVideoRecord;
@@ -1,7 +1,7 @@
1
1
  import { CSSProperties } from 'vue';
2
2
  import { ImageRenderToolbarProps } from 'naive-ui';
3
3
  import { AnyObject } from '../../../../shared/types';
4
- import { simplifyMessage, isAudioOrVideoMessage, getAVTime, getForwardTitle, formatJson } from '../utils';
4
+ import { simplifyMessage, isAudioOrVideoMessage, getAVTime, getForwardTitle, formatJsonstr } from '../utils';
5
5
  import { MESSAGE_TYPE } from '../constants';
6
6
  declare const _default: import("vue").DefineComponent<{}, {
7
7
  chatMainRef: import("vue").Ref<HTMLElement | undefined>;
@@ -289,7 +289,7 @@ declare const _default: import("vue").DefineComponent<{}, {
289
289
  getForwardTitle: typeof getForwardTitle;
290
290
  isDoctorRole: typeof import("../utils").isDoctorRole;
291
291
  getRoleName: typeof import("../utils").getRoleName;
292
- getFileDetails: typeof import("../utils").getFileDetails;
292
+ formatJsonstr: typeof formatJsonstr;
293
293
  getFileType: typeof import("../utils").getFileType;
294
294
  getDetail: typeof import("../utils").getDetail;
295
295
  showAudioAndVideoRecord: typeof import("../utils").showAudioAndVideoRecord;
@@ -652,7 +652,7 @@ declare const _default: import("vue").DefineComponent<{}, {
652
652
  isAudioOrVideoMessage: typeof isAudioOrVideoMessage;
653
653
  getAVTime: typeof getAVTime;
654
654
  getForwardTitle: typeof getForwardTitle;
655
- formatJson: typeof formatJson;
655
+ formatJsonstr: typeof formatJsonstr;
656
656
  MESSAGE_TYPE: typeof MESSAGE_TYPE;
657
657
  ChatbubbleEllipsesOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
658
658
  EllipsisHorizontal: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
@@ -6,7 +6,7 @@ import { useData } from '../hooks/useData.js';
6
6
  import 'stompjs';
7
7
  import 'sockjs-client/dist/sockjs.min.js';
8
8
  import { MESSAGE_TYPE } from '../constants/index.js';
9
- import { isAudioOrVideoMessage, simplifyMessage, getForwardTitle, formatJson, getAVTime, downloadFile } from '../utils/index.js';
9
+ import { isAudioOrVideoMessage, simplifyMessage, getForwardTitle, formatJsonstr, getAVTime, downloadFile } from '../utils/index.js';
10
10
  import { first, last, isArray, toString } from 'lodash-es';
11
11
  import 'trtc-sdk-v5';
12
12
  import MessageTemplate from './MessageTemplate.vue.js';
@@ -130,7 +130,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
130
130
  "color": "rgba(255, 255, 255, 0.75",
131
131
  "size": 24,
132
132
  "component": ArrowDownSharp,
133
- "onClick": () => src && downloadFile(src, "img")
133
+ "onClick": () => src && downloadFile(JSON.stringify({
134
+ fileUrl: src,
135
+ fileName: "image"
136
+ }))
134
137
  }, null),
135
138
  default: () => function() {
136
139
  var _a2, _b2, _c;
@@ -479,7 +482,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
479
482
  }), 128))])], 8, _hoisted_14)) : createCommentVNode("v-if", true), item.content.chatMessageType === unref(MESSAGE_TYPE).IMAGE ? (openBlock(), createBlock(unref(NImage), {
480
483
  key: 4,
481
484
  width: "240",
482
- src: unref(formatJson)(item.__content, "fileUrl"),
485
+ src: unref(formatJsonstr)(item.__content, "fileUrl"),
483
486
  onClick: _cache[0] || (_cache[0] = (event) => event.stopPropagation())
484
487
  }, null, 8, ["src"])) : createCommentVNode("v-if", true), unref(isAudioOrVideoMessage)(item.content) ? (openBlock(), createElementBlock(Fragment, {
485
488
  key: 5
@@ -504,7 +507,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
504
507
  "row-gap": "0"
505
508
  }
506
509
  }, {
507
- default: withCtx(() => [createElementVNode("span", null, toDisplayString(unref(formatJson)(item.__content, "fileName")), 1), createElementVNode("span", _hoisted_19, toDisplayString(unref(formatJson)(item.__content, "fileSize")), 1)]),
510
+ default: withCtx(() => [createElementVNode("span", null, toDisplayString(unref(formatJsonstr)(item.__content, "fileName")), 1), createElementVNode("span", _hoisted_19, toDisplayString(unref(formatJsonstr)(item.__content, "fileSize")), 1)]),
508
511
  _: 2
509
512
  }, 1024)]),
510
513
  _: 2
@@ -1,6 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  import { AnyObject } from '../../../../shared/types';
3
- import { formatTime, isDoctorRole, getRoleName, getFileDetails, getFileType, getDetail, showAudioAndVideoRecord, getForwardTitle, simplifyMessage } from '../utils';
3
+ import { formatTime, isDoctorRole, getRoleName, formatJsonstr, getFileType, getDetail, showAudioAndVideoRecord, getForwardTitle, simplifyMessage } from '../utils';
4
4
  import { MESSAGE_TYPE } from '../constants';
5
5
  declare const _default: import("vue").DefineComponent<{
6
6
  visible: {
@@ -213,7 +213,7 @@ declare const _default: import("vue").DefineComponent<{
213
213
  formatTime: typeof formatTime;
214
214
  isDoctorRole: typeof isDoctorRole;
215
215
  getRoleName: typeof getRoleName;
216
- getFileDetails: typeof getFileDetails;
216
+ formatJsonstr: typeof formatJsonstr;
217
217
  getFileType: typeof getFileType;
218
218
  getDetail: typeof getDetail;
219
219
  showAudioAndVideoRecord: typeof showAudioAndVideoRecord;
@@ -6,7 +6,7 @@ import 'stompjs';
6
6
  import 'sockjs-client/dist/sockjs.min.js';
7
7
  import { MESSAGE_TYPE } from '../constants/index.js';
8
8
  import { searchChatRecordApi } from '../api/index.js';
9
- import { transformMessage, isDoctorRole, getRoleName, formatTime, getFileDetails, getFileType, getDetail, showAudioAndVideoRecord, getForwardTitle, simplifyMessage } from '../utils/index.js';
9
+ import { transformMessage, isDoctorRole, getRoleName, formatTime, formatJsonstr, getFileType, getDetail, showAudioAndVideoRecord, getForwardTitle, simplifyMessage } from '../utils/index.js';
10
10
  import { last, isArray } from 'lodash-es';
11
11
  import 'trtc-sdk-v5';
12
12
  import DatePicker from '../../../date-picker/index.js';
@@ -369,10 +369,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
369
369
  class: normalizeClass(["iho-chatRole", unref(isDoctorRole)(item.roleInfo) ? "isDoctor" : ""])
370
370
  }, toDisplayString(unref(getRoleName)(item.roleInfo)), 3), [[vShow, unref(getRoleName)(item.roleInfo)]])]), createElementVNode("span", _hoisted_9, toDisplayString(unref(formatTime)(item.sendTime).recordTime), 1)]), createElementVNode("div", _hoisted_10, [item.content.chatMessageType === unref(MESSAGE_TYPE).IMAGE ? (openBlock(), createElementBlock("img", {
371
371
  key: 0,
372
- src: unref(getFileDetails)(item.__content, "fileUrl")
372
+ src: unref(formatJsonstr)(item.__content, "fileUrl")
373
373
  }, null, 8, _hoisted_11)) : item.content.chatMessageType === unref(MESSAGE_TYPE).FILE ? (openBlock(), createElementBlock(Fragment, {
374
374
  key: 1
375
- }, [createElementVNode("span", _hoisted_12, toDisplayString(unref(getFileType)(item.__content)), 1), createElementVNode("div", _hoisted_13, [createElementVNode("span", _hoisted_14, toDisplayString(unref(getFileDetails)(item.__content, "fileName")), 1), createElementVNode("span", _hoisted_15, toDisplayString(unref(getDetail)(item)), 1)])], 64)) : item.content.chatMessageType === unref(MESSAGE_TYPE).EMOJI ? (openBlock(), createElementBlock("img", {
375
+ }, [createElementVNode("span", _hoisted_12, toDisplayString(unref(getFileType)(item.__content)), 1), createElementVNode("div", _hoisted_13, [createElementVNode("span", _hoisted_14, toDisplayString(unref(formatJsonstr)(item.__content, "fileName")), 1), createElementVNode("span", _hoisted_15, toDisplayString(unref(getDetail)(item)), 1)])], 64)) : item.content.chatMessageType === unref(MESSAGE_TYPE).EMOJI ? (openBlock(), createElementBlock("img", {
376
376
  key: 2,
377
377
  class: "emoji",
378
378
  src: unref(emojis).findEmoji(item.__content)
@@ -7,7 +7,7 @@ import 'stompjs';
7
7
  import 'sockjs-client/dist/sockjs.min.js';
8
8
  import { STATUS, MESSAGE_TYPE } from '../constants/index.js';
9
9
  import { recallMessageApi } from '../api/index.js';
10
- import { isAudioOrVideoMessage, $message, formatJson, downloadFile, getFileDetails } from '../utils/index.js';
10
+ import { isAudioOrVideoMessage, $message, downloadFile, formatJsonstr } from '../utils/index.js';
11
11
  import 'lodash-es';
12
12
  import 'trtc-sdk-v5';
13
13
  import { emojis } from '../utils/emoji.js';
@@ -192,7 +192,7 @@ var ContextMenu = /* @__PURE__ */ defineComponent({
192
192
  } else {
193
193
  let data;
194
194
  if ([MESSAGE_TYPE.EMOJI, MESSAGE_TYPE.IMAGE].includes(chatMessageType)) {
195
- const url = chatMessageType === MESSAGE_TYPE.EMOJI ? emojis.findEmoji(content.msg) : getFileDetails(content.msg, "fileUrl");
195
+ const url = chatMessageType === MESSAGE_TYPE.EMOJI ? emojis.findEmoji(content.msg) : formatJsonstr(content.msg, "fileUrl");
196
196
  data = `<img data-msg=${chatMessageType === MESSAGE_TYPE.EMOJI ? content.msg : ""} data-type=${chatMessageType} class=${chatMessageType === MESSAGE_TYPE.EMOJI ? "emoji--min" : "chat-image-copy"} src=${url} />`;
197
197
  } else if (chatMessageType === MESSAGE_TYPE.BLEND) {
198
198
  data = __content;
@@ -211,9 +211,7 @@ var ContextMenu = /* @__PURE__ */ defineComponent({
211
211
  }
212
212
  return;
213
213
  case "download": {
214
- const fileName = formatJson(__content, "fileName");
215
- const fileUrl = formatJson(__content, "fileUrl");
216
- downloadFile(fileUrl, fileName);
214
+ downloadFile(__content);
217
215
  return;
218
216
  }
219
217
  case "withdraw": {
@@ -1,5 +1,5 @@
1
1
  import { AnyObject } from '../../../../shared/types';
2
- import { formatTime, getForwardTitle, isDoctorRole, getRoleName, getFileDetails, getFileType, getDetail, showAudioAndVideoRecord, simplifyMessage } from '../utils';
2
+ import { formatTime, getForwardTitle, isDoctorRole, getRoleName, formatJsonstr, getFileType, getDetail, showAudioAndVideoRecord, simplifyMessage } from '../utils';
3
3
  import { MESSAGE_TYPE } from '../constants';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  id: {
@@ -54,7 +54,7 @@ declare const _default: import("vue").DefineComponent<{
54
54
  getForwardTitle: typeof getForwardTitle;
55
55
  isDoctorRole: typeof isDoctorRole;
56
56
  getRoleName: typeof getRoleName;
57
- getFileDetails: typeof getFileDetails;
57
+ formatJsonstr: typeof formatJsonstr;
58
58
  getFileType: typeof getFileType;
59
59
  getDetail: typeof getDetail;
60
60
  showAudioAndVideoRecord: typeof showAudioAndVideoRecord;
@@ -5,7 +5,7 @@ import 'stompjs';
5
5
  import 'sockjs-client/dist/sockjs.min.js';
6
6
  import { MESSAGE_TYPE } from '../constants/index.js';
7
7
  import '../api/index.js';
8
- import { transformMessage, getForwardTitle, isDoctorRole, getRoleName, formatTime, getFileDetails, getFileType, getDetail, showAudioAndVideoRecord, simplifyMessage } from '../utils/index.js';
8
+ import { transformMessage, getForwardTitle, isDoctorRole, getRoleName, formatTime, formatJsonstr, getFileType, getDetail, showAudioAndVideoRecord, simplifyMessage } from '../utils/index.js';
9
9
  import { isArray } from 'lodash-es';
10
10
  import 'trtc-sdk-v5';
11
11
  import { emojis } from '../utils/emoji.js';
@@ -116,10 +116,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
116
116
  }
117
117
  }, toDisplayString(unref(getRoleName)(item.roleInfo)), 3), [[vShow, unref(getRoleName)(item.roleInfo)]])]), createElementVNode("span", null, toDisplayString(unref(formatTime)(item.sendTime).recordTime), 1)]), createElementVNode("div", _hoisted_5, [item.content.chatMessageType === unref(MESSAGE_TYPE).IMAGE ? (openBlock(), createElementBlock("img", {
118
118
  key: 0,
119
- src: unref(getFileDetails)(item.__content, "fileUrl")
119
+ src: unref(formatJsonstr)(item.__content, "fileUrl")
120
120
  }, null, 8, _hoisted_6)) : item.content.chatMessageType === unref(MESSAGE_TYPE).FILE ? (openBlock(), createElementBlock(Fragment, {
121
121
  key: 1
122
- }, [createElementVNode("span", _hoisted_7, toDisplayString(unref(getFileType)(item.__content)), 1), createElementVNode("div", _hoisted_8, [createElementVNode("span", _hoisted_9, toDisplayString(unref(getFileDetails)(item.__content, "fileName")), 1), createElementVNode("span", _hoisted_10, toDisplayString(unref(getDetail)(item)), 1)])], 64)) : item.content.chatMessageType === unref(MESSAGE_TYPE).EMOJI ? (openBlock(), createElementBlock("img", {
122
+ }, [createElementVNode("span", _hoisted_7, toDisplayString(unref(getFileType)(item.__content)), 1), createElementVNode("div", _hoisted_8, [createElementVNode("span", _hoisted_9, toDisplayString(unref(formatJsonstr)(item.__content, "fileName")), 1), createElementVNode("span", _hoisted_10, toDisplayString(unref(getDetail)(item)), 1)])], 64)) : item.content.chatMessageType === unref(MESSAGE_TYPE).EMOJI ? (openBlock(), createElementBlock("img", {
123
123
  key: 2,
124
124
  class: "emoji",
125
125
  src: unref(emojis).findEmoji(item.__content)
@@ -225,7 +225,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
225
225
  round: "",
226
226
  size: 100,
227
227
  onClickCapture: _cache[0] || (_cache[0] = ($event) => showLargeAvatar.value = true)
228
- }, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\r\n <n-upload-trigger #="{ handleClick }" abstract>\r\n <n-button\r\n circle\r\n secondary\r\n class="edit-avatar"\r\n v-show="userDetail.id === state.userInfo.id"\r\n @click="handleClick"\r\n >\r\n <template #icon>\r\n <n-icon size="16" color="#666666" :component="Camera" />\r\n </template>\r\n </n-button>\r\n </n-upload-trigger>\r\n </n-upload> '), createElementVNode("div", _hoisted_4, [createElementVNode("h4", null, [createElementVNode("label", _hoisted_5, toDisplayString(userDetail.name), 1), withDirectives(createElementVNode("label", {
228
+ }, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\n <n-upload-trigger #="{ handleClick }" abstract>\n <n-button\n circle\n secondary\n class="edit-avatar"\n v-show="userDetail.id === state.userInfo.id"\n @click="handleClick"\n >\n <template #icon>\n <n-icon size="16" color="#666666" :component="Camera" />\n </template>\n </n-button>\n </n-upload-trigger>\n </n-upload> '), createElementVNode("div", _hoisted_4, [createElementVNode("h4", null, [createElementVNode("label", _hoisted_5, toDisplayString(userDetail.name), 1), withDirectives(createElementVNode("label", {
229
229
  class: normalizeClass(["iho-chatRole", unref(isDoctorRole)(userDetail.roleInfo) ? "isDoctor" : ""])
230
230
  }, toDisplayString(unref(getRoleName)(userDetail.roleInfo)), 3), [[vShow, unref(getRoleName)(userDetail.roleInfo)]])]), createElementVNode("p", null, toDisplayString(userDetail.orgName), 1)]), createVNode(unref(NButton), {
231
231
  strong: "",
@@ -1,9 +1,9 @@
1
1
  import { ref, reactive, computed, watch, toRef, inject, toRaw } from 'vue';
2
2
  import { openSessionApi, updateStatusApi, groupUserApi } from '../api/index.js';
3
3
  import { promiseTimeout, useIntervalFn } from '@vueuse/core';
4
- import { isGroup, listSort, formatTime, transformMessage, getFileSize, $message, simplifyMessage } from '../utils/index.js';
4
+ import { isGroup, listSort, formatTime, transformMessage, $message, simplifyMessage } from '../utils/index.js';
5
5
  import { cloneDeep, remove, isArray, uniqBy } from 'lodash-es';
6
- import { STATUS, MESSAGE_TYPE, CHAT_TYPE } from '../constants/index.js';
6
+ import { STATUS, CHAT_TYPE, MESSAGE_TYPE } from '../constants/index.js';
7
7
  import { useTheme } from '../../../../shared/hooks/useTheme.js';
8
8
  import 'date-fns';
9
9
  import '@vue/shared';
@@ -139,11 +139,6 @@ function initData(props, emit) {
139
139
  __content: transformMessage(item.content),
140
140
  __sendTime: formatTime(item.sendTime).recordTime
141
141
  });
142
- if (item.content.chatMessageType === MESSAGE_TYPE.FILE && !item.__size) {
143
- getFileSize(item.content.fileUrl).then((size) => {
144
- item.__size = size;
145
- });
146
- }
147
142
  });
148
143
  if (needUpdateTime()) {
149
144
  resume();
@@ -9,8 +9,7 @@ export declare function listSort(list: AnyObject[]): AnyObject[];
9
9
  export declare function transformMessage(content: AnyObject): any;
10
10
  export declare function getAVTime(msg: string): string;
11
11
  export declare function simplifyMessage(lastMessage: AnyObject): any;
12
- export declare function downloadFile(url: string, filename: string): void;
13
- export declare function getFileSize(url: string): Promise<unknown>;
12
+ export declare function downloadFile(msg: string): void;
14
13
  export declare function base64ToFile(base64: string): Promise<File | undefined>;
15
14
  export declare function isAudioOrVideoMessage(message: AnyObject): boolean;
16
15
  export declare function formatSeconds(seconds: number): string;
@@ -18,8 +17,7 @@ export declare function isGroup(session: AnyObject): boolean;
18
17
  export declare function getForwardTitle(content: AnyObject): string | undefined;
19
18
  export declare function isDoctorRole(type: string): boolean;
20
19
  export declare function getRoleName(type: string): string;
21
- export declare function getFileDetails(msg: string, type: string): any;
22
20
  export declare function getFileType(msg: string): string;
23
21
  export declare function getDetail(item: AnyObject, isShowSize?: boolean): string;
24
22
  export declare function showAudioAndVideoRecord(chatMessageType: string): "语音通话" | "视频通话";
25
- export declare function formatJson(obj: AnyObject | string, type: string): any;
23
+ export declare function formatJsonstr(obj: AnyObject | string, type: string): any;
@@ -177,44 +177,24 @@ function simplifyMessage(lastMessage) {
177
177
  return "[\u6D88\u606F]";
178
178
  }
179
179
  }
180
- function downloadFile(url, filename) {
180
+ function downloadFile(msg) {
181
+ const fileName = formatJsonstr(msg, "fileName");
182
+ const fileUrl = formatJsonstr(msg, "fileUrl");
181
183
  const x = new XMLHttpRequest();
182
- x.open("GET", url, true);
184
+ x.open("GET", fileUrl, true);
183
185
  x.responseType = "blob";
184
186
  x.onload = function(e) {
185
187
  if (x.status === 200) {
186
188
  const _url = window.URL.createObjectURL(x.response);
187
189
  const a = document.createElement("a");
188
190
  a.href = _url;
189
- a.download = filename;
191
+ a.download = fileName;
190
192
  a.dispatchEvent(new MouseEvent("click"));
191
193
  window.URL.revokeObjectURL(_url);
192
194
  }
193
195
  };
194
196
  x.send();
195
197
  }
196
- function getFileSize(url) {
197
- return new Promise((resolve, reject) => {
198
- const x = new XMLHttpRequest();
199
- x.open("HEAD", url, true);
200
- x.onreadystatechange = () => {
201
- var _a;
202
- if (x.readyState === 4 && x.status === 200) {
203
- let size = (_a = x.getResponseHeader("Content-Length")) != null ? _a : 0;
204
- const _size = +size;
205
- if (_size > 1024 * 1024) {
206
- size = (_size / (1024 * 1024)).toFixed(2) + "M";
207
- } else if (_size > 1024) {
208
- size = (_size / 1024).toFixed(2) + "K";
209
- } else {
210
- size = size + "B";
211
- }
212
- resolve(size);
213
- }
214
- };
215
- x.send();
216
- });
217
- }
218
198
  async function base64ToFile(base64) {
219
199
  try {
220
200
  const res = await fetch(base64);
@@ -272,17 +252,6 @@ function getRoleName(type) {
272
252
  }
273
253
  return roleName;
274
254
  }
275
- function getFileDetails(msg, type) {
276
- try {
277
- const parseMsg = JSON.parse(msg);
278
- if (parseMsg) {
279
- return parseMsg[type];
280
- }
281
- return "";
282
- } catch (error) {
283
- return msg || "";
284
- }
285
- }
286
255
  function getFileType(msg) {
287
256
  const dotIndex = msg.lastIndexOf(".");
288
257
  if (dotIndex !== -1) {
@@ -293,13 +262,14 @@ function getFileType(msg) {
293
262
  }
294
263
  function getDetail(item, isShowSize) {
295
264
  const {
296
- size,
265
+ content = {},
297
266
  sendTime,
298
267
  senderName
299
268
  } = item;
300
269
  const details = `${format(new Date(sendTime), "yyyy/MM/dd HH:mm")} ${senderName}`;
301
270
  if (isShowSize) {
302
- return `${size} \xB7 ${details}`;
271
+ const fileSize = formatJsonstr(content.msg, "fileSize");
272
+ return `${fileSize} \xB7 ${details}`;
303
273
  }
304
274
  return details;
305
275
  }
@@ -320,7 +290,7 @@ function showAudioAndVideoRecord(chatMessageType) {
320
290
  }
321
291
  }();
322
292
  }
323
- function formatJson(obj, type) {
293
+ function formatJsonstr(obj, type) {
324
294
  try {
325
295
  if (typeof obj === "string") {
326
296
  const objParse = JSON.parse(obj);
@@ -332,4 +302,4 @@ function formatJson(obj, type) {
332
302
  }
333
303
  }
334
304
 
335
- export { $message, base64ToFile, downloadFile, formatJson, formatSeconds, formatTime, getAVTime, getDetail, getFileDetails, getFileSize, getFileType, getForwardTitle, getRoleName, isAudioOrVideoMessage, isDoctorRole, isGroup, listSort, showAudioAndVideoRecord, simplifyMessage, transformMessage };
305
+ export { $message, base64ToFile, downloadFile, formatJsonstr, formatSeconds, formatTime, getAVTime, getDetail, getFileType, getForwardTitle, getRoleName, isAudioOrVideoMessage, isDoctorRole, isGroup, listSort, showAudioAndVideoRecord, simplifyMessage, transformMessage };
@@ -372,7 +372,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
372
372
  stack.push(...node.children);
373
373
  }
374
374
  }
375
- return result;
375
+ return result == null ? void 0 : result.reverse();
376
376
  }
377
377
  if (!isRemote.value) {
378
378
  if (isSearch.value && !isShowGroupList.value) {
package/es/env.d.ts CHANGED
@@ -1,25 +1,25 @@
1
- /// <reference types="vite/client" />
2
-
3
- interface ImportMetaEnv {
4
- readonly VITE_APP_TYPE: string;
5
- // 更多环境变量...
6
- }
7
-
8
- interface ImportMeta {
9
- readonly env: ImportMetaEnv;
10
- }
11
-
12
- declare module '*.vue' {
13
- // @ts-ignore
14
- import type { App, defineComponent } from 'vue';
15
- // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
- // // const component: DefineComponent<{}, {}, any>
17
- const component: ReturnType<typeof defineComponent> & {
18
- install(app: App): void;
19
- };
20
- // @ts-ignore
21
- export default component;
22
- }
23
-
24
- declare module '*.js';
25
-
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_APP_TYPE: string;
5
+ // 更多环境变量...
6
+ }
7
+
8
+ interface ImportMeta {
9
+ readonly env: ImportMetaEnv;
10
+ }
11
+
12
+ declare module '*.vue' {
13
+ // @ts-ignore
14
+ import type { App, defineComponent } from 'vue';
15
+ // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
+ // // const component: DefineComponent<{}, {}, any>
17
+ const component: ReturnType<typeof defineComponent> & {
18
+ install(app: App): void;
19
+ };
20
+ // @ts-ignore
21
+ export default component;
22
+ }
23
+
24
+ declare module '*.js';
25
+
@@ -1,5 +1,5 @@
1
1
  var name = "@cnhis-design-vue/shared";
2
- var version = "3.3.3-beta.27";
2
+ var version = "3.3.3-beta.29";
3
3
  var main = "index.ts";
4
4
  var peerDependencies = {
5
5
  "naive-ui": "^2.30.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.3.3-beta.27",
3
+ "version": "3.3.3-beta.29",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -25,7 +25,7 @@
25
25
  "vxe-table": "^4.2.5"
26
26
  },
27
27
  "dependencies": {
28
- "@cnhis-frontend/audio-sdk": "1.0.0-beta.6",
28
+ "@cnhis-frontend/audio-sdk": "1.0.0-beta.8",
29
29
  "@formily/core": "2.1.9",
30
30
  "@formily/path": "2.1.9",
31
31
  "@formily/reactive": "2.1.9",
@@ -73,5 +73,5 @@
73
73
  "iOS 7",
74
74
  "last 3 iOS versions"
75
75
  ],
76
- "gitHead": "370f6bf59c0deb92555455cbe230758b8d5d8135"
76
+ "gitHead": "011f18a245fdf3430d8b463d4965821e0f580cc9"
77
77
  }