cnhis-design-vue 3.3.2-beta.24 → 3.3.2-beta.25

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/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
+ ```
@@ -81,7 +81,7 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
81
81
  loading: import("vue").Ref<boolean>;
82
82
  content: any;
83
83
  wsConnected: import("vue").ComputedRef<boolean>;
84
- recorderStatus: import("vue").ComputedRef<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
84
+ recorderStatus: import("vue").ComputedRef<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
85
85
  recordingProps: import("vue").ComputedRef<{
86
86
  token: string | undefined;
87
87
  configs: import("../../shared/types").AnyObject;
@@ -89,7 +89,7 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
89
89
  intentionCode: string;
90
90
  show: boolean;
91
91
  wsConnected: boolean;
92
- recorderStatus: "" | "fail" | "recording" | "pause" | "ws_close" | "stop";
92
+ recorderStatus: "" | "stop" | "fail" | "recording" | "pause" | "ws_close";
93
93
  startWaveViewMethod: (options: import("../../shared/types").AnyObject) => void;
94
94
  }>;
95
95
  isGenerateMedicalRecord: import("vue").ComputedRef<boolean>;
@@ -140,7 +140,7 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
140
140
  type: import("vue").PropType<import("../../shared/types").AnyFn>;
141
141
  };
142
142
  recorderStatus: {
143
- type: import("vue").PropType<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
143
+ type: import("vue").PropType<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
144
144
  default: string;
145
145
  };
146
146
  }, {
@@ -182,7 +182,7 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
182
182
  type: import("vue").PropType<import("../../shared/types").AnyFn>;
183
183
  };
184
184
  recorderStatus: {
185
- type: import("vue").PropType<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
185
+ type: import("vue").PropType<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
186
186
  default: string;
187
187
  };
188
188
  }>> & {
@@ -200,7 +200,7 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
200
200
  data: string;
201
201
  }>;
202
202
  wsConnected: import("vue").Ref<boolean>;
203
- recorderStatus: import("vue").Ref<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
203
+ recorderStatus: import("vue").Ref<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
204
204
  audioChartRef: import("vue").Ref<HTMLDivElement | undefined>;
205
205
  audioChartSamllRef: import("vue").Ref<HTMLDivElement | undefined>;
206
206
  contentScrollRef: import("vue").Ref<HTMLDivElement | undefined>;
@@ -316,7 +316,7 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
316
316
  type: import("vue").PropType<import("../../shared/types").AnyFn>;
317
317
  };
318
318
  recorderStatus: {
319
- type: import("vue").PropType<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
319
+ type: import("vue").PropType<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
320
320
  default: string;
321
321
  };
322
322
  }>> & {
@@ -336,7 +336,7 @@ declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
336
336
  showBtn: boolean;
337
337
  wsConnected: boolean;
338
338
  fromSdk: boolean;
339
- recorderStatus: "" | "fail" | "recording" | "pause" | "ws_close" | "stop";
339
+ recorderStatus: "" | "stop" | "fail" | "recording" | "pause" | "ws_close";
340
340
  }>;
341
341
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "success" | "fail" | "recordingHeightChange")[], "close" | "success" | "fail" | "recordingHeightChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
342
342
  timed: {
@@ -79,7 +79,7 @@ declare const _default: import("vue").DefineComponent<{
79
79
  loading: import("vue").Ref<boolean>;
80
80
  content: any;
81
81
  wsConnected: import("vue").ComputedRef<boolean>;
82
- recorderStatus: import("vue").ComputedRef<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
82
+ recorderStatus: import("vue").ComputedRef<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
83
83
  recordingProps: import("vue").ComputedRef<{
84
84
  token: string | undefined;
85
85
  configs: AnyObject;
@@ -87,7 +87,7 @@ declare const _default: import("vue").DefineComponent<{
87
87
  intentionCode: string;
88
88
  show: boolean;
89
89
  wsConnected: boolean;
90
- recorderStatus: "" | "fail" | "recording" | "pause" | "ws_close" | "stop";
90
+ recorderStatus: "" | "stop" | "fail" | "recording" | "pause" | "ws_close";
91
91
  startWaveViewMethod: (options: AnyObject) => void;
92
92
  }>;
93
93
  isGenerateMedicalRecord: import("vue").ComputedRef<boolean>;
@@ -138,7 +138,7 @@ declare const _default: import("vue").DefineComponent<{
138
138
  type: PropType<import("../../../shared/types").AnyFn>;
139
139
  };
140
140
  recorderStatus: {
141
- type: PropType<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
141
+ type: PropType<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
142
142
  default: string;
143
143
  };
144
144
  }, {
@@ -180,7 +180,7 @@ declare const _default: import("vue").DefineComponent<{
180
180
  type: PropType<import("../../../shared/types").AnyFn>;
181
181
  };
182
182
  recorderStatus: {
183
- type: PropType<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
183
+ type: PropType<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
184
184
  default: string;
185
185
  };
186
186
  }>> & {
@@ -198,7 +198,7 @@ declare const _default: import("vue").DefineComponent<{
198
198
  data: string;
199
199
  }>;
200
200
  wsConnected: import("vue").Ref<boolean>;
201
- recorderStatus: import("vue").Ref<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
201
+ recorderStatus: import("vue").Ref<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
202
202
  audioChartRef: import("vue").Ref<HTMLDivElement | undefined>;
203
203
  audioChartSamllRef: import("vue").Ref<HTMLDivElement | undefined>;
204
204
  contentScrollRef: import("vue").Ref<HTMLDivElement | undefined>;
@@ -314,7 +314,7 @@ declare const _default: import("vue").DefineComponent<{
314
314
  type: PropType<import("../../../shared/types").AnyFn>;
315
315
  };
316
316
  recorderStatus: {
317
- type: PropType<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
317
+ type: PropType<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
318
318
  default: string;
319
319
  };
320
320
  }>> & {
@@ -334,7 +334,7 @@ declare const _default: import("vue").DefineComponent<{
334
334
  showBtn: boolean;
335
335
  wsConnected: boolean;
336
336
  fromSdk: boolean;
337
- recorderStatus: "" | "fail" | "recording" | "pause" | "ws_close" | "stop";
337
+ recorderStatus: "" | "stop" | "fail" | "recording" | "pause" | "ws_close";
338
338
  }>;
339
339
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "success" | "fail" | "recordingHeightChange")[], "close" | "success" | "fail" | "recordingHeightChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
340
340
  timed: {
@@ -17,7 +17,7 @@ export default class AudioSDK {
17
17
  wsConnected: import("vue").Ref<boolean>;
18
18
  private loading;
19
19
  private pauseContent;
20
- recorderStatus: import("vue").Ref<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
20
+ recorderStatus: import("vue").Ref<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
21
21
  recorderClosing: import("vue").Ref<boolean>;
22
22
  waveView: any;
23
23
  constructor();
@@ -50,7 +50,7 @@ declare const _default: import("vue").DefineComponent<{
50
50
  type: import("vue").PropType<import("../../../../shared/types").AnyFn>;
51
51
  };
52
52
  recorderStatus: {
53
- type: import("vue").PropType<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
53
+ type: import("vue").PropType<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
54
54
  default: string;
55
55
  };
56
56
  }, {
@@ -92,7 +92,7 @@ declare const _default: import("vue").DefineComponent<{
92
92
  type: import("vue").PropType<import("../../../../shared/types").AnyFn>;
93
93
  };
94
94
  recorderStatus: {
95
- type: import("vue").PropType<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
95
+ type: import("vue").PropType<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
96
96
  default: string;
97
97
  };
98
98
  }>> & {
@@ -110,7 +110,7 @@ declare const _default: import("vue").DefineComponent<{
110
110
  data: string;
111
111
  }>;
112
112
  wsConnected: import("vue").Ref<boolean>;
113
- recorderStatus: import("vue").Ref<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
113
+ recorderStatus: import("vue").Ref<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
114
114
  audioChartRef: import("vue").Ref<HTMLDivElement | undefined>;
115
115
  audioChartSamllRef: import("vue").Ref<HTMLDivElement | undefined>;
116
116
  contentScrollRef: import("vue").Ref<HTMLDivElement | undefined>;
@@ -226,7 +226,7 @@ declare const _default: import("vue").DefineComponent<{
226
226
  type: import("vue").PropType<import("../../../../shared/types").AnyFn>;
227
227
  };
228
228
  recorderStatus: {
229
- type: import("vue").PropType<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
229
+ type: import("vue").PropType<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
230
230
  default: string;
231
231
  };
232
232
  }>> & {
@@ -246,7 +246,7 @@ declare const _default: import("vue").DefineComponent<{
246
246
  showBtn: boolean;
247
247
  wsConnected: boolean;
248
248
  fromSdk: boolean;
249
- recorderStatus: "" | "fail" | "recording" | "pause" | "ws_close" | "stop";
249
+ recorderStatus: "" | "stop" | "fail" | "recording" | "pause" | "ws_close";
250
250
  }>;
251
251
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
252
252
  content: {
@@ -38,7 +38,7 @@ declare const _default: import("vue").DefineComponent<{
38
38
  type: PropType<AnyFn>;
39
39
  };
40
40
  recorderStatus: {
41
- type: PropType<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
41
+ type: PropType<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
42
42
  default: string;
43
43
  };
44
44
  }, {
@@ -80,7 +80,7 @@ declare const _default: import("vue").DefineComponent<{
80
80
  type: PropType<AnyFn>;
81
81
  };
82
82
  recorderStatus: {
83
- type: PropType<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
83
+ type: PropType<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
84
84
  default: string;
85
85
  };
86
86
  }>> & {
@@ -98,7 +98,7 @@ declare const _default: import("vue").DefineComponent<{
98
98
  data: string;
99
99
  }>;
100
100
  wsConnected: import("vue").Ref<boolean>;
101
- recorderStatus: import("vue").Ref<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
101
+ recorderStatus: import("vue").Ref<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
102
102
  audioChartRef: import("vue").Ref<HTMLDivElement | undefined>;
103
103
  audioChartSamllRef: import("vue").Ref<HTMLDivElement | undefined>;
104
104
  contentScrollRef: import("vue").Ref<HTMLDivElement | undefined>;
@@ -214,7 +214,7 @@ declare const _default: import("vue").DefineComponent<{
214
214
  type: PropType<AnyFn>;
215
215
  };
216
216
  recorderStatus: {
217
- type: PropType<"" | "fail" | "recording" | "pause" | "ws_close" | "stop">;
217
+ type: PropType<"" | "stop" | "fail" | "recording" | "pause" | "ws_close">;
218
218
  default: string;
219
219
  };
220
220
  }>> & {
@@ -234,6 +234,6 @@ declare const _default: import("vue").DefineComponent<{
234
234
  showBtn: boolean;
235
235
  wsConnected: boolean;
236
236
  fromSdk: boolean;
237
- recorderStatus: "" | "fail" | "recording" | "pause" | "ws_close" | "stop";
237
+ recorderStatus: "" | "stop" | "fail" | "recording" | "pause" | "ws_close";
238
238
  }>;
239
239
  export default _default;
@@ -547,6 +547,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
547
547
  isPrintDisabled: (outer: any, j: number) => any;
548
548
  directPrint: () => Promise<void>;
549
549
  directDefaultFormatPrint: (defaultFormatId: string) => Promise<void>;
550
+ handleShortcutStartAndStop: (status: "start" | "stop") => void;
550
551
  NDropdown: any;
551
552
  NButton: any;
552
553
  NIcon: any;
@@ -1590,6 +1591,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
1590
1591
  }>;
1591
1592
  emits: (event: "success" | "error" | "cancel" | "clickoutside" | "saveOuterPrint", ...args: any[]) => void;
1592
1593
  directPrint: () => Promise<void>;
1594
+ handleShortcutStartAndStop: (status: "start" | "stop") => void;
1593
1595
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("success" | "error" | "cancel" | "clickoutside" | "saveOuterPrint")[], "success" | "error" | "cancel" | "clickoutside" | "saveOuterPrint", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1594
1596
  printParams: {
1595
1597
  type: import("vue").PropType<import("../../shared/types").AnyObject[]>;
@@ -553,6 +553,7 @@ declare const _default: import("vue").DefineComponent<{
553
553
  isPrintDisabled: (outer: any, j: number) => any;
554
554
  directPrint: () => Promise<void>;
555
555
  directDefaultFormatPrint: (defaultFormatId: string) => Promise<void>;
556
+ handleShortcutStartAndStop: (status: "start" | "stop") => void;
556
557
  NDropdown: any;
557
558
  NButton: any;
558
559
  NIcon: any;
@@ -1599,6 +1600,7 @@ declare const _default: import("vue").DefineComponent<{
1599
1600
  }>;
1600
1601
  emits: (event: "success" | "error" | "cancel" | "clickoutside" | "saveOuterPrint", ...args: any[]) => void;
1601
1602
  directPrint: () => Promise<void>;
1603
+ handleShortcutStartAndStop: (status: 'start' | 'stop') => void;
1602
1604
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("success" | "error" | "cancel" | "clickoutside" | "saveOuterPrint")[], "success" | "error" | "cancel" | "clickoutside" | "saveOuterPrint", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1603
1605
  printParams: {
1604
1606
  type: PropType<AnyObject[]>;
@@ -187,8 +187,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
187
187
  var _a;
188
188
  (_a = printComponentRef.value) == null ? void 0 : _a.directPrint();
189
189
  };
190
+ const handleShortcutStartAndStop = (status) => {
191
+ var _a;
192
+ (_a = printComponentRef.value) == null ? void 0 : _a.handleShortcutStartAndStop(status);
193
+ };
190
194
  expose({
191
- directPrint
195
+ directPrint,
196
+ handleShortcutStartAndStop
192
197
  });
193
198
  return (_ctx, _cache) => {
194
199
  return openBlock(), createBlock(resolveDynamicComponent(unref(isComponent)), mergeProps({
@@ -315,6 +315,7 @@ declare const _default: import("vue").DefineComponent<{
315
315
  isPrintDisabled: (outer: any, j: number) => any;
316
316
  directPrint: () => Promise<void>;
317
317
  directDefaultFormatPrint: (defaultFormatId: string) => Promise<void>;
318
+ handleShortcutStartAndStop: (status: 'start' | 'stop') => void;
318
319
  NDropdown: any;
319
320
  NButton: any;
320
321
  NIcon: any;
@@ -1046,6 +1046,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1046
1046
  const key = keys[i];
1047
1047
  const field = shortcutSettings.value[key];
1048
1048
  const {
1049
+ start,
1049
1050
  stop,
1050
1051
  signature
1051
1052
  } = useShortcuts().register({
@@ -1071,7 +1072,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1071
1072
  }
1072
1073
  }
1073
1074
  });
1074
- shortcutFn.value[key] = stop;
1075
+ shortcutFn.value[key] = {
1076
+ start,
1077
+ stop
1078
+ };
1075
1079
  }
1076
1080
  }
1077
1081
  };
@@ -1121,12 +1125,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1121
1125
  state.isInited = false;
1122
1126
  });
1123
1127
  onBeforeUnmount(() => {
1124
- const shortcutKeys = Object.keys(shortcutFn.value);
1125
- if (shortcutKeys.length > 0) {
1126
- shortcutKeys.forEach((key) => {
1127
- shortcutFn.value[key] && shortcutFn.value[key]();
1128
- });
1129
- }
1128
+ handleShortcutStartAndStop("stop");
1130
1129
  });
1131
1130
  watch(() => props.params, (val) => {
1132
1131
  const keys = Object.keys(state.templateParams);
@@ -1168,8 +1167,21 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1168
1167
  handleOneTypePrint(curFormat.templateCode, curFormat.templateId, curFormat.key, false);
1169
1168
  }
1170
1169
  }
1170
+ function handleShortcutStartAndStop(status) {
1171
+ const shortcutStatusList = ["start", "stop"];
1172
+ if (!shortcutStatusList.includes(status))
1173
+ return;
1174
+ const shortcutKeys = Object.keys(shortcutFn.value);
1175
+ if (shortcutKeys.length > 0) {
1176
+ shortcutKeys.forEach((key) => {
1177
+ var _a, _b;
1178
+ shortcutFn.value[key] && ((_b = (_a = shortcutFn.value[key])[status]) == null ? void 0 : _b.call(_a));
1179
+ });
1180
+ }
1181
+ }
1171
1182
  expose({
1172
- directPrint
1183
+ directPrint,
1184
+ handleShortcutStartAndStop
1173
1185
  });
1174
1186
  return (_ctx, _cache) => {
1175
1187
  return openBlock(), createElementBlock(Fragment, null, [createElementVNode("div", _hoisted_1, [createCommentVNode(" \u5916\u663E\u6309\u94AE\u96C6\u5408 "), createVNode(unref(NButtonGroup), {
@@ -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;
@@ -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: "",
@@ -193,7 +193,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
193
193
  }]),
194
194
  ref_key: "scaleViewDom",
195
195
  ref: scaleViewDom
196
- }, [createCommentVNode(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="\u52A0\u8F7D\u4E2D"></n-spin>\r\n </template> '), !state.spinning && !state.hasFrontAddress ? (openBlock(), createElementBlock(Fragment, {
196
+ }, [createCommentVNode(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="\u52A0\u8F7D\u4E2D"></n-spin>\n </template> '), !state.spinning && !state.hasFrontAddress ? (openBlock(), createElementBlock(Fragment, {
197
197
  key: 0
198
198
  }, [unref(noDataState).noData ? (openBlock(), createBlock(NoData, {
199
199
  key: 0,
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.2-beta.24";
2
+ var version = "3.3.2-beta.25";
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.2-beta.24",
3
+ "version": "3.3.2-beta.25",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -72,5 +72,5 @@
72
72
  "iOS 7",
73
73
  "last 3 iOS versions"
74
74
  ],
75
- "gitHead": "22fa6dc0c619d600b00db3a789cad34ac888b3fb"
75
+ "gitHead": "675cd71c94f1133ba4554c60666e78a8ebe3c8cb"
76
76
  }