cnhis-design-vue 3.3.1-beta.10 → 3.3.1-beta.12
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/es/components/ai-chat/index.d.ts +145 -10
- package/es/components/ai-chat/src/Index.vue.d.ts +145 -10
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/api/index.d.ts +6 -0
- package/es/components/ai-chat/src/api/index.js +1 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +44 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue.js +1 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -0
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +55 -2
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMainInner.d.ts +2 -0
- package/es/components/ai-chat/src/components/ChatMainInner.js +1 -0
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +55 -0
- package/es/components/ai-chat/src/components/ChatRight.vue.js +1 -0
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -0
- package/es/components/ai-chat/src/components/card/JsonCard.d.ts +25 -0
- package/es/components/ai-chat/src/components/card/JsonCard.js +1 -0
- package/es/components/ai-chat/src/components/card/SelectIcon.d.ts +14 -0
- package/es/components/ai-chat/src/components/card/SelectIcon.js +1 -0
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +6 -0
- package/es/components/ai-chat/src/hooks/useProgram.js +1 -0
- package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +2 -0
- package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -0
- package/es/components/ai-chat/src/utils/index.d.ts +1 -0
- package/es/components/ai-chat/src/utils/index.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/audio-sdk/index.d.ts +2 -304
- package/es/components/audio-sdk/index.js +1 -1
- package/es/components/audio-sdk/src/audioSDK.d.ts +8 -5
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +4 -43
- package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
- package/es/components/audio-sdk/src/utils/recordingModal.d.ts +4 -7
- package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
- package/es/components/audio-sdk/style/index.css +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +1 -7
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/editor/src/Editor.js +1 -1
- package/es/components/editor/style/index.css +1 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/field-editor/index.d.ts +1 -7
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +1 -7
- package/es/components/form-config/index.d.ts +3 -38
- package/es/components/form-config/src/FormConfig.vue.d.ts +3 -38
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -7
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -17
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +1 -8
- package/es/components/form-render/index.d.ts +1 -7
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -7
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -7
- package/es/components/form-render/src/components/renderer/date.d.ts +0 -2
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/formItem.d.ts +0 -2
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/input.d.ts +0 -5
- package/es/components/form-render/src/components/renderer/input.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -14
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -14
- package/es/components/form-render/src/components/renderer/select.d.ts +0 -5
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +1 -12
- package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +0 -4
- package/es/components/form-render/src/types/fieldItem.d.ts +0 -1
- package/es/components/form-render/src/types/index.d.ts +0 -2
- package/es/components/form-render/src/utils/index.d.ts +0 -1
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -3
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +0 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +0 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +2 -2
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +2 -24
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -24
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +0 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +0 -2
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -9
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -7
- package/es/components/scale-view/index.d.ts +2 -3
- package/es/components/scale-view/src/ScaleView.vue.d.ts +2 -3
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.d.ts +1 -3
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +2189 -1
- package/es/components/shortcut-setter/index.d.ts +1 -8
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -8
- package/es/shared/assets/img/file-emr.png.js +1 -0
- package/es/shared/assets/img/file.png.js +1 -0
- package/es/shared/assets/img/use.png.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/audio-sdk/src/Index.vue.d.ts +0 -304
- package/es/components/audio-sdk/src/Index.vue.js +0 -1
- package/es/components/audio-sdk/src/Index.vue2.js +0 -1
- package/es/components/audio-sdk/src/components/form.vue.d.ts +0 -51
- package/es/components/audio-sdk/src/components/form.vue.js +0 -1
- package/es/components/audio-sdk/src/components/form.vue2.js +0 -1
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +0 -91
- package/es/components/audio-sdk/src/components/recording-modal.vue.js +0 -1
- package/es/components/audio-sdk/src/components/recording-modal.vue2.js +0 -1
- package/es/components/audio-sdk/src/utils/index.d.ts +0 -4
- package/es/components/audio-sdk/src/utils/index.js +0 -1
- package/es/shared/components/ArrowIcon/ArrowIcon.vue.js +0 -1
- package/es/shared/components/ArrowIcon/index.d.ts +0 -2
- package/es/shared/components/ArrowIcon/index.js +0 -1
- package/es/shared/components/DateIcon/DateIcon.vue.js +0 -1
- package/es/shared/components/DateIcon/index.d.ts +0 -2
- package/es/shared/components/DateIcon/index.js +0 -1
@@ -1,304 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export { AudioSDK as CAudioSDK };
|
4
|
-
declare const AudioSdk: SFCWithInstall<import("vue").DefineComponent<{
|
5
|
-
timed: {
|
6
|
-
type: NumberConstructor;
|
7
|
-
default: number;
|
8
|
-
};
|
9
|
-
realTimeRecognition: {
|
10
|
-
type: BooleanConstructor;
|
11
|
-
};
|
12
|
-
allowPunctuationMark: {
|
13
|
-
type: BooleanConstructor;
|
14
|
-
default: boolean;
|
15
|
-
};
|
16
|
-
isGenerateMedicalRecord: {
|
17
|
-
type: BooleanConstructor;
|
18
|
-
};
|
19
|
-
token: {
|
20
|
-
type: StringConstructor;
|
21
|
-
};
|
22
|
-
medicalTemplateInfo: {
|
23
|
-
type: import("vue").PropType<Record<string, any>[]>;
|
24
|
-
};
|
25
|
-
}, {
|
26
|
-
cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
27
|
-
audioSdk: AudioSDK;
|
28
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
29
|
-
timed: {
|
30
|
-
type: NumberConstructor;
|
31
|
-
default: number;
|
32
|
-
};
|
33
|
-
realTimeRecognition: {
|
34
|
-
type: BooleanConstructor;
|
35
|
-
};
|
36
|
-
allowPunctuationMark: {
|
37
|
-
type: BooleanConstructor;
|
38
|
-
default: boolean;
|
39
|
-
};
|
40
|
-
isGenerateMedicalRecord: {
|
41
|
-
type: BooleanConstructor;
|
42
|
-
};
|
43
|
-
token: {
|
44
|
-
type: StringConstructor;
|
45
|
-
};
|
46
|
-
medicalTemplateInfo: {
|
47
|
-
type: import("vue").PropType<Record<string, any>[]>;
|
48
|
-
};
|
49
|
-
}>> & {
|
50
|
-
onSuccess?: ((...args: any[]) => any) | undefined;
|
51
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
52
|
-
onFail?: ((...args: any[]) => any) | undefined;
|
53
|
-
}>>;
|
54
|
-
emit: (event: "close" | "success" | "fail", ...args: any[]) => void;
|
55
|
-
recordingRef: import("vue").Ref<any>;
|
56
|
-
jsonData: import("vue").Ref<{}>;
|
57
|
-
isRecording: import("vue").Ref<boolean>;
|
58
|
-
isForm: import("vue").Ref<boolean>;
|
59
|
-
configs: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
60
|
-
content: import("vue").ComputedRef<string>;
|
61
|
-
onClose: () => void;
|
62
|
-
onFormClose: () => void;
|
63
|
-
onEnd: () => void;
|
64
|
-
onEdit: (data: import("../../shared/types").AnyObject) => void;
|
65
|
-
onFinish: (data: import("../../shared/types").AnyObject) => void;
|
66
|
-
CRecording: import("vue").DefineComponent<{
|
67
|
-
content: {
|
68
|
-
type: StringConstructor;
|
69
|
-
default: string;
|
70
|
-
};
|
71
|
-
showBtn: {
|
72
|
-
type: BooleanConstructor;
|
73
|
-
};
|
74
|
-
token: {
|
75
|
-
type: StringConstructor;
|
76
|
-
};
|
77
|
-
configs: {
|
78
|
-
type: import("vue").PropType<Record<string, string>>;
|
79
|
-
};
|
80
|
-
}, {
|
81
|
-
consultationRecordUrl: string;
|
82
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
83
|
-
content: {
|
84
|
-
type: StringConstructor;
|
85
|
-
default: string;
|
86
|
-
};
|
87
|
-
showBtn: {
|
88
|
-
type: BooleanConstructor;
|
89
|
-
};
|
90
|
-
token: {
|
91
|
-
type: StringConstructor;
|
92
|
-
};
|
93
|
-
configs: {
|
94
|
-
type: import("vue").PropType<Record<string, string>>;
|
95
|
-
};
|
96
|
-
}>> & {
|
97
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
98
|
-
onEdit?: ((...args: any[]) => any) | undefined;
|
99
|
-
onFail?: ((...args: any[]) => any) | undefined;
|
100
|
-
onEnd?: ((...args: any[]) => any) | undefined;
|
101
|
-
}>>;
|
102
|
-
emit: (event: "edit" | "close" | "end" | "fail", ...args: any[]) => void;
|
103
|
-
loading: import("vue").Ref<boolean>;
|
104
|
-
handleKeydown: (event: KeyboardEvent) => void;
|
105
|
-
close: () => void;
|
106
|
-
toEdit: () => Promise<void>;
|
107
|
-
NIcon: any;
|
108
|
-
NButton: any;
|
109
|
-
NSpin: any;
|
110
|
-
Mic: 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<{}>>, {}>;
|
111
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "close" | "end" | "fail")[], "edit" | "close" | "end" | "fail", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
112
|
-
content: {
|
113
|
-
type: StringConstructor;
|
114
|
-
default: string;
|
115
|
-
};
|
116
|
-
showBtn: {
|
117
|
-
type: BooleanConstructor;
|
118
|
-
};
|
119
|
-
token: {
|
120
|
-
type: StringConstructor;
|
121
|
-
};
|
122
|
-
configs: {
|
123
|
-
type: import("vue").PropType<Record<string, string>>;
|
124
|
-
};
|
125
|
-
}>> & {
|
126
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
127
|
-
onEdit?: ((...args: any[]) => any) | undefined;
|
128
|
-
onFail?: ((...args: any[]) => any) | undefined;
|
129
|
-
onEnd?: ((...args: any[]) => any) | undefined;
|
130
|
-
}, {
|
131
|
-
content: string;
|
132
|
-
showBtn: boolean;
|
133
|
-
}>;
|
134
|
-
RecordingModal: import("vue").DefineComponent<{
|
135
|
-
content: {
|
136
|
-
type: StringConstructor;
|
137
|
-
default: string;
|
138
|
-
};
|
139
|
-
}, {
|
140
|
-
cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
141
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
142
|
-
content: {
|
143
|
-
type: StringConstructor;
|
144
|
-
default: string;
|
145
|
-
};
|
146
|
-
}>> & {}>>;
|
147
|
-
NModal: any;
|
148
|
-
Recording: import("vue").DefineComponent<{
|
149
|
-
content: {
|
150
|
-
type: StringConstructor;
|
151
|
-
default: string;
|
152
|
-
};
|
153
|
-
showBtn: {
|
154
|
-
type: BooleanConstructor;
|
155
|
-
};
|
156
|
-
token: {
|
157
|
-
type: StringConstructor;
|
158
|
-
};
|
159
|
-
configs: {
|
160
|
-
type: import("vue").PropType<Record<string, string>>;
|
161
|
-
};
|
162
|
-
}, {
|
163
|
-
consultationRecordUrl: string;
|
164
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
165
|
-
content: {
|
166
|
-
type: StringConstructor;
|
167
|
-
default: string;
|
168
|
-
};
|
169
|
-
showBtn: {
|
170
|
-
type: BooleanConstructor;
|
171
|
-
};
|
172
|
-
token: {
|
173
|
-
type: StringConstructor;
|
174
|
-
};
|
175
|
-
configs: {
|
176
|
-
type: import("vue").PropType<Record<string, string>>;
|
177
|
-
};
|
178
|
-
}>> & {
|
179
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
180
|
-
onEdit?: ((...args: any[]) => any) | undefined;
|
181
|
-
onFail?: ((...args: any[]) => any) | undefined;
|
182
|
-
onEnd?: ((...args: any[]) => any) | undefined;
|
183
|
-
}>>;
|
184
|
-
emit: (event: "edit" | "close" | "end" | "fail", ...args: any[]) => void;
|
185
|
-
loading: import("vue").Ref<boolean>;
|
186
|
-
handleKeydown: (event: KeyboardEvent) => void;
|
187
|
-
close: () => void;
|
188
|
-
toEdit: () => Promise<void>;
|
189
|
-
NIcon: any;
|
190
|
-
NButton: any;
|
191
|
-
NSpin: any;
|
192
|
-
Mic: 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<{}>>, {}>;
|
193
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "close" | "end" | "fail")[], "edit" | "close" | "end" | "fail", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
194
|
-
content: {
|
195
|
-
type: StringConstructor;
|
196
|
-
default: string;
|
197
|
-
};
|
198
|
-
showBtn: {
|
199
|
-
type: BooleanConstructor;
|
200
|
-
};
|
201
|
-
token: {
|
202
|
-
type: StringConstructor;
|
203
|
-
};
|
204
|
-
configs: {
|
205
|
-
type: import("vue").PropType<Record<string, string>>;
|
206
|
-
};
|
207
|
-
}>> & {
|
208
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
209
|
-
onEdit?: ((...args: any[]) => any) | undefined;
|
210
|
-
onFail?: ((...args: any[]) => any) | undefined;
|
211
|
-
onEnd?: ((...args: any[]) => any) | undefined;
|
212
|
-
}, {
|
213
|
-
content: string;
|
214
|
-
showBtn: boolean;
|
215
|
-
}>;
|
216
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
217
|
-
content: {
|
218
|
-
type: StringConstructor;
|
219
|
-
default: string;
|
220
|
-
};
|
221
|
-
}>>, {
|
222
|
-
content: string;
|
223
|
-
}>;
|
224
|
-
CForm: import("vue").DefineComponent<{
|
225
|
-
configs: {
|
226
|
-
type: import("vue").PropType<Record<string, string>>;
|
227
|
-
};
|
228
|
-
data: {
|
229
|
-
type: import("vue").PropType<Record<string, string>>;
|
230
|
-
};
|
231
|
-
}, {
|
232
|
-
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
233
|
-
configs: {
|
234
|
-
type: import("vue").PropType<Record<string, string>>;
|
235
|
-
};
|
236
|
-
data: {
|
237
|
-
type: import("vue").PropType<Record<string, string>>;
|
238
|
-
};
|
239
|
-
}>> & {
|
240
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
241
|
-
onFinish?: ((...args: any[]) => any) | undefined;
|
242
|
-
}>>;
|
243
|
-
emit: (event: "close" | "finish", ...args: any[]) => void;
|
244
|
-
dynamicForm: {
|
245
|
-
list: {
|
246
|
-
label: string;
|
247
|
-
key: string;
|
248
|
-
value: string;
|
249
|
-
}[];
|
250
|
-
};
|
251
|
-
initForm: () => void;
|
252
|
-
handleClear: () => void;
|
253
|
-
onFinish: () => void;
|
254
|
-
NForm: any;
|
255
|
-
NFormItem: any;
|
256
|
-
NSpace: any;
|
257
|
-
NButton: any;
|
258
|
-
NInput: any;
|
259
|
-
NScrollbar: any;
|
260
|
-
NIcon: any;
|
261
|
-
Close: 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<{}>>, {}>;
|
262
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "finish")[], "close" | "finish", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
263
|
-
configs: {
|
264
|
-
type: import("vue").PropType<Record<string, string>>;
|
265
|
-
};
|
266
|
-
data: {
|
267
|
-
type: import("vue").PropType<Record<string, string>>;
|
268
|
-
};
|
269
|
-
}>> & {
|
270
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
271
|
-
onFinish?: ((...args: any[]) => any) | undefined;
|
272
|
-
}, {}>;
|
273
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "success" | "fail")[], "close" | "success" | "fail", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
274
|
-
timed: {
|
275
|
-
type: NumberConstructor;
|
276
|
-
default: number;
|
277
|
-
};
|
278
|
-
realTimeRecognition: {
|
279
|
-
type: BooleanConstructor;
|
280
|
-
};
|
281
|
-
allowPunctuationMark: {
|
282
|
-
type: BooleanConstructor;
|
283
|
-
default: boolean;
|
284
|
-
};
|
285
|
-
isGenerateMedicalRecord: {
|
286
|
-
type: BooleanConstructor;
|
287
|
-
};
|
288
|
-
token: {
|
289
|
-
type: StringConstructor;
|
290
|
-
};
|
291
|
-
medicalTemplateInfo: {
|
292
|
-
type: import("vue").PropType<Record<string, any>[]>;
|
293
|
-
};
|
294
|
-
}>> & {
|
295
|
-
onSuccess?: ((...args: any[]) => any) | undefined;
|
296
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
297
|
-
onFail?: ((...args: any[]) => any) | undefined;
|
298
|
-
}, {
|
299
|
-
timed: number;
|
300
|
-
realTimeRecognition: boolean;
|
301
|
-
allowPunctuationMark: boolean;
|
302
|
-
isGenerateMedicalRecord: boolean;
|
303
|
-
}>>;
|
304
|
-
export default AudioSdk;
|
1
|
+
import audioSDK from './src/audioSDK';
|
2
|
+
export { audioSDK as CAudioSDK };
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
export{default as CAudioSDK}from"./src/audioSDK.js";
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { ComponentInternalInstance } from 'vue';
|
1
2
|
import { AnyObject } from '../../../shared/types';
|
2
3
|
import 'recorder-core/src/engine/mp3';
|
3
4
|
import 'recorder-core/src/engine/mp3-engine';
|
@@ -8,28 +9,30 @@ export default class AudioSDK {
|
|
8
9
|
private webSocket;
|
9
10
|
private messageHandlerQueue;
|
10
11
|
private recorder;
|
12
|
+
private contentRef;
|
11
13
|
private realTimeSendStartTime;
|
12
14
|
private realTimeSendBytesChunks;
|
13
15
|
private realTimeSendClearPrevBufferIdx;
|
14
16
|
private timer;
|
15
17
|
private option;
|
16
18
|
private hasEventListener;
|
17
|
-
contentRef: import("vue").Ref<string>;
|
18
19
|
isReady: boolean;
|
19
20
|
constructor();
|
20
21
|
static create(): AudioSDK;
|
21
22
|
private initRecorder;
|
22
23
|
private onProcess;
|
23
24
|
private takeoffEncodeChunk;
|
24
|
-
private toSend;
|
25
25
|
run(handle: {
|
26
26
|
resolve: Function;
|
27
27
|
reject: Function;
|
28
|
-
}): void;
|
29
|
-
start(option?: AnyObject): Promise<unknown>;
|
30
|
-
|
28
|
+
}, instance?: ComponentInternalInstance): void;
|
29
|
+
start(instance?: ComponentInternalInstance, option?: AnyObject): Promise<unknown>;
|
30
|
+
pause(): void;
|
31
|
+
resume(): void;
|
32
|
+
stop(): void;
|
31
33
|
private handleError;
|
32
34
|
private handleMessage;
|
35
|
+
private handleKeydown;
|
33
36
|
private reset;
|
34
37
|
destroy(): void;
|
35
38
|
static destroy(): void;
|
@@ -1 +1 @@
|
|
1
|
-
import{ref as e}from"vue";import t from"recorder-core";import"recorder-core/src/engine/mp3";import"recorder-core/src/engine/mp3-engine";import{RecordingModal as s}from"./utils/recordingModal.js";
|
1
|
+
import{ref as e}from"vue";import t from"recorder-core";import"recorder-core/src/engine/mp3";import"recorder-core/src/engine/mp3-engine";import{RecordingModal as s}from"./utils/recordingModal.js";const i=class{constructor(){if(this.recordingModal=null,this.webSocket=null,this.messageHandlerQueue=[],this.recorder=null,this.contentRef=e(""),this.realTimeSendStartTime=0,this.realTimeSendBytesChunks=[],this.realTimeSendClearPrevBufferIdx=0,this.timer=null,this.option={},this.hasEventListener=!1,this.isReady=!1,i.instance)return i.instance;i.instance=this}static create(){return new i}initRecorder(){this.recorder=t({type:"mp3",sampleRate:16e3,bitRate:16,...this.option.realTimeRecognition&&this.option.recognizable?{onProcess:this.onProcess.bind(this),takeoffEncodeChunk:this.takeoffEncodeChunk.bind(this)}:{}})}async onProcess(e,t,s,i,r){0===this.realTimeSendStartTime&&(this.realTimeSendStartTime=Date.now(),this.realTimeSendBytesChunks=[],this.realTimeSendClearPrevBufferIdx=0);for(let t=this.realTimeSendClearPrevBufferIdx;t<r;t++)e[t]=null;this.realTimeSendClearPrevBufferIdx=r}async takeoffEncodeChunk(e){var t;e&&this.realTimeSendBytesChunks.push(e);const s=Date.now();if(s-this.realTimeSendStartTime<i.sendInterval)return;this.realTimeSendStartTime=s;let r=0;for(let e=0;e<this.realTimeSendBytesChunks.length;e++)r+=this.realTimeSendBytesChunks[e].length;const n=new Uint8Array(r);for(let e=0,t=0;e<this.realTimeSendBytesChunks.length;e++){const s=this.realTimeSendBytesChunks[e];n.set(s,t),t+=s.length}if(this.realTimeSendBytesChunks=[],n.length>0){const e=new Blob([n],{type:"audio/wav"});null==(t=this.webSocket)||t.send(e)}}run(e,t){this.recorder||this.initRecorder(),this.messageHandlerQueue.push(e),this.option.timed&&(this.timer=setTimeout((()=>{this.stop()}),1e3*this.option.timed)),this.recorder.open((()=>{var e;this.recorder.start(),null==(e=this.recordingModal)||e.show({instance:t,contentRef:this.contentRef,onClose:()=>this.stop()})}),((e,t)=>{this.handleError({msg:e,isUserNotAllow:t})}))}start(e,t){return Object.assign(this.option,{recognizable:!0,showModal:!0},t||{}),this.option.recognizable||(this.option.showModal=!1),new Promise(((t,i)=>{if(this.messageHandlerQueue.length>0)return void i({result:"fail",msg:"当前已存在正在录音的任务"});const{showModal:r}=this.option;if(r&&!this.recordingModal&&(this.recordingModal=new s),r&&!this.hasEventListener&&(document.addEventListener("keydown",this.handleKeydown),this.hasEventListener=!0),this.option.recognizable&&!this.webSocket)return this.webSocket=new WebSocket("wss://emr-tl.cnhis.com/audio/socket"),this.webSocket.onopen=()=>{this.isReady=!0,this.run({resolve:t,reject:i},e)},this.webSocket.onmessage=this.handleMessage.bind(this),this.webSocket.onerror=()=>console.log("WebSocket连接失败"),void(this.webSocket.binaryType="blob");const n=this;!async function s(r=0){if(r>5)return i({result:"fail",msg:"WebSocket连接失败"});n.option.recognizable&&!n.isReady?setTimeout((()=>{s(++r)}),100):n.run({resolve:t,reject:i},e)}()}))}pause(){var e;null==(e=this.recorder)||e.pause()}resume(){var e;null==(e=this.recorder)||e.resume()}stop(){var e,t;if(null==(e=this.recordingModal)||e.hide(),this.option.realTimeRecognition&&this.option.recognizable){const e=this.messageHandlerQueue.shift();if(!e)return;const{resolve:t,reject:s}=e;t({result:"success",data:{text:this.contentRef.value}}),this.reset()}else null==(t=this.recorder)||t.stop((async(e,t)=>{var s;if(this.option.recognizable)null==(s=this.webSocket)||s.send(e);else{const t=this.messageHandlerQueue.shift();if(!t)return;const{resolve:s,reject:i}=t;s({result:"success",data:e}),this.reset()}}),(e=>{this.handleError({msg:e})}),!0)}handleError(e){const t=this.messageHandlerQueue.shift();if(!t)return;const{resolve:s,reject:i}=t;i({result:"fail",...e}),this.reset()}handleMessage(e){const{data:t}=e||{};if(!function(e){try{return JSON.parse(e),!0}catch(e){return!1}}(t))return void this.handleError({msg:"接收数据不是一个有效SJON"});const s=JSON.parse(t);if("success"===s.msg)if(this.option.realTimeRecognition)this.contentRef.value+=s.data.text.replace(/[??,。,.\s]/g,"");else{const e=this.messageHandlerQueue.shift();if(!e)return;const{resolve:t,reject:i}=e;t({result:"success",data:s.data.text.replace(/[??,。,.\s]/g,"")}),this.reset()}else this.handleError({msg:s.msg})}handleKeydown(e){var t,s,r,n;if(" "===e.key||"Space"===e.code){if(!(null==(s=null==(t=i.instance)?void 0:t.recordingModal)?void 0:s.rendered)||0===(null==(r=i.instance)?void 0:r.messageHandlerQueue.length))return;e.preventDefault(),null==(n=i.instance)||n.stop()}}reset(){var e;null==(e=this.recorder)||e.close(),this.realTimeSendStartTime=0,this.contentRef.value="",this.timer&&(clearTimeout(this.timer),this.timer=null),this.option={realTimeRecognition:!1,allowPunctuationMark:!0,timed:5},this.messageHandlerQueue=[]}destroy(){this.webSocket&&(this.webSocket.close(),this.webSocket=null,this.isReady=!1),document.removeEventListener("keydown",this.handleKeydown),this.hasEventListener=!1,this.reset(),this.recorder=null}static destroy(){i.instance&&(i.instance.destroy(),i.instance=null)}};let r=i;r.sendInterval=1500;export{r as default};
|
@@ -1,70 +1,31 @@
|
|
1
|
-
import { PropType } from 'vue';
|
2
1
|
declare const _default: import("vue").DefineComponent<{
|
3
2
|
content: {
|
4
3
|
type: StringConstructor;
|
5
4
|
default: string;
|
6
5
|
};
|
7
|
-
showBtn: {
|
8
|
-
type: BooleanConstructor;
|
9
|
-
};
|
10
|
-
token: {
|
11
|
-
type: StringConstructor;
|
12
|
-
};
|
13
|
-
configs: {
|
14
|
-
type: PropType<Record<string, string>>;
|
15
|
-
};
|
16
6
|
}, {
|
17
|
-
|
7
|
+
cssVars: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
|
18
8
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
19
9
|
content: {
|
20
10
|
type: StringConstructor;
|
21
11
|
default: string;
|
22
12
|
};
|
23
|
-
showBtn: {
|
24
|
-
type: BooleanConstructor;
|
25
|
-
};
|
26
|
-
token: {
|
27
|
-
type: StringConstructor;
|
28
|
-
};
|
29
|
-
configs: {
|
30
|
-
type: PropType<Record<string, string>>;
|
31
|
-
};
|
32
13
|
}>> & {
|
33
14
|
onClose?: ((...args: any[]) => any) | undefined;
|
34
|
-
onEdit?: ((...args: any[]) => any) | undefined;
|
35
|
-
onFail?: ((...args: any[]) => any) | undefined;
|
36
|
-
onEnd?: ((...args: any[]) => any) | undefined;
|
37
15
|
}>>;
|
38
|
-
emit: (event: "
|
39
|
-
loading: import("vue").Ref<boolean>;
|
40
|
-
handleKeydown: (event: KeyboardEvent) => void;
|
16
|
+
emit: (event: "close", ...args: any[]) => void;
|
41
17
|
close: () => void;
|
42
|
-
|
18
|
+
NModal: any;
|
43
19
|
NIcon: any;
|
44
|
-
NButton: any;
|
45
|
-
NSpin: any;
|
46
20
|
Mic: 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<{}>>, {}>;
|
47
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
21
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
48
22
|
content: {
|
49
23
|
type: StringConstructor;
|
50
24
|
default: string;
|
51
25
|
};
|
52
|
-
showBtn: {
|
53
|
-
type: BooleanConstructor;
|
54
|
-
};
|
55
|
-
token: {
|
56
|
-
type: StringConstructor;
|
57
|
-
};
|
58
|
-
configs: {
|
59
|
-
type: PropType<Record<string, string>>;
|
60
|
-
};
|
61
26
|
}>> & {
|
62
27
|
onClose?: ((...args: any[]) => any) | undefined;
|
63
|
-
onEdit?: ((...args: any[]) => any) | undefined;
|
64
|
-
onFail?: ((...args: any[]) => any) | undefined;
|
65
|
-
onEnd?: ((...args: any[]) => any) | undefined;
|
66
28
|
}, {
|
67
29
|
content: string;
|
68
|
-
showBtn: boolean;
|
69
30
|
}>;
|
70
31
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{createElementVNode as
|
1
|
+
import{createElementVNode as o,defineComponent as e,openBlock as s,createBlock as t,unref as r,normalizeStyle as i,withCtx as n,toDisplayString as a,createVNode as c}from"vue";import{NModal as l,NIcon as p}from"naive-ui";import{Mic as m}from"@vicons/ionicons5";import{useTheme as d}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"lodash-es";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../shared/hooks/useScrollLoading.js";var u;const f={class:"c-recording-wrapper"},h={class:"content"},v=o("div",{class:"animation"},null,-1),g=o("p",{class:"tip"},(null==(u=window.getLanguageByCode)?void 0:u.call(window,"10010.1.141"))||"按下空格键停止录音",-1);var k=e({__name:"recording",props:{content:{type:String,default:""}},emits:["close"],setup(e,{emit:u}){const k=d();function w(){u("close")}return(d,u)=>(s(),t(r(l),{style:i(r(k))},{default:n((()=>[o("div",f,[o("p",h,a(e.content||"正在聆听..."),1),v,o("div",{class:"icon-box",onClick:w},[c(r(p),{size:"60",color:"#fff",component:r(m)},null,8,["component"])]),g])])),_:1},8,["style"]))}});export{k as default};
|
@@ -1,14 +1,11 @@
|
|
1
|
-
import { ComponentInternalInstance } from 'vue';
|
2
|
-
import { AnyObject } from '../../../../shared/types';
|
1
|
+
import { ComponentInternalInstance, Ref } from 'vue';
|
3
2
|
export declare class RecordingModal {
|
4
3
|
rendered: boolean;
|
5
4
|
target: HTMLElement | null;
|
6
|
-
|
7
|
-
|
8
|
-
instance?: ComponentInternalInstance;
|
5
|
+
show({ contentRef, onClose, instance }: {
|
6
|
+
contentRef: Ref<string>;
|
9
7
|
onClose: () => void;
|
10
|
-
|
11
|
-
props: AnyObject;
|
8
|
+
instance?: ComponentInternalInstance;
|
12
9
|
}): void;
|
13
10
|
hide(): void;
|
14
11
|
}
|
@@ -1 +1 @@
|
|
1
|
-
import{ref as e,render as t,createVNode as
|
1
|
+
import{ref as e,render as t,createVNode as n,withCtx as r,nextTick as o}from"vue";import{createProviderWrapper as s}from"../../../../shared/utils/index.js";import i from"../components/recording.vue.js";class l{constructor(){this.rendered=!1,this.target=null}show({contentRef:l,onClose:a,instance:d}){if(this.rendered)return;this.rendered=!0;const u=document.createElement("div"),h=e(!1),c=s(d);t(n(c,null,{default:r((()=>n(i,{to:u,content:l.value,show:h.value,"onUpdate:show":e=>h.value=e,onClose:()=>p(),onAfterLeave:()=>p()},null)),d)}),u);const m=this;var v;function p(){a()}v=u,document.body.appendChild(v),m.target=v,o((()=>h.value=!0))}hide(){var e;(null==(e=this.target)?void 0:e.parentElement)&&(this.rendered=!1,this.target.parentElement.removeChild(this.target),this.target=null)}}export{l as RecordingModal};
|
@@ -1 +1 @@
|
|
1
|
-
.c-recording-wrapper{align-items:center;background-color:#fff;border-radius:10px;display:flex;
|
1
|
+
.c-recording-wrapper{align-items:center;background-color:#fff;border-radius:10px;bottom:100px;display:flex;height:350px;justify-content:center;left:calc(50% - 250px);position:fixed;width:500px}@keyframes toScale{0%{transform:translateX(-50%) translateY(-50%) scale(1)}to{transform:translateX(-50%) translateY(-50%) scale(1.5)}}.c-recording-wrapper .content{font-size:18px;position:absolute;text-align:center;top:20px}.c-recording-wrapper .animation{animation:toScale 1s infinite;background-color:#5585f54d;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) scale(1);z-index:-1}.c-recording-wrapper .animation,.c-recording-wrapper .icon-box{align-items:center;border-radius:50%;display:flex;height:90px;justify-content:center;width:90px}.c-recording-wrapper .icon-box{background-color:#5585f5;cursor:pointer}.c-recording-wrapper .tip{bottom:20px;position:absolute}
|
@@ -206,7 +206,6 @@ export declare const CallbackMaps: Map<string, {
|
|
206
206
|
fixMemoLeak: {
|
207
207
|
type: BooleanConstructor;
|
208
208
|
};
|
209
|
-
lazyRender: BooleanConstructor;
|
210
209
|
}, {
|
211
210
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
212
211
|
fieldList: {
|
@@ -409,7 +408,6 @@ export declare const CallbackMaps: Map<string, {
|
|
409
408
|
fixMemoLeak: {
|
410
409
|
type: BooleanConstructor;
|
411
410
|
};
|
412
|
-
lazyRender: BooleanConstructor;
|
413
411
|
}>> & {
|
414
412
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
415
413
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -584,8 +582,6 @@ export declare const CallbackMaps: Map<string, {
|
|
584
582
|
linebarTextDirection: "horizontal" | "vertical";
|
585
583
|
autoWidth: number | boolean;
|
586
584
|
feedbackType: "default" | "tooltip";
|
587
|
-
fixMemoLeak: boolean;
|
588
|
-
lazyRender: boolean;
|
589
585
|
}>) => Record<string, import("@formily/json-schema").Stringify<{
|
590
586
|
[key: symbol]: any;
|
591
587
|
[key: `x-${string}`]: any;
|
@@ -972,7 +968,6 @@ export declare const CallbackMaps: Map<string, {
|
|
972
968
|
fixMemoLeak: {
|
973
969
|
type: BooleanConstructor;
|
974
970
|
};
|
975
|
-
lazyRender: BooleanConstructor;
|
976
971
|
}>> & {
|
977
972
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
978
973
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -1004,10 +999,9 @@ export declare const CallbackMaps: Map<string, {
|
|
1004
999
|
linebarTextDirection: "horizontal" | "vertical";
|
1005
1000
|
autoWidth: number | boolean;
|
1006
1001
|
feedbackType: "default" | "tooltip";
|
1007
|
-
fixMemoLeak: boolean;
|
1008
|
-
lazyRender: boolean;
|
1009
1002
|
operationalFormInit: boolean;
|
1010
1003
|
incrementalRender: boolean;
|
1004
|
+
fixMemoLeak: boolean;
|
1011
1005
|
}>;
|
1012
1006
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
1013
1007
|
props: {
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,useAttrs as t,ref as a,computed as l,onBeforeUnmount as n,watch as o,openBlock as r,createBlock as u,unref as s,isRef as d,createSlots as i,renderList as
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as a,computed as l,onBeforeUnmount as n,watch as o,openBlock as r,createBlock as u,unref as s,isRef as d,createSlots as i,renderList as p,withCtx as c,renderSlot as y,nextTick as f}from"vue";import{promiseTimeout as v}from"@vueuse/shared";import{NDatePicker as m}from"naive-ui";import"../../../shared/utils/index.js";import{useDateTime as h,handleInputEvent as D}from"../../../shared/hooks/useDateTime.js";import{isArray as g,isEqual as w,isString as b,isFunction as k,isNumber as V}from"lodash-es";import"@vue/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../shared/hooks/useScrollLoading.js";import{subYears as S,addYears as _,isWithinInterval as A,format as I,sub as M,startOfDay as R,endOfDay as C}from"date-fns";var $=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function},formattedValue:{type:[String,Array]},placeholder:{type:String},allowedInvalidValue:{type:String},to:{type:[Object,String,Boolean],default:"body"},holidays:{type:Array,default:()=>[]},type:{type:String,default:"date"},isDateDisabled:{type:Function}},emits:["update:formatted-value"],setup(e,{expose:$,emit:j}){const F=e,P=t(),U=a(null),q=a(null),x=a();let E="";const H=l({get:()=>W(F.formattedValue)?null:F.formattedValue,set(e){g(e)&&g(E)&&w(E,e)||E===e||(j("update:formatted-value",e,b(e)?Date.parse(e):g(e)?[Date.parse(e[0]),Date.parse(e[1])]:null),E=e)}}),L=l((()=>F.type.includes("datetime"))),B=l((()=>Reflect.get(P,"format")?P.format:L.value?"yyyy-MM-dd HH:mm:ss":"month"===F.type?"yyyy-MM":"year"===F.type?"yyyy":"yyyy-MM-dd")),Y=l((()=>L.value?B.value.split(" "):"")),O=l((()=>{const e=e=>{const t=new Date(e),a=new Date,l=S(a,150),n=_(a,150);return!A(t,{start:l,end:n})};return k(F.isDateDisabled)?(t,...a)=>{var l;return(null==(l=F.isDateDisabled)?void 0:l.call(F,t,...a))||e(t)}:e})),{focus:T,blur:z,handleConfirm:G}=h(U,{formatRef:B,attrs:{...P,type:F.type,isDateDisabled:O.value},emit:j,allowedInvalidValue:F.allowedInvalidValue});async function J(e){!async function(e){var t;if(!e||!F.holidays.length)return;await v(0);const a=null==(t=U.value)?void 0:t.panelInstRef;if(!a)return;const l=a.$el;if(!l)return;N(),"daterange"===F.type?K.push(n((()=>a.startDateArray),".n-date-panel-calendar--start .n-date-panel-dates>div"),n((()=>a.endDateArray),".n-date-panel-calendar--end .n-date-panel-dates>div")):"date"===F.type&&K.push(n((()=>a.dateArray),".n-date-panel-calendar .n-date-panel-dates>div"));function n(e,t){const a=[],n=o(e,(e=>{a.forEach((e=>e.classList.remove("c-date-picker__holiday"))),a.length=0,g(e)&&Array.from(l.querySelectorAll(t)).forEach(((t,l)=>{const{ts:n}=e[l]||{};if(!V(n))return;const o=new Date(n);F.holidays.some((e=>e.getDate()===o.getDate()&&e.getMonth()===o.getMonth()&&e.getFullYear()===o.getFullYear()))&&(f((()=>t.classList.add("c-date-picker__holiday"))),a.push(t))}))}),{immediate:!0,deep:!0});return()=>{n(),a.length=0}}}(e),e&&L.value&&(await f(),async function e(t=0){var a;t>2||(q.value=null==(a=U.value)?void 0:a.panelInstRef,q.value?h(q,{formatRef:Y,attrs:{...P,type:F.type,isDateDisabled:O.value},isPanel:!0}):(await f(),e(++t)))}())}const K=[];function N(){K.forEach((e=>e())),K.length=0}async function Q(...e){var t,a,l,n,o,r;const u=null==(n=null==(l=null==(a=null==(t=U.value)?void 0:t.inputInstRef)?void 0:a.$el)?void 0:l.querySelector)?void 0:n.call(l,"input");if(F.type.includes("range")?null==(o=F.onConfirm)||o.call(F,...e):(await f(),u.focus(),G(u),u.blur(),null==(r=F.onConfirm)||r.call(F,Date.parse(u.value),u.value)),!(null==u?void 0:u.value)||!F.updateUnchangedValue||F.type.includes("range"))return;const s=u.value;D(u,I(new Date,B.value)),D(u,s)}function W(e){return F.allowedInvalidValue&&F.allowedInvalidValue===e}return n(N),o((()=>F.formattedValue),(e=>{x.value=W(e)?e:F.placeholder?F.placeholder:"选择日期时间",W(e)||(E=e)}),{immediate:!0}),$({$datePicker:U,focus:T,blur:z,setShortcutValue:async function(e){if(!F.type||!F.type.includes("range")||!U.value)return;const t=U.value.$el.querySelectorAll(".n-input__input-el");let a,l;const n=new Date;if("week"===e){const e=M(n,{weeks:1});a=I(R(e),B.value)}else{const e=M(n,{months:1});a=I(R(e),B.value)}l=I(C(n),B.value),D(t[0],a),await f(),D(t[1],l)}}),(t,a)=>(r(),u(s(m),{ref_key:"datePickerRef",ref:U,"onUpdate:show":J,onConfirm:Q,placeholder:x.value,to:e.to,type:e.type,"formatted-value":s(H),"onUpdate:formatted-value":a[0]||(a[0]=e=>d(H)?H.value=e:null),"is-date-disabled":s(O)},i({_:2},[p(t.$slots,((e,a)=>({name:a,fn:c((()=>[y(t.$slots,a)]))})))]),1032,["placeholder","to","type","formatted-value","is-date-disabled"]))}});export{$ as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,shallowRef as
|
1
|
+
import{defineComponent as e,shallowRef as t,reactive as o,onBeforeUnmount as r,createVNode as i,mergeProps as l}from"vue";import"@wangeditor/editor/dist/css/style.css";import{Editor as d,Toolbar as s}from"@wangeditor/editor-for-vue";var a=e({name:"Editor",inheritAttrs:!1,components:{Editor:d,Toolbar:s},props:{editorConfig:{type:Object},toolbarConfig:{type:Object},uploadImgUrl:{type:String},isDisabled:{type:Boolean,default:!1}},emits:[],setup(e,{attrs:a,slots:n,emit:u}){const p=t(),c=o({MENU_CONF:{uploadImage:{server:e.uploadImgUrl||""}},...e.editorConfig});r((()=>{const e=p.value;null!=e&&e.destroy()}));const f=t=>{p.value=t,e.isDisabled&&t.disable(),console.log("实例",t)};return{editorRef:p,renderVN:()=>i("div",{class:"c-editor"},[i(s,{style:"border-bottom: 1px solid #ccc",editor:p.value,defaultConfig:e.toolbarConfig,mode:"default"},null),i(d,l({class:"c-editor__main",style:"height: 500px"},a,{defaultConfig:c,mode:"default",onOnCreated:f}),null)])}},render(){return this.renderVN()}});export{a as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
.c-editor{border:1px solid #ccc}.c-editor__main{height:500px;overflow-y:hidden}
|