cnhis-design-vue 3.3.3-release.9 → 3.4.0-beta.1
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/big-table/src/hooks/useBatchEditing.js +25 -24
- package/es/components/button-print/index.d.ts +98 -8
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +98 -8
- package/es/components/button-print/src/ButtonPrint.vue2.js +12 -1
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +11 -2
- package/es/components/button-print/src/components/IdentityVerification.vue2.js +3 -2
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +44 -6
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +194 -41
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +29 -2
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +34 -5
- package/es/components/button-print/src/utils/print.d.ts +7 -5
- package/es/components/button-print/src/utils/print.js +183 -7
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/calendar/src/Calendar.vue2.js +15 -5
- package/es/components/callback/src/components/render/popupMaps.d.ts +5 -0
- package/es/components/card-render/src/components/index.d.ts +23 -23
- package/es/components/classification/index.d.ts +258 -5
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +258 -5
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +258 -5
- package/es/components/classification/src/index.vue.d.ts +258 -5
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +6 -2
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +3 -2
- package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +58 -15
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +4 -3
- package/es/components/field-editor/index.d.ts +5 -0
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +5 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +4 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +4 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +4 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +2 -1
- package/es/components/field-set/src/components/table-row.vue2.js +21 -6
- package/es/components/field-set/src/constants/index.js +4 -4
- package/es/components/field-set/src/types/index.d.ts +2 -1
- package/es/components/form-config/index.d.ts +63 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +63 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +5 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +50 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +4 -4
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +5 -0
- package/es/components/form-config/src/constants/index.d.ts +31 -1
- package/es/components/form-config/src/constants/index.js +150 -1
- package/es/components/form-config/src/hooks/useConfigurationField.d.ts +2 -2
- package/es/components/form-config/src/hooks/useConfigurationField.js +53 -6
- package/es/components/form-config/src/hooks/useLocale.d.ts +6 -0
- package/es/components/form-config/src/hooks/useLocale.js +34 -0
- package/es/components/form-config/src/types/index.d.ts +12 -0
- package/es/components/form-render/index.d.ts +5 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +5 -0
- package/es/components/form-render/src/FormRender.vue2.js +1 -0
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +5 -0
- package/es/components/form-render/src/components/renderer/date.d.ts +3 -1
- package/es/components/form-render/src/components/renderer/date.js +12 -10
- package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/formItem.js +10 -3
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +4 -2
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +9 -3
- package/es/components/form-render/src/constants/index.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +5 -2
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFieldNormalize.js +15 -0
- package/es/components/form-render/src/hooks/useNuiThemeOverrides.d.ts +1 -2
- package/es/components/form-render/src/types/index.d.ts +1 -0
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-chat/index.d.ts +897 -97
- package/es/components/iho-chat/src/Index.vue.d.ts +897 -97
- package/es/components/iho-chat/src/Index.vue2.js +14 -6
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +179 -6
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +48 -28
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +61 -5
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +106 -44
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +327 -13
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +18 -17
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +232 -17
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +299 -272
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +49 -3
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +48 -2
- package/es/components/iho-chat/src/components/ContextMenu.js +33 -18
- package/es/components/iho-chat/src/components/ImageLightbox.vue.d.ts +104 -0
- package/es/components/iho-chat/src/components/ImageLightbox.vue.js +6 -0
- package/es/components/iho-chat/src/components/ImageLightbox.vue2.js +307 -0
- package/es/components/iho-chat/src/components/MessageEvent.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +51 -4
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +77 -31
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +223 -98
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/SelectLabel.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +24 -1
- package/es/components/iho-chat/src/components/Video.vue.d.ts +44 -26
- package/es/components/iho-chat/src/components/Video.vue2.js +56 -49
- package/es/components/iho-chat/src/hooks/useData.d.ts +51 -4
- package/es/components/iho-chat/src/hooks/useVideo.d.ts +83 -16
- package/es/components/iho-chat/src/hooks/useVideo.js +439 -43
- package/es/components/iho-chat/src/types/index.d.ts +37 -1
- package/es/components/iho-chat/src/utils/emoji.d.ts +1 -1
- package/es/components/iho-chat/src/utils/emoji.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +2 -0
- package/es/components/iho-chat/src/utils/index.js +14 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +0 -22
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.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/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +36 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -0
- package/es/components/index.js +2 -1
- package/es/components/info-header/index.d.ts +24 -17
- package/es/components/info-header/src/InfoHeader.vue.d.ts +24 -17
- package/es/components/info-header/src/InfoHeader.vue2.js +2 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +56 -22
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +4 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue2.js +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +15 -17
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +5 -0
- package/es/components/info-header/src/constants/index.d.ts +1 -1
- package/es/components/info-header/src/hooks/useThemeOverrides.d.ts +1 -2
- package/es/components/keyboard/index.d.ts +9 -0
- package/es/components/keyboard/src/Keyboard.vue.d.ts +9 -0
- package/es/components/keyboard/src/Keyboard.vue2.js +33 -9
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +4 -0
- package/es/components/keyboard/src/components/NumberPanel.vue2.js +50 -17
- package/es/components/keyboard/src/types.d.ts +17 -0
- package/es/components/keyboard/src/types.js +1 -0
- package/es/components/scale-view/index.d.ts +13 -0
- package/es/components/scale-view/src/ScaleView.vue.d.ts +13 -0
- package/es/components/scale-view/src/hooks/scaleview-computed.js +2 -1
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +4 -0
- package/es/components/search-cascader/src/utils/index.d.ts +1 -1
- package/es/components/select-person/src/SelectPerson.vue2.js +8 -1
- package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -1
- package/es/components/shortcut-provider/src/types/index.d.ts +1 -0
- package/es/components/shortcut-provider/src/utils/index.d.ts +1 -1
- package/es/components/shortcut-provider/src/utils/index.js +3 -1
- package/es/components/shortcut-setter/index.d.ts +5 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +5 -0
- package/es/components/table-filter/index.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +246 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +8 -2
- package/es/components/table-filter/src/components/classify-filter/components/Base/DateOption.vue.d.ts +104 -0
- package/es/components/table-filter/src/components/classify-filter/components/Base/DateOption.vue.js +6 -0
- package/es/components/table-filter/src/components/classify-filter/components/Base/DateOption.vue2.js +250 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +116 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +43 -4
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +117 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +45 -8
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +233 -1
- package/es/components/table-filter/src/components/classify-filter/helpers/options.d.ts +5 -1
- package/es/components/table-filter/src/components/classify-filter/helpers/options.js +74 -2
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +258 -5
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +15 -6
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -3
- package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +32 -4
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +1 -0
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +38 -2
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +3 -3
- package/es/components/table-filter/src/hooks/useAdvanced.js +5 -4
- package/es/components/table-filter/src/tool/baseOptions.js +8 -1
- package/es/components/table-filter/src/types/enums.d.ts +5 -0
- package/es/components/table-filter/src/types/enums.js +6 -1
- package/es/components/time-picker/index.d.ts +36 -4
- package/es/components/time-picker/src/TimePicker.vue.d.ts +36 -4
- package/es/components/time-picker/src/TimePicker.vue2.js +98 -13
- package/es/components/vertify/index.d.ts +1 -0
- package/es/components/vertify/index.js +1 -0
- package/es/components/vertify/src/components/IdentityVerification.vue.d.ts +89 -0
- package/es/components/vertify/src/components/IdentityVerification.vue.js +6 -0
- package/es/components/vertify/src/components/IdentityVerification.vue2.js +256 -0
- package/es/components/vertify/src/utils/dialog.d.ts +7 -0
- package/es/components/vertify/src/utils/dialog.js +73 -0
- package/es/components/vertify/src/utils/index.d.ts +11 -0
- package/es/components/vertify/src/utils/index.js +24 -0
- package/es/components/vod-chunk-upload/index.d.ts +13 -0
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.d.ts +19 -2
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +104 -75
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.d.ts +1 -0
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +20 -3
- package/es/components/vod-chunk-upload/src/hooks/upload-data.d.ts +4 -0
- package/es/components/vod-chunk-upload/src/hooks/upload-data.js +6 -2
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +13 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +6 -1
- package/es/components/vod-chunk-upload/style/index.css +1 -1
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
- package/es/shared/hooks/useDateTime.d.ts +1 -1
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/hooks/useLevelSearchCascader.js +3 -3
- package/es/shared/package.json.js +2 -2
- package/es/shared/utils/fabricjs/index.js +1 -1
- package/package.json +5 -5
- package/es/components/audio-sdk/src/utils/recorder/fft.d.ts +0 -4
- package/es/components/audio-sdk/src/utils/recorder/mp3-engine.d.ts +0 -4
- package/es/components/audio-sdk/src/utils/recorder/mp3.d.ts +0 -4
- package/es/components/audio-sdk/src/utils/recorder/recorder.d.ts +0 -4
- package/es/components/audio-sdk/src/utils/recorder/wave.d.ts +0 -4
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1,4 +1,4 @@
|
|
1
|
-
import { createElementVNode, defineComponent, ref, computed, onMounted, watch, withDirectives, openBlock, createElementBlock, normalizeStyle, unref, createVNode, withCtx, Fragment, toDisplayString, createCommentVNode, renderList, createBlock, createTextVNode, mergeProps, renderSlot, vShow } from 'vue';
|
1
|
+
import { createElementVNode, defineComponent, ref, computed, onMounted, onBeforeUnmount, watch, withDirectives, openBlock, createElementBlock, normalizeStyle, unref, createVNode, withCtx, Fragment, toDisplayString, createCommentVNode, renderList, createBlock, createTextVNode, mergeProps, renderSlot, vShow } from 'vue';
|
2
2
|
import { NButton, NIcon, NTooltip, NPopover, NUpload, NUploadTrigger } from 'naive-ui';
|
3
3
|
import ChatAdd from './ChatAdd.vue.js';
|
4
4
|
import { useData } from '../hooks/useData.js';
|
@@ -6,11 +6,12 @@ import 'stompjs';
|
|
6
6
|
import 'sockjs-client/dist/sockjs.min.js';
|
7
7
|
import { MESSAGE_TYPE, AV_STATUS } from '../constants/index.js';
|
8
8
|
import { uploadFileApi } from '../api/index.js';
|
9
|
-
import { simplifyMessage, base64ToFile } from '../utils/index.js';
|
9
|
+
import { simplifyMessage, base64ToFile, removeImgBySrc, ensureLeadingSlashIfRelative } from '../utils/index.js';
|
10
10
|
import { xor, uniq, isObject, trim, cloneDeep } from 'lodash-es';
|
11
11
|
import 'trtc-sdk-v5';
|
12
12
|
import { emojis } from '../utils/emoji.js';
|
13
|
-
import { CloseOutline, CloseCircleOutline, CallOutline, VideocamOutline } from '@vicons/ionicons5';
|
13
|
+
import { CloseOutline, CloseCircleOutline, HappyOutline, ImageOutline, FolderOutline, CallOutline, VideocamOutline } from '@vicons/ionicons5';
|
14
|
+
import { ThumbsUp } from '@vicons/carbon';
|
14
15
|
import { uuidGenerator } from '../../../../shared/utils/index.js';
|
15
16
|
import { useStorage } from '@vueuse/core';
|
16
17
|
|
@@ -43,10 +44,7 @@ const _hoisted_10 = ["innerHTML"];
|
|
43
44
|
const _hoisted_11 = {
|
44
45
|
class: "tool-box"
|
45
46
|
};
|
46
|
-
const _hoisted_12 = /* @__PURE__ */ createElementVNode("
|
47
|
-
class: "chat--iconfont chat--icon-face"
|
48
|
-
}, null, -1);
|
49
|
-
const _hoisted_13 = /* @__PURE__ */ createElementVNode("span", null, function() {
|
47
|
+
const _hoisted_12 = /* @__PURE__ */ createElementVNode("span", null, function() {
|
50
48
|
var _a, _b, _c;
|
51
49
|
try {
|
52
50
|
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.51")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.51")) || "\u6700\u8FD1\u4F7F\u7528";
|
@@ -54,14 +52,14 @@ const _hoisted_13 = /* @__PURE__ */ createElementVNode("span", null, function()
|
|
54
52
|
return "\u6700\u8FD1\u4F7F\u7528";
|
55
53
|
}
|
56
54
|
}(), -1);
|
57
|
-
const
|
55
|
+
const _hoisted_13 = {
|
58
56
|
class: "list-box",
|
59
57
|
style: {
|
60
58
|
"margin-bottom": "8px"
|
61
59
|
}
|
62
60
|
};
|
63
|
-
const
|
64
|
-
const
|
61
|
+
const _hoisted_14 = ["src"];
|
62
|
+
const _hoisted_15 = /* @__PURE__ */ createElementVNode("span", null, function() {
|
65
63
|
var _a, _b, _c;
|
66
64
|
try {
|
67
65
|
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.52")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.52")) || "\u9ED8\u8BA4\u8868\u60C5";
|
@@ -69,24 +67,15 @@ const _hoisted_16 = /* @__PURE__ */ createElementVNode("span", null, function()
|
|
69
67
|
return "\u9ED8\u8BA4\u8868\u60C5";
|
70
68
|
}
|
71
69
|
}(), -1);
|
72
|
-
const
|
70
|
+
const _hoisted_16 = {
|
73
71
|
class: "list-box"
|
74
72
|
};
|
75
|
-
const
|
76
|
-
const
|
77
|
-
|
78
|
-
}, null, -1);
|
79
|
-
const _hoisted_20 = /* @__PURE__ */ createElementVNode("i", {
|
80
|
-
class: "chat--iconfont chat--icon-image"
|
81
|
-
}, null, -1);
|
82
|
-
const _hoisted_21 = /* @__PURE__ */ createElementVNode("i", {
|
83
|
-
class: "chat--iconfont chat--icon-folder"
|
84
|
-
}, null, -1);
|
85
|
-
const _hoisted_22 = ["contenteditable"];
|
86
|
-
const _hoisted_23 = {
|
73
|
+
const _hoisted_17 = ["src"];
|
74
|
+
const _hoisted_18 = ["contenteditable"];
|
75
|
+
const _hoisted_19 = {
|
87
76
|
class: "btn-box"
|
88
77
|
};
|
89
|
-
const
|
78
|
+
const _hoisted_20 = /* @__PURE__ */ createElementVNode("span", {
|
90
79
|
class: "tip"
|
91
80
|
}, "Enter \u53D1\u9001, Ctrl + Enter \u6362\u884C", -1);
|
92
81
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
@@ -179,10 +168,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
179
168
|
}
|
180
169
|
}
|
181
170
|
async function doUpdateFile(file) {
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
171
|
+
try {
|
172
|
+
const formData = new FormData();
|
173
|
+
formData.append("sender", state.userInfo.id);
|
174
|
+
formData.append("file", file);
|
175
|
+
const data = await uploadFileApi(formData);
|
176
|
+
if (data == null ? void 0 : data.fileUrl) {
|
177
|
+
data.fileUrl = ensureLeadingSlashIfRelative(data.fileUrl);
|
178
|
+
}
|
179
|
+
return data;
|
180
|
+
} catch (error) {
|
181
|
+
return "";
|
182
|
+
}
|
186
183
|
}
|
187
184
|
async function fileChange(options, chatMessageType) {
|
188
185
|
const {
|
@@ -231,13 +228,26 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
231
228
|
} else {
|
232
229
|
chatMessageType = MESSAGE_TYPE.IMAGE;
|
233
230
|
const match = innerHTML.match(/src\s*=\s*"([^"]*)"/);
|
234
|
-
if (match) {
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
231
|
+
if (match == null ? void 0 : match.length) {
|
232
|
+
if (match[1].startsWith("data:")) {
|
233
|
+
const file = await base64ToFile(match[1]);
|
234
|
+
if (file) {
|
235
|
+
const data = await doUpdateFile(file);
|
236
|
+
if (data) {
|
237
|
+
msg = isObject(data) ? JSON.stringify(data) : data;
|
238
|
+
}
|
240
239
|
}
|
240
|
+
} else {
|
241
|
+
const filenameMatch = innerHTML.match(/data-filename\s*=\s*"([^"]*)"/);
|
242
|
+
const fileName = filenameMatch ? filenameMatch[1] : "";
|
243
|
+
const filesizeMatch = innerHTML.match(/data-filesize\s*=\s*"([^"]*)"/);
|
244
|
+
const fileSize = filesizeMatch ? filesizeMatch[1] : "";
|
245
|
+
const fileUrl = match[1];
|
246
|
+
msg = JSON.stringify({
|
247
|
+
fileUrl,
|
248
|
+
fileName,
|
249
|
+
fileSize
|
250
|
+
});
|
241
251
|
}
|
242
252
|
}
|
243
253
|
}
|
@@ -257,7 +267,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
257
267
|
const file = await base64ToFile(srcMatch[1]);
|
258
268
|
if (file) {
|
259
269
|
const data = await doUpdateFile(file);
|
260
|
-
|
270
|
+
if (!(data == null ? void 0 : data.fileUrl)) {
|
271
|
+
console.log("\u4E0A\u4F20\u56FE\u7247\u5931\u8D25 ==>");
|
272
|
+
msg = removeImgBySrc(msg, srcMatch[1]);
|
273
|
+
continue;
|
274
|
+
}
|
275
|
+
const newImgTag = msgList[i].replace(srcMatch[1], data.fileUrl).replace(/<img/, `<img data-clicked='1' data-msg='${JSON.stringify(data)}'`);
|
276
|
+
msg = msg.replace(msgList[i], newImgTag);
|
261
277
|
}
|
262
278
|
}
|
263
279
|
}
|
@@ -345,9 +361,43 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
345
361
|
});
|
346
362
|
state.isForward = false;
|
347
363
|
}
|
364
|
+
function handleFilePaste(event) {
|
365
|
+
var _a;
|
366
|
+
const files = ((_a = event.clipboardData) == null ? void 0 : _a.files) ? Array.from(event.clipboardData.files) : [];
|
367
|
+
if (files.length === 1 && files[0].type.startsWith("image/")) {
|
368
|
+
const file = files[0];
|
369
|
+
if (file.type.startsWith("image/")) {
|
370
|
+
const reader = new FileReader();
|
371
|
+
reader.onload = function(e) {
|
372
|
+
var _a2;
|
373
|
+
if (!((_a2 = e.target) == null ? void 0 : _a2.result))
|
374
|
+
return;
|
375
|
+
document.execCommand("insertHTML", false, `<img src=${e.target.result} />`);
|
376
|
+
};
|
377
|
+
reader.readAsDataURL(file);
|
378
|
+
}
|
379
|
+
} else {
|
380
|
+
for (let i = 0, len = files.length; i < len; i++) {
|
381
|
+
const file = files[i];
|
382
|
+
const type = file.type.startsWith("image/") ? MESSAGE_TYPE.IMAGE : MESSAGE_TYPE.FILE;
|
383
|
+
fileChange({
|
384
|
+
file: {
|
385
|
+
file,
|
386
|
+
name: file.name
|
387
|
+
}
|
388
|
+
}, type);
|
389
|
+
}
|
390
|
+
}
|
391
|
+
}
|
348
392
|
onMounted(() => {
|
349
393
|
if (inputRef.value) {
|
350
394
|
inputRef.value.innerHTML = SPACE_PLACEHOLDER;
|
395
|
+
document.addEventListener("paste", handleFilePaste);
|
396
|
+
}
|
397
|
+
});
|
398
|
+
onBeforeUnmount(() => {
|
399
|
+
if (inputRef.value) {
|
400
|
+
document.removeEventListener("paste", handleFilePaste);
|
351
401
|
}
|
352
402
|
});
|
353
403
|
watch(() => [state.currentReferenceMsg, state.currentReEditMsg], ([currentReferenceMsg, currentReEditMsg]) => {
|
@@ -455,12 +505,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
455
505
|
quaternary: "",
|
456
506
|
size: "tiny"
|
457
507
|
}, {
|
458
|
-
icon: withCtx(() => [
|
508
|
+
icon: withCtx(() => [createVNode(unref(NIcon), {
|
509
|
+
size: "18",
|
510
|
+
component: unref(HappyOutline)
|
511
|
+
}, null, 8, ["component"])]),
|
459
512
|
_: 1
|
460
513
|
})]),
|
461
514
|
default: withCtx(() => [unref(commonEmoticons).length > 0 ? (openBlock(), createElementBlock(Fragment, {
|
462
515
|
key: 0
|
463
|
-
}, [
|
516
|
+
}, [_hoisted_12, createElementVNode("div", _hoisted_13, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(commonEmoticons), (name) => {
|
464
517
|
return openBlock(), createBlock(unref(NTooltip), {
|
465
518
|
key: name,
|
466
519
|
"show-arrow": false
|
@@ -472,13 +525,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
472
525
|
}, {
|
473
526
|
icon: withCtx(() => [createElementVNode("img", {
|
474
527
|
src: unref(emojis).findEmoji(name)
|
475
|
-
}, null, 8,
|
528
|
+
}, null, 8, _hoisted_14)]),
|
476
529
|
_: 2
|
477
530
|
}, 1032, ["onClick"])]),
|
478
531
|
default: withCtx(() => [createTextVNode(" " + toDisplayString(name), 1)]),
|
479
532
|
_: 2
|
480
533
|
}, 1024);
|
481
|
-
}), 128))])], 64)) : createCommentVNode("v-if", true),
|
534
|
+
}), 128))])], 64)) : createCommentVNode("v-if", true), _hoisted_15, createElementVNode("div", _hoisted_16, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(emojis).default, ([name, emoji]) => {
|
482
535
|
return openBlock(), createBlock(unref(NTooltip), {
|
483
536
|
key: name,
|
484
537
|
"show-arrow": false
|
@@ -490,7 +543,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
490
543
|
}, {
|
491
544
|
icon: withCtx(() => [createElementVNode("img", {
|
492
545
|
src: emoji
|
493
|
-
}, null, 8,
|
546
|
+
}, null, 8, _hoisted_17)]),
|
494
547
|
_: 2
|
495
548
|
}, 1032, ["onClick"])]),
|
496
549
|
default: withCtx(() => [createTextVNode(" " + toDisplayString(name), 1)]),
|
@@ -519,7 +572,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
519
572
|
msg: 0
|
520
573
|
}))
|
521
574
|
}, {
|
522
|
-
icon: withCtx(() => [
|
575
|
+
icon: withCtx(() => [createVNode(unref(NIcon), {
|
576
|
+
size: "18",
|
577
|
+
component: unref(ThumbsUp)
|
578
|
+
}, null, 8, ["component"])]),
|
523
579
|
_: 1
|
524
580
|
})]),
|
525
581
|
default: withCtx(() => [createTextVNode(function() {
|
@@ -550,7 +606,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
550
606
|
size: "tiny",
|
551
607
|
onClick: handleClick
|
552
608
|
}, {
|
553
|
-
icon: withCtx(() => [
|
609
|
+
icon: withCtx(() => [createVNode(unref(NIcon), {
|
610
|
+
size: "18",
|
611
|
+
component: unref(ImageOutline)
|
612
|
+
}, null, 8, ["component"])]),
|
554
613
|
_: 2
|
555
614
|
}, 1032, ["onClick"])]),
|
556
615
|
default: withCtx(() => [createTextVNode(function() {
|
@@ -585,7 +644,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
585
644
|
size: "tiny",
|
586
645
|
onClick: handleClick
|
587
646
|
}, {
|
588
|
-
icon: withCtx(() => [
|
647
|
+
icon: withCtx(() => [createVNode(unref(NIcon), {
|
648
|
+
size: "18",
|
649
|
+
component: unref(FolderOutline)
|
650
|
+
}, null, 8, ["component"])]),
|
589
651
|
_: 2
|
590
652
|
}, 1032, ["onClick"])]),
|
591
653
|
default: withCtx(() => [createTextVNode(function() {
|
@@ -718,7 +780,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
718
780
|
contenteditable: !unref(isEnded),
|
719
781
|
onKeydown: handleKeyDown,
|
720
782
|
onInput: handleInput
|
721
|
-
}, null, 40,
|
783
|
+
}, null, 40, _hoisted_18), [[vShow, unref(state).id]]), createElementVNode("div", _hoisted_19, [_hoisted_20, createVNode(unref(NButton), {
|
722
784
|
type: "primary",
|
723
785
|
round: "",
|
724
786
|
disabled: unref(sendBtnDisabled),
|