bhd-components 0.10.30 → 0.10.32
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 +24 -24
- package/dist/index.esm.es5.development.css +1632 -1407
- package/dist/index.esm.es5.development.js +547 -266
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/dist/vendor.esm.es5.development.js +222 -210
- package/dist/vendor.esm.es5.production.js +156 -156
- package/es2017/AIMessageList/components/content/index.d.ts +4 -4
- package/es2017/AIMessageList/components/content/index.module.less +7 -7
- package/es2017/AIMessageList/components/copyIcon/index.d.ts +7 -7
- package/es2017/AIMessageList/components/copyIcon/index.module.less +23 -23
- package/es2017/AIMessageList/components/errorCallback/index.d.ts +3 -3
- package/es2017/AIMessageList/components/fileList/fileIcon.d.ts +3 -3
- package/es2017/AIMessageList/components/fileList/index.d.ts +4 -4
- package/es2017/AIMessageList/components/fileList/index.module.less +95 -95
- package/es2017/AIMessageList/components/footer/index.d.ts +10 -10
- package/es2017/AIMessageList/components/footer/index.module.less +51 -51
- package/es2017/AIMessageList/components/header/index.d.ts +9 -9
- package/es2017/AIMessageList/components/header/index.module.less +31 -31
- package/es2017/AIMessageList/components/referencesIcon/index.d.ts +9 -9
- package/es2017/AIMessageList/components/referencesIcon/index.module.less +14 -14
- package/es2017/AIMessageList/components/refreshBtn/index.d.ts +4 -4
- package/es2017/AIMessageList/components/refreshBtn/index.module.less +12 -12
- package/es2017/AIMessageList/components/remarkBtn/index.d.ts +4 -4
- package/es2017/AIMessageList/components/remarkBtn/index.module.less +13 -13
- package/es2017/AIMessageList/components/renderReferrnce/index.d.ts +10 -10
- package/es2017/AIMessageList/components/renderReferrnce/index.module.less +63 -63
- package/es2017/AIMessageList/components/sendBtn/index.d.ts +4 -4
- package/es2017/AIMessageList/components/sendBtn/index.module.less +25 -25
- package/es2017/AIMessageList/components/uplodaFileBtn/index.d.ts +4 -4
- package/es2017/AIMessageList/components/uplodaFileBtn/index.module.less +4 -4
- package/es2017/AIMessageList/components/virtuosoList/index.d.ts +5 -5
- package/es2017/AIMessageList/components/virtuosoList/index.js +40 -41
- package/es2017/AIMessageList/components/virtuosoList/index.module.less +471 -471
- package/es2017/AIMessageList/index.d.ts +4 -4
- package/es2017/AIMessageList/index.module.less +20 -20
- package/es2017/AIMessageList/type.d.ts +310 -310
- package/es2017/bhdAppLayout/components/BhdTableSimple/index.js +9 -9
- package/es2017/bhdAppLayout/components/BhdTableSimple/index.less +58 -58
- package/es2017/bhdAppLayout/components/BhdTableSimple/index/347/232/204/345/211/257/346/234/254.js +9 -9
- package/es2017/bhdAppLayout/index.d.ts +28 -28
- package/es2017/bhdAppLayout/index.module.less +95 -95
- package/es2017/bhdDatePicker/index.d.ts +17 -17
- package/es2017/bhdDatePicker/index.js +1 -1
- package/es2017/bhdDatePicker/index.module.less +1007 -1007
- package/es2017/bhdEditor/index.d.ts +2 -2
- package/es2017/bhdEnterInput/index.d.ts +9 -9
- package/es2017/bhdModalCropper/index.d.ts +10 -10
- package/es2017/bhdModalCropper/index.module.less +362 -362
- package/es2017/bhdSelect/index.d.ts +33 -33
- package/es2017/bhdSelect/index.module.less +131 -131
- package/es2017/bhdTipModal/index.d.ts +29 -29
- package/es2017/bhdTipModal/index.module.less +280 -280
- package/es2017/bhdTipModal/modal.d.ts +6 -6
- package/es2017/customerService/common.module.less +1391 -1391
- package/es2017/customerService/contactsList.d.ts +14 -14
- package/es2017/customerService/function.d.ts +24 -24
- package/es2017/customerService/historyFun.d.ts +13 -13
- package/es2017/customerService/html2canvas.test.js +113 -113
- package/es2017/customerService/index.d.ts +20 -20
- package/es2017/customerService/index.js +305 -87
- package/es2017/customerService/index.module.less +2279 -2166
- package/es2017/customerService/index2.module.less +2216 -2143
- package/es2017/customerService/js-screen-shot/assets/less/screen-shot.less +478 -478
- package/es2017/customerService/js-screen-shot/lib/common-methods/CanvasPatch.d.ts +1 -1
- package/es2017/customerService/js-screen-shot/lib/common-methods/DeviceTypeVerif.d.ts +2 -2
- package/es2017/customerService/js-screen-shot/lib/common-methods/FixedData.d.ts +11 -11
- package/es2017/customerService/js-screen-shot/lib/common-methods/FixedData.js +7 -7
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetBrushSelectedName.d.ts +5 -5
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetBrushSelectedName.js +3 -3
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetCanvasImgData.d.ts +4 -4
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetCanvasImgData.js +2 -2
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetColor.d.ts +1 -1
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetSelectedCalssName.d.ts +1 -1
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetToolRelativePosition.d.ts +7 -7
- package/es2017/customerService/js-screen-shot/lib/common-methods/GetToolRelativePosition.js +2 -2
- package/es2017/customerService/js-screen-shot/lib/common-methods/ImgScaling.d.ts +11 -11
- package/es2017/customerService/js-screen-shot/lib/common-methods/ImgScaling.js +6 -6
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveBorderArrInfo.d.ts +8 -8
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveBorderArrInfo.js +5 -5
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveCanvasToBase64.d.ts +1 -1
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveCanvasToBase64.js +2 -2
- package/es2017/customerService/js-screen-shot/lib/common-methods/SaveCanvasToImage.d.ts +1 -1
- package/es2017/customerService/js-screen-shot/lib/common-methods/SelectColor.d.ts +1 -1
- package/es2017/customerService/js-screen-shot/lib/common-methods/SelectTextSize.d.ts +5 -5
- package/es2017/customerService/js-screen-shot/lib/common-methods/SetBrushSize.d.ts +14 -14
- package/es2017/customerService/js-screen-shot/lib/common-methods/SetBrushSize.js +10 -10
- package/es2017/customerService/js-screen-shot/lib/common-methods/SetSelectedClassName.d.ts +7 -7
- package/es2017/customerService/js-screen-shot/lib/common-methods/SetSelectedClassName.js +5 -5
- package/es2017/customerService/js-screen-shot/lib/common-methods/TakeOutHistory.d.ts +1 -1
- package/es2017/customerService/js-screen-shot/lib/common-methods/TakeOutHistory.js +2 -2
- package/es2017/customerService/js-screen-shot/lib/common-methods/UpdateContainerMouseStyle.d.ts +1 -1
- package/es2017/customerService/js-screen-shot/lib/common-methods/ZoomCutOutBoxPosition.d.ts +17 -17
- package/es2017/customerService/js-screen-shot/lib/common-methods/ZoomCutOutBoxPosition.js +10 -10
- package/es2017/customerService/js-screen-shot/lib/config/Toolbar.d.ts +5 -5
- package/es2017/customerService/js-screen-shot/lib/main-entrance/CreateDom.d.ts +24 -24
- package/es2017/customerService/js-screen-shot/lib/main-entrance/InitData.d.ts +78 -78
- package/es2017/customerService/js-screen-shot/lib/main-entrance/PlugInParameters.d.ts +46 -46
- package/es2017/customerService/js-screen-shot/lib/split-methods/AddHistoryData.d.ts +1 -1
- package/es2017/customerService/js-screen-shot/lib/split-methods/BoundaryJudgment.d.ts +8 -8
- package/es2017/customerService/js-screen-shot/lib/split-methods/BoundaryJudgment.js +5 -5
- package/es2017/customerService/js-screen-shot/lib/split-methods/CalculateOptionIcoPosition.d.ts +5 -5
- package/es2017/customerService/js-screen-shot/lib/split-methods/CalculateOptionIcoPosition.js +3 -3
- package/es2017/customerService/js-screen-shot/lib/split-methods/CalculateToolLocation.d.ts +16 -16
- package/es2017/customerService/js-screen-shot/lib/split-methods/CalculateToolLocation.js +7 -7
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawArrow.d.ts +31 -31
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawArrow.js +14 -14
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawCircle.d.ts +11 -11
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawCircle.js +9 -9
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawCutOutBox.d.ts +19 -19
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawCutOutBox.js +12 -12
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawLineArrow.d.ts +13 -13
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawLineArrow.js +18 -18
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawMasking.d.ts +6 -6
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawMasking.js +4 -4
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawMosaic.d.ts +12 -12
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawMosaic.js +21 -21
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawPencil.d.ts +13 -13
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawPencil.js +9 -9
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawRectangle.d.ts +11 -11
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawRectangle.js +9 -9
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawText.d.ts +10 -10
- package/es2017/customerService/js-screen-shot/lib/split-methods/DrawText.js +8 -8
- package/es2017/customerService/js-screen-shot/lib/split-methods/KeyboardEventHandle.d.ts +10 -10
- package/es2017/customerService/js-screen-shot/lib/split-methods/KeyboardEventHandle.js +4 -4
- package/es2017/customerService/js-screen-shot/lib/split-methods/SetPlugInParameters.d.ts +2 -2
- package/es2017/customerService/js-screen-shot/lib/split-methods/ToolClickEvent.d.ts +1 -1
- package/es2017/customerService/js-screen-shot/lib/split-methods/ToolClickEvent.js +5 -5
- package/es2017/customerService/js-screen-shot/lib/split-methods/drawCrossImg.d.ts +1 -1
- package/es2017/customerService/js-screen-shot/lib/type/ComponentType.d.ts +133 -133
- package/es2017/customerService/js-screen-shot/main.d.ts +110 -110
- package/es2017/customerService/js-screen-shot/main.js +32 -32
- package/es2017/customerService/screenshotTool.d.ts +10 -10
- package/es2017/customerService/teacherList.d.ts +11 -11
- package/es2017/customerService/useMediaRecorder.d.ts +9 -9
- package/es2017/customerService/viewMemaid.d.ts +3 -0
- package/es2017/customerService/viewMemaid.js +57 -0
- package/es2017/i18n/en_US.d.ts +2 -2
- package/es2017/i18n/index.d.ts +2 -2
- package/es2017/i18n/zh_CN.d.ts +2 -2
- package/es2017/icons/components/custom-ai_icon.d.ts +4 -4
- package/es2017/icons/components/custom-arrow.d.ts +4 -4
- package/es2017/icons/components/custom-close.d.ts +4 -4
- package/es2017/icons/components/custom-contacts.d.ts +4 -4
- package/es2017/icons/components/custom-copy.d.ts +4 -4
- package/es2017/icons/components/custom-dislike.d.ts +4 -4
- package/es2017/icons/components/custom-download.d.ts +4 -4
- package/es2017/icons/components/custom-duihao.d.ts +4 -4
- package/es2017/icons/components/custom-exit_full_screen.d.ts +4 -4
- package/es2017/icons/components/custom-expand.d.ts +4 -4
- package/es2017/icons/components/custom-full_screen.d.ts +4 -4
- package/es2017/icons/components/custom-knowledge_content.d.ts +4 -4
- package/es2017/icons/components/custom-like.d.ts +4 -4
- package/es2017/icons/components/custom-quote.d.ts +4 -4
- package/es2017/icons/components/custom-record.d.ts +4 -4
- package/es2017/icons/components/custom-reloading.d.ts +4 -4
- package/es2017/icons/components/custom-retract.d.ts +4 -4
- package/es2017/icons/components/custom-round_close.d.ts +4 -4
- package/es2017/icons/components/custom-screen-xuanzuan.d.ts +4 -4
- package/es2017/icons/components/custom-screenshot.d.ts +4 -4
- package/es2017/icons/components/custom-sending.d.ts +4 -4
- package/es2017/icons/components/custom-sound_recording.d.ts +4 -4
- package/es2017/icons/components/custom-video-abstraction.d.ts +4 -4
- package/es2017/icons/components/custom-wenhao_round.d.ts +4 -4
- package/es2017/icons/components/custom-xuanzuan.d.ts +4 -4
- package/es2017/icons/components/index.d.ts +25 -25
- package/es2017/icons/index.d.ts +2 -2
- package/es2017/images/index.d.ts +6 -6
- package/es2017/index.d.ts +86 -86
- package/es2017/index.js +3 -3
- package/es2017/index.module.css +3 -3
- package/es2017/message/index.d.ts +18 -18
- package/es2017/message/index.module.less +142 -142
- package/es2017/pagination/index.d.ts +4 -4
- package/es2017/pagination/index.module.less +51 -51
- package/es2017/provider/config.d.ts +9 -9
- package/es2017/provider/index.d.ts +7 -7
- package/es2017/table/index.d.ts +12 -12
- package/es2017/table/index.module.less +423 -423
- package/es2017/tableSelect/index.d.ts +3 -3
- package/es2017/tableSelect/index.js +3 -3
- package/es2017/tableSelect/index.module.less +20 -20
- package/es2017/textTootip/index.d.ts +9 -9
- package/es2017/theme/variable.less +652 -652
- package/es2017/titleBar/index.d.ts +16 -16
- package/es2017/titleBar/index.module.less +48 -48
- package/es2017/typings.d.ts +13 -13
- package/es2017/utils/Date.d.ts +10 -10
- package/es2017/utils/dom.d.ts +5 -5
- package/es2017/utils/number.d.ts +1 -1
- package/es2017/utils/object.d.ts +2 -2
- package/es2017/viewImage/index(/345/216/237).d.ts +31 -31
- package/es2017/viewImage/index.d.ts +33 -33
- package/es2017/viewImage/index.module(/345/216/237).less +173 -173
- package/es2017/viewImage/index.module.less +193 -193
- package/esm/AIMessageList/components/content/index.d.ts +4 -4
- package/esm/AIMessageList/components/content/index.module.less +7 -7
- package/esm/AIMessageList/components/copyIcon/index.d.ts +7 -7
- package/esm/AIMessageList/components/copyIcon/index.module.less +23 -23
- package/esm/AIMessageList/components/errorCallback/index.d.ts +3 -3
- package/esm/AIMessageList/components/fileList/fileIcon.d.ts +3 -3
- package/esm/AIMessageList/components/fileList/index.d.ts +4 -4
- package/esm/AIMessageList/components/fileList/index.module.less +95 -95
- package/esm/AIMessageList/components/footer/index.d.ts +10 -10
- package/esm/AIMessageList/components/footer/index.module.less +51 -51
- package/esm/AIMessageList/components/header/index.d.ts +9 -9
- package/esm/AIMessageList/components/header/index.module.less +31 -31
- package/esm/AIMessageList/components/referencesIcon/index.d.ts +9 -9
- package/esm/AIMessageList/components/referencesIcon/index.module.less +14 -14
- package/esm/AIMessageList/components/refreshBtn/index.d.ts +4 -4
- package/esm/AIMessageList/components/refreshBtn/index.module.less +12 -12
- package/esm/AIMessageList/components/remarkBtn/index.d.ts +4 -4
- package/esm/AIMessageList/components/remarkBtn/index.module.less +13 -13
- package/esm/AIMessageList/components/renderReferrnce/index.d.ts +10 -10
- package/esm/AIMessageList/components/renderReferrnce/index.module.less +63 -63
- package/esm/AIMessageList/components/sendBtn/index.d.ts +4 -4
- package/esm/AIMessageList/components/sendBtn/index.module.less +25 -25
- package/esm/AIMessageList/components/uplodaFileBtn/index.d.ts +4 -4
- package/esm/AIMessageList/components/uplodaFileBtn/index.module.less +4 -4
- package/esm/AIMessageList/components/virtuosoList/index.d.ts +5 -5
- package/esm/AIMessageList/components/virtuosoList/index.js +7 -10
- package/esm/AIMessageList/components/virtuosoList/index.module.less +471 -471
- package/esm/AIMessageList/index.d.ts +4 -4
- package/esm/AIMessageList/index.module.less +20 -20
- package/esm/AIMessageList/type.d.ts +310 -310
- package/esm/bhdAppLayout/components/BhdTableSimple/index.js +9 -9
- package/esm/bhdAppLayout/components/BhdTableSimple/index.less +58 -58
- package/esm/bhdAppLayout/components/BhdTableSimple/index/347/232/204/345/211/257/346/234/254.js +9 -9
- package/esm/bhdAppLayout/index.d.ts +28 -28
- package/esm/bhdAppLayout/index.module.less +95 -95
- package/esm/bhdDatePicker/index.d.ts +17 -17
- package/esm/bhdDatePicker/index.module.less +1007 -1007
- package/esm/bhdEditor/index.d.ts +2 -2
- package/esm/bhdEnterInput/index.d.ts +9 -9
- package/esm/bhdModalCropper/index.d.ts +10 -10
- package/esm/bhdModalCropper/index.module.less +362 -362
- package/esm/bhdSelect/index.d.ts +33 -33
- package/esm/bhdSelect/index.module.less +131 -131
- package/esm/bhdTipModal/index.d.ts +29 -29
- package/esm/bhdTipModal/index.module.less +280 -280
- package/esm/bhdTipModal/modal.d.ts +6 -6
- package/esm/customerService/common.module.less +1391 -1391
- package/esm/customerService/contactsList.d.ts +14 -14
- package/esm/customerService/function.d.ts +24 -24
- package/esm/customerService/historyFun.d.ts +13 -13
- package/esm/customerService/html2canvas.test.js +113 -113
- package/esm/customerService/index.d.ts +20 -20
- package/esm/customerService/index.js +283 -63
- package/esm/customerService/index.module.less +2279 -2166
- package/esm/customerService/index2.module.less +2216 -2143
- package/esm/customerService/js-screen-shot/assets/less/screen-shot.less +478 -478
- package/esm/customerService/js-screen-shot/lib/common-methods/CanvasPatch.d.ts +1 -1
- package/esm/customerService/js-screen-shot/lib/common-methods/DeviceTypeVerif.d.ts +2 -2
- package/esm/customerService/js-screen-shot/lib/common-methods/FixedData.d.ts +11 -11
- package/esm/customerService/js-screen-shot/lib/common-methods/FixedData.js +7 -7
- package/esm/customerService/js-screen-shot/lib/common-methods/GetBrushSelectedName.d.ts +5 -5
- package/esm/customerService/js-screen-shot/lib/common-methods/GetBrushSelectedName.js +3 -3
- package/esm/customerService/js-screen-shot/lib/common-methods/GetCanvasImgData.d.ts +4 -4
- package/esm/customerService/js-screen-shot/lib/common-methods/GetCanvasImgData.js +2 -2
- package/esm/customerService/js-screen-shot/lib/common-methods/GetColor.d.ts +1 -1
- package/esm/customerService/js-screen-shot/lib/common-methods/GetSelectedCalssName.d.ts +1 -1
- package/esm/customerService/js-screen-shot/lib/common-methods/GetToolRelativePosition.d.ts +7 -7
- package/esm/customerService/js-screen-shot/lib/common-methods/GetToolRelativePosition.js +2 -2
- package/esm/customerService/js-screen-shot/lib/common-methods/ImgScaling.d.ts +11 -11
- package/esm/customerService/js-screen-shot/lib/common-methods/ImgScaling.js +6 -6
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveBorderArrInfo.d.ts +8 -8
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveBorderArrInfo.js +5 -5
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveCanvasToBase64.d.ts +1 -1
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveCanvasToBase64.js +2 -2
- package/esm/customerService/js-screen-shot/lib/common-methods/SaveCanvasToImage.d.ts +1 -1
- package/esm/customerService/js-screen-shot/lib/common-methods/SelectColor.d.ts +1 -1
- package/esm/customerService/js-screen-shot/lib/common-methods/SelectTextSize.d.ts +5 -5
- package/esm/customerService/js-screen-shot/lib/common-methods/SetBrushSize.d.ts +14 -14
- package/esm/customerService/js-screen-shot/lib/common-methods/SetBrushSize.js +10 -10
- package/esm/customerService/js-screen-shot/lib/common-methods/SetSelectedClassName.d.ts +7 -7
- package/esm/customerService/js-screen-shot/lib/common-methods/SetSelectedClassName.js +5 -5
- package/esm/customerService/js-screen-shot/lib/common-methods/TakeOutHistory.d.ts +1 -1
- package/esm/customerService/js-screen-shot/lib/common-methods/TakeOutHistory.js +2 -2
- package/esm/customerService/js-screen-shot/lib/common-methods/UpdateContainerMouseStyle.d.ts +1 -1
- package/esm/customerService/js-screen-shot/lib/common-methods/ZoomCutOutBoxPosition.d.ts +17 -17
- package/esm/customerService/js-screen-shot/lib/common-methods/ZoomCutOutBoxPosition.js +10 -10
- package/esm/customerService/js-screen-shot/lib/config/Toolbar.d.ts +5 -5
- package/esm/customerService/js-screen-shot/lib/main-entrance/CreateDom.d.ts +24 -24
- package/esm/customerService/js-screen-shot/lib/main-entrance/InitData.d.ts +78 -78
- package/esm/customerService/js-screen-shot/lib/main-entrance/PlugInParameters.d.ts +46 -46
- package/esm/customerService/js-screen-shot/lib/split-methods/AddHistoryData.d.ts +1 -1
- package/esm/customerService/js-screen-shot/lib/split-methods/BoundaryJudgment.d.ts +8 -8
- package/esm/customerService/js-screen-shot/lib/split-methods/BoundaryJudgment.js +5 -5
- package/esm/customerService/js-screen-shot/lib/split-methods/CalculateOptionIcoPosition.d.ts +5 -5
- package/esm/customerService/js-screen-shot/lib/split-methods/CalculateOptionIcoPosition.js +3 -3
- package/esm/customerService/js-screen-shot/lib/split-methods/CalculateToolLocation.d.ts +16 -16
- package/esm/customerService/js-screen-shot/lib/split-methods/CalculateToolLocation.js +7 -7
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawArrow.d.ts +31 -31
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawArrow.js +14 -14
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawCircle.d.ts +11 -11
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawCircle.js +9 -9
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawCutOutBox.d.ts +19 -19
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawCutOutBox.js +12 -12
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawLineArrow.d.ts +13 -13
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawLineArrow.js +18 -18
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawMasking.d.ts +6 -6
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawMasking.js +4 -4
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawMosaic.d.ts +12 -12
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawMosaic.js +21 -21
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawPencil.d.ts +13 -13
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawPencil.js +9 -9
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawRectangle.d.ts +11 -11
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawRectangle.js +9 -9
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawText.d.ts +10 -10
- package/esm/customerService/js-screen-shot/lib/split-methods/DrawText.js +8 -8
- package/esm/customerService/js-screen-shot/lib/split-methods/KeyboardEventHandle.d.ts +10 -10
- package/esm/customerService/js-screen-shot/lib/split-methods/KeyboardEventHandle.js +4 -4
- package/esm/customerService/js-screen-shot/lib/split-methods/SetPlugInParameters.d.ts +2 -2
- package/esm/customerService/js-screen-shot/lib/split-methods/ToolClickEvent.d.ts +1 -1
- package/esm/customerService/js-screen-shot/lib/split-methods/ToolClickEvent.js +5 -5
- package/esm/customerService/js-screen-shot/lib/split-methods/drawCrossImg.d.ts +1 -1
- package/esm/customerService/js-screen-shot/lib/type/ComponentType.d.ts +133 -133
- package/esm/customerService/js-screen-shot/main.d.ts +110 -110
- package/esm/customerService/js-screen-shot/main.js +32 -32
- package/esm/customerService/screenshotTool.d.ts +10 -10
- package/esm/customerService/teacherList.d.ts +11 -11
- package/esm/customerService/useMediaRecorder.d.ts +9 -9
- package/esm/customerService/viewMemaid.d.ts +3 -0
- package/esm/customerService/viewMemaid.js +75 -0
- package/esm/i18n/en_US.d.ts +2 -2
- package/esm/i18n/index.d.ts +2 -2
- package/esm/i18n/zh_CN.d.ts +2 -2
- package/esm/icons/components/custom-ai_icon.d.ts +4 -4
- package/esm/icons/components/custom-arrow.d.ts +4 -4
- package/esm/icons/components/custom-close.d.ts +4 -4
- package/esm/icons/components/custom-contacts.d.ts +4 -4
- package/esm/icons/components/custom-copy.d.ts +4 -4
- package/esm/icons/components/custom-dislike.d.ts +4 -4
- package/esm/icons/components/custom-download.d.ts +4 -4
- package/esm/icons/components/custom-duihao.d.ts +4 -4
- package/esm/icons/components/custom-exit_full_screen.d.ts +4 -4
- package/esm/icons/components/custom-expand.d.ts +4 -4
- package/esm/icons/components/custom-full_screen.d.ts +4 -4
- package/esm/icons/components/custom-knowledge_content.d.ts +4 -4
- package/esm/icons/components/custom-like.d.ts +4 -4
- package/esm/icons/components/custom-quote.d.ts +4 -4
- package/esm/icons/components/custom-record.d.ts +4 -4
- package/esm/icons/components/custom-reloading.d.ts +4 -4
- package/esm/icons/components/custom-retract.d.ts +4 -4
- package/esm/icons/components/custom-round_close.d.ts +4 -4
- package/esm/icons/components/custom-screen-xuanzuan.d.ts +4 -4
- package/esm/icons/components/custom-screenshot.d.ts +4 -4
- package/esm/icons/components/custom-sending.d.ts +4 -4
- package/esm/icons/components/custom-sound_recording.d.ts +4 -4
- package/esm/icons/components/custom-video-abstraction.d.ts +4 -4
- package/esm/icons/components/custom-wenhao_round.d.ts +4 -4
- package/esm/icons/components/custom-xuanzuan.d.ts +4 -4
- package/esm/icons/components/index.d.ts +25 -25
- package/esm/icons/index.d.ts +2 -2
- package/esm/images/index.d.ts +6 -6
- package/esm/index.d.ts +86 -86
- package/esm/index.js +3 -3
- package/esm/index.module.css +3 -3
- package/esm/message/index.d.ts +18 -18
- package/esm/message/index.module.less +142 -142
- package/esm/pagination/index.d.ts +4 -4
- package/esm/pagination/index.module.less +51 -51
- package/esm/provider/config.d.ts +9 -9
- package/esm/provider/index.d.ts +7 -7
- package/esm/table/index.d.ts +12 -12
- package/esm/table/index.module.less +423 -423
- package/esm/tableSelect/index.d.ts +3 -3
- package/esm/tableSelect/index.js +3 -3
- package/esm/tableSelect/index.module.less +20 -20
- package/esm/textTootip/index.d.ts +9 -9
- package/esm/theme/variable.less +652 -652
- package/esm/titleBar/index.d.ts +16 -16
- package/esm/titleBar/index.module.less +48 -48
- package/esm/typings.d.ts +13 -13
- package/esm/utils/Date.d.ts +10 -10
- package/esm/utils/dom.d.ts +5 -5
- package/esm/utils/number.d.ts +1 -1
- package/esm/utils/object.d.ts +2 -2
- package/esm/viewImage/index(/345/216/237).d.ts +31 -31
- package/esm/viewImage/index.d.ts +33 -33
- package/esm/viewImage/index.module(/345/216/237).less +173 -173
- package/esm/viewImage/index.module.less +193 -193
- package/package.json +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as zhCN, A as App, _ as _object_spread, a as AntdMessage, M as Modal$1, b as AntdNotification, C as ConfigProvider, c as _extends, d as _object_destructuring_empty, j as jsx, e as _object_spread_props, f as jsxs, t as transform, S as StyleProvider, g as _sliced_to_array, T as Tooltip, h as Table$2, i as _to_consumable_array, P as Pagination$1, I as Icon, k as Select, l as CaretDownOutlined, m as _inherits, n as _create_super, o as _create_class, p as _class_call_check, q as _define_property, r as _assert_this_initialized, s as _async_to_generator, u as MinusOutlined, v as PlusOutlined, L as LeftOutlined, R as RightOutlined, w as __generator, x as Input, y as SearchOutlined, B as Spin, D as CloseOutlined, X, E as I, H, F as html2canvas$1,
|
|
2
|
-
export {
|
|
1
|
+
import { z as zhCN, A as App, _ as _object_spread, a as AntdMessage, M as Modal$1, b as AntdNotification, C as ConfigProvider, c as _extends, d as _object_destructuring_empty, j as jsx, e as _object_spread_props, f as jsxs, t as transform, S as StyleProvider, g as _sliced_to_array, T as Tooltip, h as Table$2, i as _to_consumable_array, P as Pagination$1, I as Icon, k as Select, l as CaretDownOutlined, m as _inherits, n as _create_super, o as _create_class, p as _class_call_check, q as _define_property, r as _assert_this_initialized, s as _async_to_generator, u as MinusOutlined, v as PlusOutlined, L as LeftOutlined, R as RightOutlined, w as __generator, x as Input, y as SearchOutlined, B as Spin, D as CloseOutlined, X, E as I, H, F as r, G as html2canvas$1, J as Remarkable, K as Drawer, N as HighlightJS, O as cn, Z as ZoomInOutlined, Q as DatePicker, U as Button, V as l, W as Upload, Y as Popover, $ as DoubleRightOutlined, a0 as CloseCircleFilled, a1 as Divider, a2 as fetchEventSource } from './vendor.esm.es5.development.js';
|
|
2
|
+
export { a3 as Affix, a4 as Alert, a5 as Anchor, a as AntdMessage, A as App, a6 as AutoComplete, a7 as Avatar, a9 as BackTop, aa as Badge, ab as Breadcrumb, U as Button, ac as Calendar, ad as Card, ae as Carousel, af as Cascader, ag as Checkbox, ah as Col, ai as Collapse, Q as DatePicker, aj as Descriptions, a1 as Divider, K as Drawer, ak as Dropdown, al as Empty, a8 as FloatButton, am as Form, an as Grid, ao as Image, x as Input, ap as InputNumber, aq as Layout, ar as List, as as Mentions, at as Menu, M as Modal, au as Popconfirm, Y as Popover, av as Progress, aS as QRCode, aw as Radio, ax as Rate, ay as Result, az as Row, aA as Segmented, k as Select, aB as Skeleton, aC as Slider, aD as Space, B as Spin, aE as Statistic, aF as Steps, aG as Switch, aH as Tabs, aI as Tag, aK as TimePicker, aL as Timeline, T as Tooltip, aM as Tour, aN as Transfer, aO as Tree, aP as TreeSelect, aQ as Typography, W as Upload, aR as Watermark, aU as en_US, b as notification, aJ as theme, aT as version, z as zh_CN } from './vendor.esm.es5.development.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useState, useRef, useEffect, useLayoutEffect, forwardRef, useImperativeHandle, useCallback, useMemo } from 'react';
|
|
5
5
|
import { Fragment } from 'react/jsx-runtime';
|
|
@@ -494,15 +494,15 @@ var i18Conversion = function(str, lang) {
|
|
|
494
494
|
};
|
|
495
495
|
var i18Conversion$1 = i18Conversion;
|
|
496
496
|
|
|
497
|
-
/*
|
|
498
|
-
参数与Table一致
|
|
499
|
-
|
|
500
|
-
ajaxErr:接口是否报错
|
|
501
|
-
notDataText:无数据时,显示的文案
|
|
502
|
-
borderBottom: 是否显示下边框线
|
|
503
|
-
loading:是否加载中
|
|
504
|
-
className
|
|
505
|
-
超长内容 出现滚动条 需在管理列定义好width 没有定义的max-width:300
|
|
497
|
+
/*
|
|
498
|
+
参数与Table一致
|
|
499
|
+
|
|
500
|
+
ajaxErr:接口是否报错
|
|
501
|
+
notDataText:无数据时,显示的文案
|
|
502
|
+
borderBottom: 是否显示下边框线
|
|
503
|
+
loading:是否加载中
|
|
504
|
+
className
|
|
505
|
+
超长内容 出现滚动条 需在管理列定义好width 没有定义的max-width:300
|
|
506
506
|
*/ var BhdTableSimple = function(props) {
|
|
507
507
|
var className = props.className; props.locale; props.borderBottom; var rowSelection = props.rowSelection, ajaxErr = props.ajaxErr, dataSource = props.dataSource, _props_kind = props.kind, kind = _props_kind === void 0 ? "simple" : _props_kind, loading = props.loading, _props_notDataText = props.notDataText, notDataText = _props_notDataText === void 0 ? i18Conversion$1("noData") : _props_notDataText;
|
|
508
508
|
var tableRef = useRef(null);
|
|
@@ -2678,7 +2678,7 @@ function BhdAppLayout(props) {
|
|
|
2678
2678
|
});
|
|
2679
2679
|
}
|
|
2680
2680
|
|
|
2681
|
-
var modules_63b47c51$f = {"service_ChatWindow_Drawer":"
|
|
2681
|
+
var modules_63b47c51$f = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__cbcd7891","ChatWindow_Modal":"index_module_ChatWindow_Modal__cbcd7891","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__cbcd7891","header_wrap":"index_module_header_wrap__cbcd7891","top":"index_module_top__cbcd7891","user":"index_module_user__cbcd7891","count":"index_module_count__cbcd7891","operate":"index_module_operate__cbcd7891","line":"index_module_line__cbcd7891","popover_main":"index_module_popover_main__cbcd7891","popover":"index_module_popover__cbcd7891","header_wrap_newlabo":"index_module_header_wrap_newlabo__cbcd7891","Drawer_main":"index_module_Drawer_main__cbcd7891","loading":"index_module_loading__cbcd7891","message_con":"index_module_message_con__cbcd7891","left":"index_module_left__cbcd7891","head_sculpture":"index_module_head_sculpture__cbcd7891","main_content":"index_module_main_content__cbcd7891","right":"index_module_right__cbcd7891","itemcontent":"index_module_itemcontent__cbcd7891","main":"index_module_main__cbcd7891","main_content_flag":"index_module_main_content_flag__cbcd7891","operate_modal":"index_module_operate_modal__cbcd7891","operate_modal_showtop":"index_module_operate_modal_showtop__cbcd7891","operate_modal_bottom":"index_module_operate_modal_bottom__cbcd7891","active":"index_module_active__cbcd7891","stop_generate":"index_module_stop_generate__cbcd7891","icon":"index_module_icon__cbcd7891","find_teacher":"index_module_find_teacher__cbcd7891","stop_findTeacher":"index_module_stop_findTeacher__cbcd7891","content":"index_module_content__cbcd7891","content_child":"index_module_content_child__cbcd7891","mermaid":"index_module_mermaid__cbcd7891","maskZoomBox":"index_module_maskZoomBox__cbcd7891","zoomBox":"index_module_zoomBox__cbcd7891","find_teacher_con":"index_module_find_teacher_con__cbcd7891","sign":"index_module_sign__cbcd7891","ask_question":"index_module_ask_question__cbcd7891","bottom":"index_module_bottom__cbcd7891","association_problem":"index_module_association_problem__cbcd7891","association_problem_flag":"index_module_association_problem_flag__cbcd7891","related_issues_flag":"index_module_related_issues_flag__cbcd7891","img_con":"index_module_img_con__cbcd7891","mask_zoom":"index_module_mask_zoom__cbcd7891","img_con2":"index_module_img_con2__cbcd7891","copyCode":"index_module_copyCode__cbcd7891","time":"index_module_time__cbcd7891","citation_content":"index_module_citation_content__cbcd7891","text_exceed":"index_module_text_exceed__cbcd7891","popover_content":"index_module_popover_content__cbcd7891","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__cbcd7891","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__cbcd7891","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__cbcd7891","issues_list_teacherList":"index_module_issues_list_teacherList__cbcd7891","item":"index_module_item__cbcd7891","issues_list":"index_module_issues_list__cbcd7891","issues_list_flag":"index_module_issues_list_flag__cbcd7891","Drawer_buttom":"index_module_Drawer_buttom__cbcd7891","input_wrap":"index_module_input_wrap__cbcd7891","input":"index_module_input__cbcd7891","picture_layout":"index_module_picture_layout__cbcd7891","icon_close":"index_module_icon_close__cbcd7891","icon_zoom":"index_module_icon_zoom__cbcd7891","anticon":"index_module_anticon__cbcd7891","no_AI":"index_module_no_AI__cbcd7891","screenshot":"index_module_screenshot__cbcd7891","disabled":"index_module_disabled__cbcd7891","content_main":"index_module_content_main__cbcd7891","content_con":"index_module_content_con__cbcd7891","delete_quote":"index_module_delete_quote__cbcd7891","sending":"index_module_sending__cbcd7891","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__cbcd7891","main_list":"index_module_main_list__cbcd7891","chat_content":"index_module_chat_content__cbcd7891","popover_main_content":"index_module_popover_main_content__cbcd7891","popover_main_content_name":"index_module_popover_main_content_name__cbcd7891","teacher_layout":"index_module_teacher_layout__cbcd7891","delete":"index_module_delete__cbcd7891","num":"index_module_num__cbcd7891","shrink":"index_module_shrink__cbcd7891","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__cbcd7891","teacher_layout_modal":"index_module_teacher_layout_modal__cbcd7891","ai":"index_module_ai__cbcd7891","user_info":"index_module_user_info__cbcd7891","message":"index_module_message__cbcd7891","con":"index_module_con__cbcd7891","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__cbcd7891","history_list":"index_module_history_list__cbcd7891","search_layout":"index_module_search_layout__cbcd7891","mymove":"index_module_mymove__cbcd7891","title":"index_module_title__cbcd7891","search_top":"index_module_search_top__cbcd7891","list_item":"index_module_list_item__cbcd7891","list_summary":"index_module_list_summary__cbcd7891","head_img":"index_module_head_img__cbcd7891","list_desc":"index_module_list_desc__cbcd7891","name":"index_module_name__cbcd7891","decs":"index_module_decs__cbcd7891","open":"index_module_open__cbcd7891","list_summary_active":"index_module_list_summary_active__cbcd7891","list_detail":"index_module_list_detail__cbcd7891","list":"index_module_list__cbcd7891","list_more":"index_module_list_more__cbcd7891","no_data":"index_module_no_data__cbcd7891","history_list_broadside":"index_module_history_list_broadside__cbcd7891","teacher_list":"index_module_teacher_list__cbcd7891","screenshot_Modal":"index_module_screenshot_Modal__cbcd7891","ReactCrop":"index_module_ReactCrop__cbcd7891","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__cbcd7891","viewMedia_Modal":"index_module_viewMedia_Modal__cbcd7891","viewMemaid":"index_module_viewMemaid__cbcd7891"};
|
|
2682
2682
|
|
|
2683
2683
|
function BaseHOC(key) {
|
|
2684
2684
|
return function(props) {
|
|
@@ -4044,6 +4044,72 @@ var parseDate = function(dateStr) {
|
|
|
4044
4044
|
};
|
|
4045
4045
|
};
|
|
4046
4046
|
|
|
4047
|
+
r.initialize({
|
|
4048
|
+
startOnLoad: false,
|
|
4049
|
+
theme: "default",
|
|
4050
|
+
securityLevel: "loose",
|
|
4051
|
+
fontFamily: "Arial, sans-serif",
|
|
4052
|
+
flowchart: {
|
|
4053
|
+
htmlLabels: true,
|
|
4054
|
+
curve: "basis"
|
|
4055
|
+
}
|
|
4056
|
+
});
|
|
4057
|
+
function ViewMemaid(props) {
|
|
4058
|
+
var visible = props.visible, className = props.className, _props_getContainer = props.getContainer, getContainer = _props_getContainer === void 0 ? function() {
|
|
4059
|
+
return document.body;
|
|
4060
|
+
} : _props_getContainer, _props_onCancel = props.onCancel, onCancel = _props_onCancel === void 0 ? function() {} : _props_onCancel, content = props.content;
|
|
4061
|
+
var _React_useState = _sliced_to_array(React__default.useState(content), 2), contentText = _React_useState[0], setContentText = _React_useState[1];
|
|
4062
|
+
useEffect(function() {
|
|
4063
|
+
var _dom;
|
|
4064
|
+
var dom = document.getElementById(content);
|
|
4065
|
+
console.log("dom", dom, content);
|
|
4066
|
+
setContentText(((_dom = dom) === null || _dom === void 0 ? void 0 : _dom.textContent) || "");
|
|
4067
|
+
var timer = setTimeout(/*#__PURE__*/ _async_to_generator(function() {
|
|
4068
|
+
return __generator(this, function(_state) {
|
|
4069
|
+
switch(_state.label){
|
|
4070
|
+
case 0:
|
|
4071
|
+
return [
|
|
4072
|
+
4,
|
|
4073
|
+
r.init({
|
|
4074
|
+
querySelector: ".".concat(modules_63b47c51$f.viewMemaid),
|
|
4075
|
+
suppressErrors: true
|
|
4076
|
+
}, ".".concat(modules_63b47c51$f.viewMemaid))
|
|
4077
|
+
];
|
|
4078
|
+
case 1:
|
|
4079
|
+
_state.sent();
|
|
4080
|
+
clearTimeout(timer);
|
|
4081
|
+
return [
|
|
4082
|
+
2
|
|
4083
|
+
];
|
|
4084
|
+
}
|
|
4085
|
+
});
|
|
4086
|
+
}), 100);
|
|
4087
|
+
}, [
|
|
4088
|
+
content
|
|
4089
|
+
]);
|
|
4090
|
+
return /*#__PURE__*/ jsx(Modal$1, {
|
|
4091
|
+
transitionName: "",
|
|
4092
|
+
maskTransitionName: "",
|
|
4093
|
+
title: null,
|
|
4094
|
+
footer: null,
|
|
4095
|
+
closable: true,
|
|
4096
|
+
centered: true,
|
|
4097
|
+
// destroyOnClose
|
|
4098
|
+
open: visible,
|
|
4099
|
+
keyboard: false,
|
|
4100
|
+
onCancel: onCancel,
|
|
4101
|
+
maskStyle: {
|
|
4102
|
+
background: "rgba(0, 0, 0, 0.65)"
|
|
4103
|
+
},
|
|
4104
|
+
wrapClassName: "".concat(modules_63b47c51$f.viewMedia_Modal, " ").concat(className || ""),
|
|
4105
|
+
getContainer: getContainer,
|
|
4106
|
+
children: visible && /*#__PURE__*/ jsx("div", {
|
|
4107
|
+
className: modules_63b47c51$f.viewMemaid,
|
|
4108
|
+
children: contentText
|
|
4109
|
+
})
|
|
4110
|
+
});
|
|
4111
|
+
}
|
|
4112
|
+
|
|
4047
4113
|
var img = "data:image/png;base64,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";
|
|
4048
4114
|
var knowledge_icon = img;
|
|
4049
4115
|
|
|
@@ -4118,9 +4184,9 @@ function getSelectedClassName(index) {
|
|
|
4118
4184
|
return className;
|
|
4119
4185
|
}
|
|
4120
4186
|
|
|
4121
|
-
/**
|
|
4122
|
-
* 获取画笔选项对应的选中时的class名
|
|
4123
|
-
* @param itemName
|
|
4187
|
+
/**
|
|
4188
|
+
* 获取画笔选项对应的选中时的class名
|
|
4189
|
+
* @param itemName
|
|
4124
4190
|
*/ function getBrushSelectedName(itemName) {
|
|
4125
4191
|
var className = "";
|
|
4126
4192
|
switch(itemName){
|
|
@@ -4137,11 +4203,11 @@ function getSelectedClassName(index) {
|
|
|
4137
4203
|
return className;
|
|
4138
4204
|
}
|
|
4139
4205
|
|
|
4140
|
-
/**
|
|
4141
|
-
* 为当前点击项添加选中时的class,移除其兄弟元素选中时的class
|
|
4142
|
-
* @param mouseEvent 需要进行操作的元素
|
|
4143
|
-
* @param index 当前点击项
|
|
4144
|
-
* @param isOption 是否为画笔选项
|
|
4206
|
+
/**
|
|
4207
|
+
* 为当前点击项添加选中时的class,移除其兄弟元素选中时的class
|
|
4208
|
+
* @param mouseEvent 需要进行操作的元素
|
|
4209
|
+
* @param index 当前点击项
|
|
4210
|
+
* @param isOption 是否为画笔选项
|
|
4145
4211
|
*/ function setSelectedClassName(mouseEvent, index, isOption) {
|
|
4146
4212
|
// 获取当前点击项选中时的class名
|
|
4147
4213
|
var className = getSelectedClassName(index);
|
|
@@ -4164,9 +4230,9 @@ function getSelectedClassName(index) {
|
|
|
4164
4230
|
mouseEvent.target.className += " " + className;
|
|
4165
4231
|
}
|
|
4166
4232
|
|
|
4167
|
-
/**
|
|
4168
|
-
* 计算截图工具栏画笔选项三角形角标位置
|
|
4169
|
-
* @param index
|
|
4233
|
+
/**
|
|
4234
|
+
* 计算截图工具栏画笔选项三角形角标位置
|
|
4235
|
+
* @param index
|
|
4170
4236
|
*/ function calculateOptionIcoPosition(index) {
|
|
4171
4237
|
switch(index){
|
|
4172
4238
|
case 1:
|
|
@@ -4204,8 +4270,8 @@ function takeOutHistory() {
|
|
|
4204
4270
|
}
|
|
4205
4271
|
}
|
|
4206
4272
|
|
|
4207
|
-
/**
|
|
4208
|
-
* 获取截图工具栏相对于视口的位置
|
|
4273
|
+
/**
|
|
4274
|
+
* 获取截图工具栏相对于视口的位置
|
|
4209
4275
|
*/ function getToolRelativePosition(left, top) {
|
|
4210
4276
|
var dom = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : document.body;
|
|
4211
4277
|
var rect = dom.getBoundingClientRect();
|
|
@@ -5300,8 +5366,8 @@ function saveCanvasToBase64(context, startX, startY, width, height) {
|
|
|
5300
5366
|
return "";
|
|
5301
5367
|
}
|
|
5302
5368
|
|
|
5303
|
-
/**
|
|
5304
|
-
* 将指定区域的canvas转为图片
|
|
5369
|
+
/**
|
|
5370
|
+
* 将指定区域的canvas转为图片
|
|
5305
5371
|
*/ function getCanvasImgData(isSave) {
|
|
5306
5372
|
var _data_getScreenShotContainer;
|
|
5307
5373
|
var data = new InitData();
|
|
@@ -5322,18 +5388,18 @@ function saveCanvasToBase64(context, startX, startY, width, height) {
|
|
|
5322
5388
|
return base64;
|
|
5323
5389
|
}
|
|
5324
5390
|
|
|
5325
|
-
/**
|
|
5326
|
-
* 绘制裁剪框
|
|
5327
|
-
* @param mouseX 鼠标x轴坐标
|
|
5328
|
-
* @param mouseY 鼠标y轴坐标
|
|
5329
|
-
* @param width 裁剪框宽度
|
|
5330
|
-
* @param height 裁剪框高度
|
|
5331
|
-
* @param context 需要进行绘制的canvas画布
|
|
5332
|
-
* @param borderSize 边框节点直径
|
|
5333
|
-
* @param controller 需要进行操作的canvas容器
|
|
5334
|
-
* @param imageController 图片canvas容器
|
|
5335
|
-
* @param drawBorders
|
|
5336
|
-
* @private
|
|
5391
|
+
/**
|
|
5392
|
+
* 绘制裁剪框
|
|
5393
|
+
* @param mouseX 鼠标x轴坐标
|
|
5394
|
+
* @param mouseY 鼠标y轴坐标
|
|
5395
|
+
* @param width 裁剪框宽度
|
|
5396
|
+
* @param height 裁剪框高度
|
|
5397
|
+
* @param context 需要进行绘制的canvas画布
|
|
5398
|
+
* @param borderSize 边框节点直径
|
|
5399
|
+
* @param controller 需要进行操作的canvas容器
|
|
5400
|
+
* @param imageController 图片canvas容器
|
|
5401
|
+
* @param drawBorders
|
|
5402
|
+
* @private
|
|
5337
5403
|
*/ function drawCutOutBox(mouseX, mouseY, width, height, context, borderSize, controller, imageController) {
|
|
5338
5404
|
var drawBorders = arguments.length > 8 && arguments[8] !== void 0 ? arguments[8] : true;
|
|
5339
5405
|
var _controller, _controller1, _controller2, _controller3;
|
|
@@ -5600,11 +5666,11 @@ function toolClickEvent(toolName, index, mouseEvent, completeCallback, closeCall
|
|
|
5600
5666
|
data.setToolClickStatus(true);
|
|
5601
5667
|
}
|
|
5602
5668
|
|
|
5603
|
-
/**
|
|
5604
|
-
* 设置画笔大小
|
|
5605
|
-
* @param size
|
|
5606
|
-
* @param index
|
|
5607
|
-
* @param mouseEvent
|
|
5669
|
+
/**
|
|
5670
|
+
* 设置画笔大小
|
|
5671
|
+
* @param size
|
|
5672
|
+
* @param index
|
|
5673
|
+
* @param mouseEvent
|
|
5608
5674
|
*/ function setBrushSize(size, index, mouseEvent) {
|
|
5609
5675
|
var data = new InitData();
|
|
5610
5676
|
// 为当前点击项添加选中时的class名
|
|
@@ -5624,11 +5690,11 @@ function toolClickEvent(toolName, index, mouseEvent, completeCallback, closeCall
|
|
|
5624
5690
|
data.setPenSize(sizeNum);
|
|
5625
5691
|
return sizeNum;
|
|
5626
5692
|
}
|
|
5627
|
-
/**
|
|
5628
|
-
* 设置马赛克工具的笔触大小
|
|
5629
|
-
* @param size
|
|
5630
|
-
* @param index
|
|
5631
|
-
* @param mouseEvent
|
|
5693
|
+
/**
|
|
5694
|
+
* 设置马赛克工具的笔触大小
|
|
5695
|
+
* @param size
|
|
5696
|
+
* @param index
|
|
5697
|
+
* @param mouseEvent
|
|
5632
5698
|
*/ function setMosaicPenSize(size, index, mouseEvent) {
|
|
5633
5699
|
var data = new InitData();
|
|
5634
5700
|
// 为当前点击项添加选中时的class名
|
|
@@ -6058,10 +6124,10 @@ var CreateDom = /*#__PURE__*/ function() {
|
|
|
6058
6124
|
return CreateDom;
|
|
6059
6125
|
}();
|
|
6060
6126
|
|
|
6061
|
-
/**
|
|
6062
|
-
* 绘制蒙层
|
|
6063
|
-
* @param context 需要进行绘制canvas
|
|
6064
|
-
* @param imgData 屏幕截图canvas容器
|
|
6127
|
+
/**
|
|
6128
|
+
* 绘制蒙层
|
|
6129
|
+
* @param context 需要进行绘制canvas
|
|
6130
|
+
* @param imgData 屏幕截图canvas容器
|
|
6065
6131
|
*/ function drawMasking(context, imgData) {
|
|
6066
6132
|
var data = new PlugInParameters();
|
|
6067
6133
|
var plugInParameters = new PlugInParameters();
|
|
@@ -6099,16 +6165,16 @@ var CreateDom = /*#__PURE__*/ function() {
|
|
|
6099
6165
|
context.restore();
|
|
6100
6166
|
}
|
|
6101
6167
|
|
|
6102
|
-
/**
|
|
6103
|
-
* 对参数进行处理,小于0则返回0
|
|
6168
|
+
/**
|
|
6169
|
+
* 对参数进行处理,小于0则返回0
|
|
6104
6170
|
*/ function nonNegativeData(data) {
|
|
6105
6171
|
return data > 0 ? data : 0;
|
|
6106
6172
|
}
|
|
6107
|
-
/**
|
|
6108
|
-
* 计算传进来的数据,不让其移出可视区域
|
|
6109
|
-
* @param data 需要计算的数据
|
|
6110
|
-
* @param trimDistance 裁剪框宽度
|
|
6111
|
-
* @param canvasDistance 画布宽度
|
|
6173
|
+
/**
|
|
6174
|
+
* 计算传进来的数据,不让其移出可视区域
|
|
6175
|
+
* @param data 需要计算的数据
|
|
6176
|
+
* @param trimDistance 裁剪框宽度
|
|
6177
|
+
* @param canvasDistance 画布宽度
|
|
6112
6178
|
*/ function fixedData(data, trimDistance, canvasDistance) {
|
|
6113
6179
|
if (nonNegativeData(data) + trimDistance > canvasDistance) {
|
|
6114
6180
|
return nonNegativeData(canvasDistance - trimDistance);
|
|
@@ -6117,13 +6183,13 @@ var CreateDom = /*#__PURE__*/ function() {
|
|
|
6117
6183
|
}
|
|
6118
6184
|
}
|
|
6119
6185
|
|
|
6120
|
-
/**
|
|
6121
|
-
* 画笔绘制
|
|
6122
|
-
* @param context
|
|
6123
|
-
* @param mouseX
|
|
6124
|
-
* @param mouseY
|
|
6125
|
-
* @param size
|
|
6126
|
-
* @param color
|
|
6186
|
+
/**
|
|
6187
|
+
* 画笔绘制
|
|
6188
|
+
* @param context
|
|
6189
|
+
* @param mouseX
|
|
6190
|
+
* @param mouseY
|
|
6191
|
+
* @param size
|
|
6192
|
+
* @param color
|
|
6127
6193
|
*/ function drawPencil(context, mouseX, mouseY, size, color) {
|
|
6128
6194
|
// 开始绘制
|
|
6129
6195
|
context.save();
|
|
@@ -6136,8 +6202,8 @@ var CreateDom = /*#__PURE__*/ function() {
|
|
|
6136
6202
|
// 绘制结束
|
|
6137
6203
|
context.restore();
|
|
6138
6204
|
}
|
|
6139
|
-
/**
|
|
6140
|
-
* 画笔初始化
|
|
6205
|
+
/**
|
|
6206
|
+
* 画笔初始化
|
|
6141
6207
|
*/ function initPencil(context, mouseX, mouseY) {
|
|
6142
6208
|
// 开始||清空一条路径
|
|
6143
6209
|
context.beginPath();
|
|
@@ -6145,15 +6211,15 @@ var CreateDom = /*#__PURE__*/ function() {
|
|
|
6145
6211
|
context.moveTo(mouseX, mouseY);
|
|
6146
6212
|
}
|
|
6147
6213
|
|
|
6148
|
-
/**
|
|
6149
|
-
* 绘制矩形
|
|
6150
|
-
* @param mouseX
|
|
6151
|
-
* @param mouseY
|
|
6152
|
-
* @param width
|
|
6153
|
-
* @param height
|
|
6154
|
-
* @param color 边框颜色
|
|
6155
|
-
* @param borderWidth 边框大小
|
|
6156
|
-
* @param context 需要进行绘制的canvas画布
|
|
6214
|
+
/**
|
|
6215
|
+
* 绘制矩形
|
|
6216
|
+
* @param mouseX
|
|
6217
|
+
* @param mouseY
|
|
6218
|
+
* @param width
|
|
6219
|
+
* @param height
|
|
6220
|
+
* @param color 边框颜色
|
|
6221
|
+
* @param borderWidth 边框大小
|
|
6222
|
+
* @param context 需要进行绘制的canvas画布
|
|
6157
6223
|
*/ function drawRectangle(mouseX, mouseY, width, height, color, borderWidth, context) {
|
|
6158
6224
|
context.save();
|
|
6159
6225
|
// 设置边框颜色
|
|
@@ -6168,15 +6234,15 @@ var CreateDom = /*#__PURE__*/ function() {
|
|
|
6168
6234
|
context.restore();
|
|
6169
6235
|
}
|
|
6170
6236
|
|
|
6171
|
-
/**
|
|
6172
|
-
* 绘制圆形
|
|
6173
|
-
* @param context 需要进行绘制的画布
|
|
6174
|
-
* @param mouseX 当前鼠标x轴坐标
|
|
6175
|
-
* @param mouseY 当前鼠标y轴坐标
|
|
6176
|
-
* @param mouseStartX 鼠标按下时的x轴坐标
|
|
6177
|
-
* @param mouseStartY 鼠标按下时的y轴坐标
|
|
6178
|
-
* @param borderWidth 边框宽度
|
|
6179
|
-
* @param color 边框颜色
|
|
6237
|
+
/**
|
|
6238
|
+
* 绘制圆形
|
|
6239
|
+
* @param context 需要进行绘制的画布
|
|
6240
|
+
* @param mouseX 当前鼠标x轴坐标
|
|
6241
|
+
* @param mouseY 当前鼠标y轴坐标
|
|
6242
|
+
* @param mouseStartX 鼠标按下时的x轴坐标
|
|
6243
|
+
* @param mouseStartY 鼠标按下时的y轴坐标
|
|
6244
|
+
* @param borderWidth 边框宽度
|
|
6245
|
+
* @param color 边框颜色
|
|
6180
6246
|
*/ function drawCircle(context, mouseX, mouseY, mouseStartX, mouseStartY, borderWidth, color) {
|
|
6181
6247
|
// 坐标边界处理,解决反向绘制椭圆时的报错问题
|
|
6182
6248
|
var startX = mouseX < mouseStartX ? mouseX : mouseStartX;
|
|
@@ -6232,15 +6298,15 @@ var DrawArrow = /*#__PURE__*/ function() {
|
|
|
6232
6298
|
_create_class(DrawArrow, [
|
|
6233
6299
|
{
|
|
6234
6300
|
key: "draw",
|
|
6235
|
-
value: /**
|
|
6236
|
-
* 绘制箭头
|
|
6237
|
-
* @param ctx 需要进行绘制的画布
|
|
6238
|
-
* @param originX 鼠标按下时的x轴坐标
|
|
6239
|
-
* @param originY 鼠标按下式的y轴坐标
|
|
6240
|
-
* @param x 当前鼠标x轴坐标
|
|
6241
|
-
* @param y 当前鼠标y轴坐标
|
|
6242
|
-
* @param color 箭头颜色
|
|
6243
|
-
* @param size 箭头尺寸
|
|
6301
|
+
value: /**
|
|
6302
|
+
* 绘制箭头
|
|
6303
|
+
* @param ctx 需要进行绘制的画布
|
|
6304
|
+
* @param originX 鼠标按下时的x轴坐标
|
|
6305
|
+
* @param originY 鼠标按下式的y轴坐标
|
|
6306
|
+
* @param x 当前鼠标x轴坐标
|
|
6307
|
+
* @param y 当前鼠标y轴坐标
|
|
6308
|
+
* @param color 箭头颜色
|
|
6309
|
+
* @param size 箭头尺寸
|
|
6244
6310
|
*/ function draw(ctx, originX, originY, x, y, color, size) {
|
|
6245
6311
|
this.beginPoint.x = originX;
|
|
6246
6312
|
this.beginPoint.y = originY;
|
|
@@ -6314,11 +6380,11 @@ var DrawArrow = /*#__PURE__*/ function() {
|
|
|
6314
6380
|
},
|
|
6315
6381
|
{
|
|
6316
6382
|
key: "setArrowInfo",
|
|
6317
|
-
value: /**
|
|
6318
|
-
* 设置箭头的相关绘制信息
|
|
6319
|
-
* @param edgeLen 长度
|
|
6320
|
-
* @param angle 角度
|
|
6321
|
-
* @private
|
|
6383
|
+
value: /**
|
|
6384
|
+
* 设置箭头的相关绘制信息
|
|
6385
|
+
* @param edgeLen 长度
|
|
6386
|
+
* @param angle 角度
|
|
6387
|
+
* @private
|
|
6322
6388
|
*/ function setArrowInfo(edgeLen, angle) {
|
|
6323
6389
|
this.arrowInfo.edgeLen = edgeLen;
|
|
6324
6390
|
this.arrowInfo.angle = angle;
|
|
@@ -6362,11 +6428,11 @@ var DrawArrow = /*#__PURE__*/ function() {
|
|
|
6362
6428
|
return DrawArrow;
|
|
6363
6429
|
}();
|
|
6364
6430
|
|
|
6365
|
-
/**
|
|
6366
|
-
* 获取图像指定坐标位置的颜色
|
|
6367
|
-
* @param imgData 需要进行操作的图片
|
|
6368
|
-
* @param x x点坐标
|
|
6369
|
-
* @param y y点坐标
|
|
6431
|
+
/**
|
|
6432
|
+
* 获取图像指定坐标位置的颜色
|
|
6433
|
+
* @param imgData 需要进行操作的图片
|
|
6434
|
+
* @param x x点坐标
|
|
6435
|
+
* @param y y点坐标
|
|
6370
6436
|
*/ var getAxisColor = function(imgData, x, y) {
|
|
6371
6437
|
var w = imgData.width;
|
|
6372
6438
|
var d = imgData.data;
|
|
@@ -6377,12 +6443,12 @@ var DrawArrow = /*#__PURE__*/ function() {
|
|
|
6377
6443
|
color[3] = d[4 * (y * w + x) + 3];
|
|
6378
6444
|
return color;
|
|
6379
6445
|
};
|
|
6380
|
-
/**
|
|
6381
|
-
* 设置图像指定坐标位置的颜色
|
|
6382
|
-
* @param imgData 需要进行操作的图片
|
|
6383
|
-
* @param x x点坐标
|
|
6384
|
-
* @param y y点坐标
|
|
6385
|
-
* @param color 颜色数组
|
|
6446
|
+
/**
|
|
6447
|
+
* 设置图像指定坐标位置的颜色
|
|
6448
|
+
* @param imgData 需要进行操作的图片
|
|
6449
|
+
* @param x x点坐标
|
|
6450
|
+
* @param y y点坐标
|
|
6451
|
+
* @param color 颜色数组
|
|
6386
6452
|
*/ var setAxisColor = function(imgData, x, y, color) {
|
|
6387
6453
|
var w = imgData.width;
|
|
6388
6454
|
var d = imgData.data;
|
|
@@ -6391,16 +6457,16 @@ var DrawArrow = /*#__PURE__*/ function() {
|
|
|
6391
6457
|
d[4 * (y * w + x) + 2] = color[2];
|
|
6392
6458
|
d[4 * (y * w + x) + 3] = color[3];
|
|
6393
6459
|
};
|
|
6394
|
-
/**
|
|
6395
|
-
* 绘制马赛克
|
|
6396
|
-
* 实现思路:
|
|
6397
|
-
* 1. 获取鼠标划过路径区域的图像信息
|
|
6398
|
-
* 2. 将区域内的像素点绘制成周围相近的颜色
|
|
6399
|
-
* @param mouseX 当前鼠标X轴坐标
|
|
6400
|
-
* @param mouseY 当前鼠标Y轴坐标
|
|
6401
|
-
* @param size 马赛克画笔大小
|
|
6402
|
-
* @param degreeOfBlur 马赛克模糊度
|
|
6403
|
-
* @param context 需要进行绘制的画布
|
|
6460
|
+
/**
|
|
6461
|
+
* 绘制马赛克
|
|
6462
|
+
* 实现思路:
|
|
6463
|
+
* 1. 获取鼠标划过路径区域的图像信息
|
|
6464
|
+
* 2. 将区域内的像素点绘制成周围相近的颜色
|
|
6465
|
+
* @param mouseX 当前鼠标X轴坐标
|
|
6466
|
+
* @param mouseY 当前鼠标Y轴坐标
|
|
6467
|
+
* @param size 马赛克画笔大小
|
|
6468
|
+
* @param degreeOfBlur 马赛克模糊度
|
|
6469
|
+
* @param context 需要进行绘制的画布
|
|
6404
6470
|
*/ function drawMosaic(mouseX, mouseY, size, degreeOfBlur, context) {
|
|
6405
6471
|
// 获取设备像素比
|
|
6406
6472
|
var dpr = window.devicePixelRatio || 1;
|
|
@@ -6430,16 +6496,16 @@ var DrawArrow = /*#__PURE__*/ function() {
|
|
|
6430
6496
|
context.putImageData(imgData, mouseX * dpr, mouseY * dpr);
|
|
6431
6497
|
}
|
|
6432
6498
|
|
|
6433
|
-
/**
|
|
6434
|
-
* 缩放裁剪框
|
|
6435
|
-
* @param currentX 当前鼠标X轴坐标
|
|
6436
|
-
* @param currentY 当前鼠标Y轴坐标
|
|
6437
|
-
* @param startX 裁剪框当前X轴坐标
|
|
6438
|
-
* @param startY 裁剪框当前Y轴坐标
|
|
6439
|
-
* @param width 裁剪框宽度
|
|
6440
|
-
* @param height 裁剪框高度
|
|
6441
|
-
* @param option 当前操作的节点
|
|
6442
|
-
* @private
|
|
6499
|
+
/**
|
|
6500
|
+
* 缩放裁剪框
|
|
6501
|
+
* @param currentX 当前鼠标X轴坐标
|
|
6502
|
+
* @param currentY 当前鼠标Y轴坐标
|
|
6503
|
+
* @param startX 裁剪框当前X轴坐标
|
|
6504
|
+
* @param startY 裁剪框当前Y轴坐标
|
|
6505
|
+
* @param width 裁剪框宽度
|
|
6506
|
+
* @param height 裁剪框高度
|
|
6507
|
+
* @param option 当前操作的节点
|
|
6508
|
+
* @private
|
|
6443
6509
|
*/ function zoomCutOutBoxPosition(currentX, currentY, startX, startY, width, height, option) {
|
|
6444
6510
|
// 临时坐标
|
|
6445
6511
|
var tempStartX, tempStartY, tempWidth, tempHeight = 0;
|
|
@@ -6522,11 +6588,11 @@ var DrawArrow = /*#__PURE__*/ function() {
|
|
|
6522
6588
|
}
|
|
6523
6589
|
}
|
|
6524
6590
|
|
|
6525
|
-
/**
|
|
6526
|
-
* 保存边框节点的相关信息
|
|
6527
|
-
* @param borderSize 边框节点直径大小
|
|
6528
|
-
* @param positionInfo 裁剪框位置信息
|
|
6529
|
-
* @private
|
|
6591
|
+
/**
|
|
6592
|
+
* 保存边框节点的相关信息
|
|
6593
|
+
* @param borderSize 边框节点直径大小
|
|
6594
|
+
* @param positionInfo 裁剪框位置信息
|
|
6595
|
+
* @private
|
|
6530
6596
|
*/ function saveBorderArrInfo(borderSize, positionInfo) {
|
|
6531
6597
|
// 获取裁剪框位置信息
|
|
6532
6598
|
var startX = positionInfo.startX, startY = positionInfo.startY, width = positionInfo.width, height = positionInfo.height;
|
|
@@ -6648,13 +6714,13 @@ var DrawArrow = /*#__PURE__*/ function() {
|
|
|
6648
6714
|
return borderArr;
|
|
6649
6715
|
}
|
|
6650
6716
|
|
|
6651
|
-
/**
|
|
6652
|
-
* 计算截图工具栏位置
|
|
6653
|
-
* @param position 裁剪框位置信息
|
|
6654
|
-
* @param toolWidth 截图工具栏宽度
|
|
6655
|
-
* @param containerWidth 截图容器宽度
|
|
6656
|
-
* @param placement 展示位置
|
|
6657
|
-
* @param containerLocation 截图容器位置信息
|
|
6717
|
+
/**
|
|
6718
|
+
* 计算截图工具栏位置
|
|
6719
|
+
* @param position 裁剪框位置信息
|
|
6720
|
+
* @param toolWidth 截图工具栏宽度
|
|
6721
|
+
* @param containerWidth 截图容器宽度
|
|
6722
|
+
* @param placement 展示位置
|
|
6723
|
+
* @param containerLocation 截图容器位置信息
|
|
6658
6724
|
*/ function calculateToolLocation(position, toolWidth, containerWidth, placement, containerLocation) {
|
|
6659
6725
|
// 工具栏X轴坐标 = (裁剪框的宽度 - 工具栏的宽度) / 2 + (裁剪框距离左侧的距离 - 容器距离左侧的距离)
|
|
6660
6726
|
var mouseX = (position.width - toolWidth) / 2 + (position.startX - containerLocation.left);
|
|
@@ -6688,11 +6754,11 @@ var DrawArrow = /*#__PURE__*/ function() {
|
|
|
6688
6754
|
};
|
|
6689
6755
|
}
|
|
6690
6756
|
|
|
6691
|
-
/**
|
|
6692
|
-
* 获取工具栏工具边界绘制状态
|
|
6693
|
-
* @param startX x轴绘制起点
|
|
6694
|
-
* @param startY y轴绘制起点
|
|
6695
|
-
* @param cutBoxPosition 裁剪框位置信息
|
|
6757
|
+
/**
|
|
6758
|
+
* 获取工具栏工具边界绘制状态
|
|
6759
|
+
* @param startX x轴绘制起点
|
|
6760
|
+
* @param startY y轴绘制起点
|
|
6761
|
+
* @param cutBoxPosition 裁剪框位置信息
|
|
6696
6762
|
*/ function getDrawBoundaryStatus(startX, startY, cutBoxPosition) {
|
|
6697
6763
|
if (startX < cutBoxPosition.startX || startY < cutBoxPosition.startY || startX > cutBoxPosition.startX + cutBoxPosition.width || startY > cutBoxPosition.startY + cutBoxPosition.height) {
|
|
6698
6764
|
// 无法绘制
|
|
@@ -6738,10 +6804,10 @@ var KeyboardEventHandle = /*#__PURE__*/ function() {
|
|
|
6738
6804
|
_create_class(KeyboardEventHandle, [
|
|
6739
6805
|
{
|
|
6740
6806
|
key: "triggerEvent",
|
|
6741
|
-
value: /**
|
|
6742
|
-
* 触发工具栏指定模块的点击事件
|
|
6743
|
-
* @param eventName 事件名, 与截图工具栏中的data-title属性值保持一致
|
|
6744
|
-
* @private
|
|
6807
|
+
value: /**
|
|
6808
|
+
* 触发工具栏指定模块的点击事件
|
|
6809
|
+
* @param eventName 事件名, 与截图工具栏中的data-title属性值保持一致
|
|
6810
|
+
* @private
|
|
6745
6811
|
*/ function triggerEvent(eventName) {
|
|
6746
6812
|
if (this.toolController == null) return;
|
|
6747
6813
|
for(var i = 0; i < this.toolController.childNodes.length; i++){
|
|
@@ -6898,25 +6964,25 @@ function isTouchDevice() {
|
|
|
6898
6964
|
return maxTouchPoints || msMaxTouchPoints || touchEvent || coarsePointer;
|
|
6899
6965
|
}
|
|
6900
6966
|
|
|
6901
|
-
/**
|
|
6902
|
-
* 绘制箭头
|
|
6903
|
-
* @param context 需要进行绘制的画布
|
|
6904
|
-
* @param mouseStartX 鼠标按下时的x轴坐标 P1
|
|
6905
|
-
* @param mouseStartY 鼠标按下式的y轴坐标 P1
|
|
6906
|
-
* @param mouseX 当前鼠标x轴坐标 P2
|
|
6907
|
-
* @param mouseY 当前鼠标y轴坐标 P2
|
|
6908
|
-
* @param theta 箭头斜线与直线的夹角角度 (θ) P3 ---> (P1、P2) || P4 ---> P1(P1、P2)
|
|
6909
|
-
* @param slashLength 箭头斜线的长度 P3 ---> P2 || P4 ---> P2
|
|
6910
|
-
* @param borderWidth 边框宽度
|
|
6911
|
-
* @param color 边框颜色
|
|
6967
|
+
/**
|
|
6968
|
+
* 绘制箭头
|
|
6969
|
+
* @param context 需要进行绘制的画布
|
|
6970
|
+
* @param mouseStartX 鼠标按下时的x轴坐标 P1
|
|
6971
|
+
* @param mouseStartY 鼠标按下式的y轴坐标 P1
|
|
6972
|
+
* @param mouseX 当前鼠标x轴坐标 P2
|
|
6973
|
+
* @param mouseY 当前鼠标y轴坐标 P2
|
|
6974
|
+
* @param theta 箭头斜线与直线的夹角角度 (θ) P3 ---> (P1、P2) || P4 ---> P1(P1、P2)
|
|
6975
|
+
* @param slashLength 箭头斜线的长度 P3 ---> P2 || P4 ---> P2
|
|
6976
|
+
* @param borderWidth 边框宽度
|
|
6977
|
+
* @param color 边框颜色
|
|
6912
6978
|
*/ function drawLineArrow(context, mouseStartX, mouseStartY, mouseX, mouseY, theta, slashLength, borderWidth, color) {
|
|
6913
|
-
/**
|
|
6914
|
-
* 已知:
|
|
6915
|
-
* 1. P1、P2的坐标
|
|
6916
|
-
* 2. 箭头斜线(P3 || P4) ---> P2直线的长度
|
|
6917
|
-
* 3. 箭头斜线(P3 || P4) ---> (P1、P2)直线的夹角角度(θ)
|
|
6918
|
-
* 求:
|
|
6919
|
-
* P3、P4的坐标
|
|
6979
|
+
/**
|
|
6980
|
+
* 已知:
|
|
6981
|
+
* 1. P1、P2的坐标
|
|
6982
|
+
* 2. 箭头斜线(P3 || P4) ---> P2直线的长度
|
|
6983
|
+
* 3. 箭头斜线(P3 || P4) ---> (P1、P2)直线的夹角角度(θ)
|
|
6984
|
+
* 求:
|
|
6985
|
+
* P3、P4的坐标
|
|
6920
6986
|
*/ var angle = Math.atan2(mouseStartY - mouseY, mouseStartX - mouseX) * 180 / Math.PI, angle1 = (angle + theta) * Math.PI / 180, angle2 = (angle - theta) * Math.PI / 180, topX = slashLength * Math.cos(angle1), topY = slashLength * Math.sin(angle1), botX = slashLength * Math.cos(angle2), botY = slashLength * Math.sin(angle2); // P4点的Y轴坐标
|
|
6921
6987
|
// 开始绘制
|
|
6922
6988
|
context.save();
|
|
@@ -7743,13 +7809,13 @@ var ScreenShot = /*#__PURE__*/ function() {
|
|
|
7743
7809
|
},
|
|
7744
7810
|
{
|
|
7745
7811
|
key: "getWindowContentData",
|
|
7746
|
-
value: /**
|
|
7747
|
-
* 从窗口数据流中截取页面body内容
|
|
7748
|
-
* @param videoWidth 窗口宽度
|
|
7749
|
-
* @param videoHeight 窗口高度
|
|
7750
|
-
* @param containerWidth body内容宽度
|
|
7751
|
-
* @param containerHeight body内容高度
|
|
7752
|
-
* @private
|
|
7812
|
+
value: /**
|
|
7813
|
+
* 从窗口数据流中截取页面body内容
|
|
7814
|
+
* @param videoWidth 窗口宽度
|
|
7815
|
+
* @param videoHeight 窗口高度
|
|
7816
|
+
* @param containerWidth body内容宽度
|
|
7817
|
+
* @param containerHeight body内容高度
|
|
7818
|
+
* @private
|
|
7753
7819
|
*/ function getWindowContentData(videoWidth, videoHeight, containerWidth, containerHeight) {
|
|
7754
7820
|
var videoCanvas = document.createElement("canvas");
|
|
7755
7821
|
videoCanvas.width = videoWidth;
|
|
@@ -7937,16 +8003,16 @@ var ScreenShot = /*#__PURE__*/ function() {
|
|
|
7937
8003
|
},
|
|
7938
8004
|
{
|
|
7939
8005
|
key: "operatingCutOutBox",
|
|
7940
|
-
value: /**
|
|
7941
|
-
* 操作裁剪框
|
|
7942
|
-
* @param currentX 裁剪框当前x轴坐标
|
|
7943
|
-
* @param currentY 裁剪框当前y轴坐标
|
|
7944
|
-
* @param startX 鼠标x轴坐标
|
|
7945
|
-
* @param startY 鼠标y轴坐标
|
|
7946
|
-
* @param width 裁剪框宽度
|
|
7947
|
-
* @param height 裁剪框高度
|
|
7948
|
-
* @param context 需要进行绘制的canvas画布
|
|
7949
|
-
* @private
|
|
8006
|
+
value: /**
|
|
8007
|
+
* 操作裁剪框
|
|
8008
|
+
* @param currentX 裁剪框当前x轴坐标
|
|
8009
|
+
* @param currentY 裁剪框当前y轴坐标
|
|
8010
|
+
* @param startX 鼠标x轴坐标
|
|
8011
|
+
* @param startY 鼠标y轴坐标
|
|
8012
|
+
* @param width 裁剪框宽度
|
|
8013
|
+
* @param height 裁剪框高度
|
|
8014
|
+
* @param context 需要进行绘制的canvas画布
|
|
8015
|
+
* @private
|
|
7950
8016
|
*/ function operatingCutOutBox(currentX, currentY, startX, startY, width, height, context) {
|
|
7951
8017
|
// canvas元素不存在
|
|
7952
8018
|
if (this.screenShotContainer == null) {
|
|
@@ -8039,9 +8105,9 @@ var ScreenShot = /*#__PURE__*/ function() {
|
|
|
8039
8105
|
},
|
|
8040
8106
|
{
|
|
8041
8107
|
key: "showLastHistory",
|
|
8042
|
-
value: /**
|
|
8043
|
-
* 显示最新的画布状态
|
|
8044
|
-
* @private
|
|
8108
|
+
value: /**
|
|
8109
|
+
* 显示最新的画布状态
|
|
8110
|
+
* @private
|
|
8045
8111
|
*/ function showLastHistory() {
|
|
8046
8112
|
if (this.screenShotCanvas != null) {
|
|
8047
8113
|
var context = this.screenShotCanvas;
|
|
@@ -8074,12 +8140,12 @@ var ScreenShot = /*#__PURE__*/ function() {
|
|
|
8074
8140
|
},
|
|
8075
8141
|
{
|
|
8076
8142
|
key: "drawPictures",
|
|
8077
|
-
value: /**
|
|
8078
|
-
* 向截图容器中绘制图片
|
|
8079
|
-
* @param triggerCallback
|
|
8080
|
-
* @param context
|
|
8081
|
-
* @param imgSrc
|
|
8082
|
-
* @private
|
|
8143
|
+
value: /**
|
|
8144
|
+
* 向截图容器中绘制图片
|
|
8145
|
+
* @param triggerCallback
|
|
8146
|
+
* @param context
|
|
8147
|
+
* @param imgSrc
|
|
8148
|
+
* @private
|
|
8083
8149
|
*/ function drawPictures(triggerCallback, context, imgSrc) {
|
|
8084
8150
|
var _this = this;
|
|
8085
8151
|
var imgContainer = new Image();
|
|
@@ -8100,12 +8166,12 @@ var ScreenShot = /*#__PURE__*/ function() {
|
|
|
8100
8166
|
},
|
|
8101
8167
|
{
|
|
8102
8168
|
key: "initScreenShot",
|
|
8103
|
-
value: /**
|
|
8104
|
-
* 初始化截图容器
|
|
8105
|
-
* @param triggerCallback
|
|
8106
|
-
* @param context
|
|
8107
|
-
* @param screenShotContainer
|
|
8108
|
-
* @private
|
|
8169
|
+
value: /**
|
|
8170
|
+
* 初始化截图容器
|
|
8171
|
+
* @param triggerCallback
|
|
8172
|
+
* @param context
|
|
8173
|
+
* @param screenShotContainer
|
|
8174
|
+
* @private
|
|
8109
8175
|
*/ function initScreenShot(triggerCallback, context, screenShotContainer) {
|
|
8110
8176
|
if (triggerCallback != null) {
|
|
8111
8177
|
// 加载成功,执行回调函数
|
|
@@ -8134,8 +8200,8 @@ var ScreenShot = /*#__PURE__*/ function() {
|
|
|
8134
8200
|
|
|
8135
8201
|
var styles = modules_63b47c51$f;
|
|
8136
8202
|
var TextArea$1 = BhdEnterInput.TextArea;
|
|
8137
|
-
/*
|
|
8138
|
-
自定义remarkable的text解析规则
|
|
8203
|
+
/*
|
|
8204
|
+
自定义remarkable的text解析规则
|
|
8139
8205
|
*/ var HTML_ESCAPE_TEST_RE = /[&<>"]/;
|
|
8140
8206
|
var HTML_ESCAPE_REPLACE_RE = /[&<>"]/g;
|
|
8141
8207
|
var HTML_REPLACEMENTS = {
|
|
@@ -8153,6 +8219,25 @@ function escapeHtml(str) {
|
|
|
8153
8219
|
}
|
|
8154
8220
|
return str;
|
|
8155
8221
|
}
|
|
8222
|
+
function simpleFingerprint(str) {
|
|
8223
|
+
var result = 0;
|
|
8224
|
+
var length = str.length;
|
|
8225
|
+
for(var i = 0; i < length; i++){
|
|
8226
|
+
result = (result << 5) - result + str.charCodeAt(i);
|
|
8227
|
+
result |= 0; // 转换为32位整数
|
|
8228
|
+
}
|
|
8229
|
+
// 转换为正数并格式化为8位十六进制
|
|
8230
|
+
return (result >>> 0).toString(16).padStart(8, "0");
|
|
8231
|
+
}
|
|
8232
|
+
r.initialize({
|
|
8233
|
+
startOnLoad: false,
|
|
8234
|
+
theme: "default",
|
|
8235
|
+
securityLevel: "loose",
|
|
8236
|
+
flowchart: {
|
|
8237
|
+
htmlLabels: true,
|
|
8238
|
+
curve: "basis"
|
|
8239
|
+
}
|
|
8240
|
+
});
|
|
8156
8241
|
var CustomerService = function(props) {
|
|
8157
8242
|
var userData = props.userData, http = props.http, urllocation = props.urllocation, onCancel = props.onCancel, serverName = props.serverName, fetchEventSource = props.fetchEventSource, initShowType = props.initShowType, onEvent = props.onEvent, stepIds = props.stepIds, stepId = props.stepId, screenshotAreaId = props.screenshotAreaId, config = props.config;
|
|
8158
8243
|
// const { bese64String, startRecord, stopRecord } = useMediaRecorder(); //语音转文字
|
|
@@ -8217,9 +8302,17 @@ var CustomerService = function(props) {
|
|
|
8217
8302
|
var _useState34 = _sliced_to_array(useState(0), 2), firstItemIndex = _useState34[0], setFirstItemIndex = _useState34[1];
|
|
8218
8303
|
var _useState35 = _sliced_to_array(useState(null), 2), historyMessageListVirtuosoHeight = _useState35[0], setHistoryMessageListVirtuosoHeight = _useState35[1];
|
|
8219
8304
|
var msgStreamingCountRef = useRef(0);
|
|
8305
|
+
var isWheelRef = useRef(false);
|
|
8306
|
+
var getLisyFlagRef = useRef(0);
|
|
8307
|
+
var _useState36 = _sliced_to_array(useState(false), 2), showMemaid = _useState36[0], setShowMemaid = _useState36[1]; //是否显示mermaid弹窗
|
|
8308
|
+
var _useState37 = _sliced_to_array(useState(""), 2), memaidContent = _useState37[0], setMemaidContent = _useState37[1]; //mermaid内容
|
|
8220
8309
|
var remarkable = new Remarkable({
|
|
8221
8310
|
html: true,
|
|
8222
8311
|
highlight: function highlight(str, lang) {
|
|
8312
|
+
// 特殊处理 mermaid 代码块
|
|
8313
|
+
if (lang === "mermaid") {
|
|
8314
|
+
return str; // 不高亮 mermaid 代码
|
|
8315
|
+
}
|
|
8223
8316
|
if (lang && HighlightJS.getLanguage(lang)) {
|
|
8224
8317
|
try {
|
|
8225
8318
|
return HighlightJS.highlight(lang, str).value;
|
|
@@ -8231,6 +8324,18 @@ var CustomerService = function(props) {
|
|
|
8231
8324
|
return ""; // use external default escaping
|
|
8232
8325
|
}
|
|
8233
8326
|
});
|
|
8327
|
+
// 添加自定义规则来处理 mermaid 代码块
|
|
8328
|
+
remarkable.renderer.rules.fence_custom = {
|
|
8329
|
+
mermaid: function mermaid(tokens, idx) {
|
|
8330
|
+
var token = tokens[idx];
|
|
8331
|
+
var id = "mermaid_" + simpleFingerprint(token.content);
|
|
8332
|
+
return '<span class="'.concat(styles.maskZoomBox, '"><pre class="').concat(styles.mermaid, '">').concat(token.content, '</pre><span class="').concat(styles.zoomBox, '" onclick="openViewMemaid(\'').concat(id, '\')"><svg viewBox="64 64 896 896" focusable="false" data-icon="zoom-in" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"></path></svg></span><span style="display:none" id="').concat(id, '">').concat(token.content, "</span></span>");
|
|
8333
|
+
}
|
|
8334
|
+
};
|
|
8335
|
+
remarkable.renderer.rules.image = function(tokens, idx) {
|
|
8336
|
+
var token = tokens[idx];
|
|
8337
|
+
return '<span class="'.concat(styles.maskZoomBox, '"><img src="').concat(token.src, '" alt="').concat(token.alt, '" title="').concat(token.title, '"/><span class="').concat(styles.zoomBox, '" onclick="openViewBase64(\'').concat(token.src, '\')"><svg viewBox="64 64 896 896" focusable="false" data-icon="zoom-in" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"></path></svg></span></span>');
|
|
8338
|
+
};
|
|
8234
8339
|
var remarkReplaceKey = function(message, keyWordProblem) {
|
|
8235
8340
|
var newRemarkable = new Remarkable({
|
|
8236
8341
|
html: true,
|
|
@@ -8250,9 +8355,21 @@ var CustomerService = function(props) {
|
|
|
8250
8355
|
var text = escapeHtml(tokens[idx].content);
|
|
8251
8356
|
return text.replace(keyWordProblem, '<span class="'.concat(styles.sign, '">').concat(keyWordProblem, "</span>"));
|
|
8252
8357
|
};
|
|
8358
|
+
// 添加自定义规则来处理 mermaid 代码块
|
|
8359
|
+
newRemarkable.renderer.rules.fence_custom = {
|
|
8360
|
+
mermaid: function mermaid(tokens, idx) {
|
|
8361
|
+
var token = tokens[idx];
|
|
8362
|
+
var id = "mermaid_" + simpleFingerprint(token.content);
|
|
8363
|
+
return '<span class="'.concat(styles.maskZoomBox, '"><pre class="').concat(styles.mermaid, '">').concat(token.content, '</pre><span class="').concat(styles.zoomBox, '" onclick="openViewMemaid(\'').concat(id, '\')"><svg viewBox="64 64 896 896" focusable="false" data-icon="zoom-in" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"></path></svg></span><span style="display:none" id="').concat(id, '">').concat(token.content, "</span></span>");
|
|
8364
|
+
}
|
|
8365
|
+
};
|
|
8366
|
+
remarkable.renderer.rules.image = function(tokens, idx) {
|
|
8367
|
+
var token = tokens[idx];
|
|
8368
|
+
return '<span class="'.concat(styles.maskZoomBox, '"><img src="').concat(token.src, '" alt="').concat(token.alt, '" title="').concat(token.title, '"/><span class="').concat(styles.zoomBox, '"><svg viewBox="64 64 896 896" focusable="false" data-icon="zoom-in" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"></path></svg></span></span>');
|
|
8369
|
+
};
|
|
8253
8370
|
return newRemarkable.render(message);
|
|
8254
8371
|
};
|
|
8255
|
-
var
|
|
8372
|
+
var _useState38 = _sliced_to_array(useState(0), 2), screenShotType = _useState38[0], setScreenShotType = _useState38[1]; //1是 screenShotPlugin 2是html2canvas
|
|
8256
8373
|
var screenShotPlugin = useRef();
|
|
8257
8374
|
useEffect(function() {
|
|
8258
8375
|
// if(config && config.type == 'video'){
|
|
@@ -8403,7 +8520,10 @@ var CustomerService = function(props) {
|
|
|
8403
8520
|
}
|
|
8404
8521
|
if (showType != 1 && !firstLoad && pageCount > 0) {
|
|
8405
8522
|
setFirstLoad(true);
|
|
8406
|
-
|
|
8523
|
+
scrollToBottom();
|
|
8524
|
+
setTimeout(function() {
|
|
8525
|
+
scrollToBottom();
|
|
8526
|
+
}, 1000);
|
|
8407
8527
|
}
|
|
8408
8528
|
// function handleScroll() {
|
|
8409
8529
|
// const container = document.getElementById(
|
|
@@ -8463,6 +8583,17 @@ var CustomerService = function(props) {
|
|
|
8463
8583
|
// if (content) {
|
|
8464
8584
|
// content.addEventListener("scroll", handleScroll);
|
|
8465
8585
|
// }
|
|
8586
|
+
function openViewBase64(img) {
|
|
8587
|
+
setViewBase64(img);
|
|
8588
|
+
setVisible(true);
|
|
8589
|
+
}
|
|
8590
|
+
function openViewMemaid(id) {
|
|
8591
|
+
console.log("openViewMemaid");
|
|
8592
|
+
setMemaidContent(id);
|
|
8593
|
+
setShowMemaid(true);
|
|
8594
|
+
}
|
|
8595
|
+
window.openViewBase64 = openViewBase64;
|
|
8596
|
+
window.openViewMemaid = openViewMemaid;
|
|
8466
8597
|
return function() {
|
|
8467
8598
|
// const content = document.getElementById(
|
|
8468
8599
|
// showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal"
|
|
@@ -8472,6 +8603,8 @@ var CustomerService = function(props) {
|
|
|
8472
8603
|
// }
|
|
8473
8604
|
window.removeEventListener("resize", handlerHtml2canvas);
|
|
8474
8605
|
window.removeEventListener("resize", cancelScreenshot);
|
|
8606
|
+
window.openViewBase64 = undefined;
|
|
8607
|
+
window.openViewMemaid = undefined;
|
|
8475
8608
|
};
|
|
8476
8609
|
}, [
|
|
8477
8610
|
historyMessageList,
|
|
@@ -8481,6 +8614,12 @@ var CustomerService = function(props) {
|
|
|
8481
8614
|
]);
|
|
8482
8615
|
useEffect(function() {
|
|
8483
8616
|
historyMessageListRef.current = historyMessageList;
|
|
8617
|
+
setTimeout(function() {
|
|
8618
|
+
r.init({
|
|
8619
|
+
querySelector: ".".concat(styles.mermaid),
|
|
8620
|
+
suppressErrors: true
|
|
8621
|
+
}, ".".concat(styles.mermaid));
|
|
8622
|
+
}, 500);
|
|
8484
8623
|
}, [
|
|
8485
8624
|
historyMessageList
|
|
8486
8625
|
]);
|
|
@@ -8489,20 +8628,12 @@ var CustomerService = function(props) {
|
|
|
8489
8628
|
}, [
|
|
8490
8629
|
lastId
|
|
8491
8630
|
]);
|
|
8492
|
-
useEffect(function() {
|
|
8493
|
-
console.log("isPositionState", isPositionState, isPosition.current);
|
|
8494
|
-
}, [
|
|
8495
|
-
isPositionState
|
|
8496
|
-
]);
|
|
8497
8631
|
useEffect(function() {
|
|
8498
8632
|
resettingBottomHei();
|
|
8499
|
-
var timer = setTimeout(function() {
|
|
8500
|
-
scrollToBottom();
|
|
8501
|
-
clearTimeout(timer);
|
|
8502
|
-
}, 80);
|
|
8503
8633
|
var dom = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
|
|
8504
8634
|
if (dom) {
|
|
8505
8635
|
var hei = null;
|
|
8636
|
+
console.log("buttomHei1", buttomHei);
|
|
8506
8637
|
if (showType == 1) {
|
|
8507
8638
|
hei = window.innerHeight - 60 - buttomHei;
|
|
8508
8639
|
dom.style.maxHeight = "".concat(hei, "px");
|
|
@@ -8515,10 +8646,24 @@ var CustomerService = function(props) {
|
|
|
8515
8646
|
}
|
|
8516
8647
|
setHistoryMessageListVirtuosoHeight(hei);
|
|
8517
8648
|
}
|
|
8649
|
+
var timer = setTimeout(function() {
|
|
8650
|
+
console.log("showType", showType);
|
|
8651
|
+
scrollToBottom();
|
|
8652
|
+
clearTimeout(timer);
|
|
8653
|
+
}, 100);
|
|
8518
8654
|
}, [
|
|
8519
8655
|
buttomHei,
|
|
8520
8656
|
showType
|
|
8521
8657
|
]);
|
|
8658
|
+
useEffect(function() {
|
|
8659
|
+
var timer = setTimeout(function() {
|
|
8660
|
+
console.log("buttomHei2", historyMessageListRef.current.length);
|
|
8661
|
+
scrollToBottom();
|
|
8662
|
+
clearTimeout(timer);
|
|
8663
|
+
}, 100);
|
|
8664
|
+
}, [
|
|
8665
|
+
historyMessageListVirtuosoHeight
|
|
8666
|
+
]);
|
|
8522
8667
|
//创建聊天室并获取聊天室列表
|
|
8523
8668
|
useEffect(function() {
|
|
8524
8669
|
createRooms("AI").then(function(res) {
|
|
@@ -8537,7 +8682,7 @@ var CustomerService = function(props) {
|
|
|
8537
8682
|
}, []);
|
|
8538
8683
|
useEffect(function() {
|
|
8539
8684
|
if (roomId != "") {
|
|
8540
|
-
if (
|
|
8685
|
+
if (lastIdRef.current == "") {
|
|
8541
8686
|
getHistoryMessage(pageNum, 2);
|
|
8542
8687
|
} else {
|
|
8543
8688
|
//查看历史记录,需要定位到当前记录
|
|
@@ -8741,7 +8886,10 @@ var CustomerService = function(props) {
|
|
|
8741
8886
|
}));
|
|
8742
8887
|
return newHistoryMessageList;
|
|
8743
8888
|
});
|
|
8744
|
-
|
|
8889
|
+
var timer = setTimeout(function() {
|
|
8890
|
+
scrollToBottom();
|
|
8891
|
+
clearTimeout(timer);
|
|
8892
|
+
}, 100);
|
|
8745
8893
|
}
|
|
8746
8894
|
}
|
|
8747
8895
|
};
|
|
@@ -9536,6 +9684,13 @@ var CustomerService = function(props) {
|
|
|
9536
9684
|
//获取历史消息 flag:1,历史记录点击定位,2,代表是上拉加载,3,存在新的消息-->老师回答等,4,下拉加载,滚动到底部时,主要用于查看历史记录
|
|
9537
9685
|
var getHistoryMessage = function(pageNum, flag) {
|
|
9538
9686
|
var id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "1", raw_data = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [];
|
|
9687
|
+
console.log("buttomHei4", {
|
|
9688
|
+
flag: flag,
|
|
9689
|
+
pageNum: pageNum,
|
|
9690
|
+
id: id,
|
|
9691
|
+
raw_data: raw_data
|
|
9692
|
+
});
|
|
9693
|
+
getLisyFlagRef.current = flag;
|
|
9539
9694
|
clearTimeout(roomMessage.current);
|
|
9540
9695
|
// console.log(pageNum,flag,'dkfjvndfjvndfkvdf')
|
|
9541
9696
|
// flag == 1 时已经设置好了位置标记
|
|
@@ -9544,7 +9699,9 @@ var CustomerService = function(props) {
|
|
|
9544
9699
|
last_id = historyMessageList[0].id;
|
|
9545
9700
|
}
|
|
9546
9701
|
if (flag != 1 && last_id != "") {
|
|
9702
|
+
lastIdRef.current = last_id;
|
|
9547
9703
|
setLastId(last_id);
|
|
9704
|
+
console.log("历史定位", last_id);
|
|
9548
9705
|
}
|
|
9549
9706
|
//取消搜索页码标记
|
|
9550
9707
|
if (flag == 4 && pageNum == 1) {
|
|
@@ -9568,13 +9725,32 @@ var CustomerService = function(props) {
|
|
|
9568
9725
|
var total = res.data.total;
|
|
9569
9726
|
var maxPageSize = 30;
|
|
9570
9727
|
var dataList = res.data.messages.reverse();
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9728
|
+
// const mermaidChart = `\n\`\`\`mermaid\n%%\{init:\{'securityLevel':'loose','theme':'default','themeVariables': \{'useMaxWidth':false,'fontSize':'12px'\}\}\}%%
|
|
9729
|
+
// sequenceDiagram
|
|
9730
|
+
// actor 用户 as 用户
|
|
9731
|
+
// participant 前端 as Web/App前端
|
|
9732
|
+
// participant 后端 as 后端服务器
|
|
9733
|
+
// participant 数据库 as 数据库
|
|
9734
|
+
// 用户->>前端: 1. 输入用户名密码
|
|
9735
|
+
// 前端->>后端: 2. POST /api/login
|
|
9736
|
+
// 后端->>数据库: 3. 查询用户凭证
|
|
9737
|
+
// 数据库-->>后端: 4. 返回用户数据
|
|
9738
|
+
// alt 验证成功
|
|
9739
|
+
// 后端-->>前端: 5. 返回Token & 用户信息
|
|
9740
|
+
// 前端-->>用户: 6. 显示登录成功,跳转主页
|
|
9741
|
+
// else 验证失败
|
|
9742
|
+
// 后端-->>前端: 5. 返回错误信息
|
|
9743
|
+
// 前端-->>用户: 6. 提示“用户名或密码错误”
|
|
9744
|
+
// end\n\n\`\`\` `;
|
|
9745
|
+
// const imgTxt=`\n`
|
|
9746
|
+
// dataList[dataList.length - 1].message = mermaidChart+imgTxt;
|
|
9747
|
+
// //历史记录点击进来的,多加载一页,防止定位不准
|
|
9748
|
+
// if(flag == 1 && page > 1){
|
|
9749
|
+
// let markPage = page-1;
|
|
9750
|
+
// setPageNumHistory(markPage);
|
|
9751
|
+
// getHistoryMessage(page-1,5,'1',dataList);
|
|
9752
|
+
// return;
|
|
9753
|
+
// }
|
|
9578
9754
|
setPageCount(Math.ceil(total / maxPageSize));
|
|
9579
9755
|
setFirstItemIndex(total - maxPageSize * (page - 1));
|
|
9580
9756
|
var newHistoryMessageList = [];
|
|
@@ -9608,6 +9784,7 @@ var CustomerService = function(props) {
|
|
|
9608
9784
|
totalNumber = newHistoryMessageList.length;
|
|
9609
9785
|
return newHistoryMessageList;
|
|
9610
9786
|
});
|
|
9787
|
+
historyMessageListRef.current = newHistoryMessageList;
|
|
9611
9788
|
// console.log(lastId,'lastIdlastId-------')
|
|
9612
9789
|
//如果在跟老师的聊天窗口,用于找到与老师的最新的聊天,并不在与老师对话的窗口中,并聊天窗口相同
|
|
9613
9790
|
try {
|
|
@@ -9656,6 +9833,9 @@ var CustomerService = function(props) {
|
|
|
9656
9833
|
//&& pageNum == 1
|
|
9657
9834
|
getRoomidHistoryMessage(totalNumber, rid);
|
|
9658
9835
|
}
|
|
9836
|
+
setTimeout(function() {
|
|
9837
|
+
getLisyFlagRef.current = 0;
|
|
9838
|
+
}, 100);
|
|
9659
9839
|
}).catch(function(res) {
|
|
9660
9840
|
setLoading(false);
|
|
9661
9841
|
});
|
|
@@ -10026,28 +10206,49 @@ var CustomerService = function(props) {
|
|
|
10026
10206
|
if (!historyMessageListVirtuosoRef.current || !isPosition.current) {
|
|
10027
10207
|
return;
|
|
10028
10208
|
} else {
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10209
|
+
if (showType === 4) {
|
|
10210
|
+
var t = setTimeout(function() {
|
|
10211
|
+
historyMessageListVirtuosoRef.current.scrollIntoView({
|
|
10212
|
+
index: "LAST",
|
|
10213
|
+
align: "end",
|
|
10214
|
+
behavior: "auto",
|
|
10215
|
+
offset: 144
|
|
10216
|
+
});
|
|
10217
|
+
clearTimeout(t);
|
|
10218
|
+
}, 100);
|
|
10219
|
+
} else {
|
|
10220
|
+
historyMessageListVirtuosoRef.current.scrollToIndex({
|
|
10221
|
+
index: "LAST",
|
|
10222
|
+
align: "end",
|
|
10223
|
+
behavior: "auto",
|
|
10224
|
+
offset: 58
|
|
10225
|
+
});
|
|
10226
|
+
}
|
|
10034
10227
|
}
|
|
10035
10228
|
};
|
|
10036
10229
|
//滚动到指定位置
|
|
10037
10230
|
var scrollTo = function(id) {
|
|
10231
|
+
console.log("scrollTo", {
|
|
10232
|
+
id: id
|
|
10233
|
+
});
|
|
10234
|
+
if (id == "123456_date") {
|
|
10235
|
+
return;
|
|
10236
|
+
}
|
|
10038
10237
|
var timer = setTimeout(function() {
|
|
10039
10238
|
var index = historyMessageListRef.current.findIndex(function(x) {
|
|
10040
10239
|
return x.id === id;
|
|
10041
10240
|
});
|
|
10042
|
-
|
|
10241
|
+
console.log("scrollTo", id, index, historyMessageListRef.current);
|
|
10043
10242
|
if (index > -1) {
|
|
10044
|
-
|
|
10243
|
+
var _historyMessageListVirtuosoRef_current;
|
|
10244
|
+
(_historyMessageListVirtuosoRef_current = historyMessageListVirtuosoRef.current) === null || _historyMessageListVirtuosoRef_current === void 0 ? void 0 : _historyMessageListVirtuosoRef_current.scrollToIndex({
|
|
10045
10245
|
index: index,
|
|
10046
10246
|
align: "start",
|
|
10047
10247
|
behavior: "auto"
|
|
10048
10248
|
});
|
|
10049
10249
|
}
|
|
10050
10250
|
setLoading(false);
|
|
10251
|
+
setBottomLoading(false);
|
|
10051
10252
|
clearTimeout(timer);
|
|
10052
10253
|
}, 10);
|
|
10053
10254
|
};
|
|
@@ -10061,7 +10262,10 @@ var CustomerService = function(props) {
|
|
|
10061
10262
|
}
|
|
10062
10263
|
} else {
|
|
10063
10264
|
if (document.getElementById("Drawer_buttom_modal")) {
|
|
10064
|
-
|
|
10265
|
+
// newlabo 因为是会出现两个#BottomAssociationProblem_modal
|
|
10266
|
+
var len = document.querySelectorAll("#BottomAssociationProblem_modal").length;
|
|
10267
|
+
var dom = len > 1 ? document.querySelectorAll("#BottomAssociationProblem_modal")[1] : document.getElementById("BottomAssociationProblem_modal");
|
|
10268
|
+
var hei1 = document.getElementById("Drawer_buttom_modal").offsetHeight + dom.offsetHeight;
|
|
10065
10269
|
setButtomHei(hei1);
|
|
10066
10270
|
}
|
|
10067
10271
|
}
|
|
@@ -10265,6 +10469,7 @@ var CustomerService = function(props) {
|
|
|
10265
10469
|
var switchChatRoom = function(id, type) {
|
|
10266
10470
|
if (type != "1") {
|
|
10267
10471
|
readMessage(id, urllocation, userData, http);
|
|
10472
|
+
lastIdRef.current = "";
|
|
10268
10473
|
setLastId("");
|
|
10269
10474
|
setPageNum(1);
|
|
10270
10475
|
setPageCount(0);
|
|
@@ -10361,6 +10566,13 @@ var CustomerService = function(props) {
|
|
|
10361
10566
|
var text = "<p class='".concat(styles.copyCode, " copyCodeFun' data-id=").concat(item.id, " data-position=").concat(position, ">\n <span class='").concat(styles.icon, ' copy\' >\n <svg\n width="1em"\n height="1em"\n viewBox="0 0 14 14"\n shape-rendering="geometricPrecision"\n fill="currentColor"\n xmlns="http://www.w3.org/2000/svg"\n >\n <g clip-path="url(#clip0_518_8403)">\n <path\n d="M6.16666 1.66666H13.1667C13.4761 1.66666 13.7728 1.78957 13.9916 2.00837C14.2104 2.22716 14.3333 2.5239 14.3333 2.83332V9.83332C14.3333 10.1427 14.2104 10.4395 13.9916 10.6583C13.7728 10.8771 13.4761 11 13.1667 11H6.16666C5.85724 11 5.5605 10.8771 5.34171 10.6583C5.12291 10.4395 5 10.1427 5 9.83332V2.83332C5 2.5239 5.12291 2.22716 5.34171 2.00837C5.5605 1.78957 5.85724 1.66666 6.16666 1.66666ZM6.16666 2.66666C6.12246 2.66666 6.08007 2.68422 6.04881 2.71547C6.01756 2.74673 6 2.78912 6 2.83332V9.83332C6 9.85521 6.00431 9.87688 6.01268 9.8971C6.02106 9.91732 6.03334 9.9357 6.04881 9.95117C6.06429 9.96665 6.08266 9.97893 6.10288 9.9873C6.1231 9.99568 6.14478 9.99999 6.16666 9.99999H13.1667C13.2109 9.99999 13.2533 9.98243 13.2845 9.95117C13.3158 9.91992 13.3333 9.87753 13.3333 9.83332V2.83332C13.3333 2.78912 13.3158 2.74673 13.2845 2.71547C13.2533 2.68422 13.2109 2.66666 13.1667 2.66666H6.16666ZM10 12C10 11.8674 10.0527 11.7402 10.1464 11.6464C10.2402 11.5527 10.3674 11.5 10.5 11.5C10.6326 11.5 10.7598 11.5527 10.8536 11.6464C10.9473 11.7402 11 11.8674 11 12V13.1667C11 13.4761 10.8771 13.7728 10.6583 13.9916C10.4395 14.2104 10.1427 14.3333 9.83333 14.3333H2.83333C2.52391 14.3333 2.22717 14.2104 2.00837 13.9916C1.78958 13.7728 1.66666 13.4761 1.66666 13.1667V6.16666C1.66666 5.85724 1.78958 5.56049 2.00837 5.3417C2.22717 5.12291 2.52391 4.99999 2.83333 4.99999H4C4.13261 4.99999 4.25978 5.05267 4.35355 5.14644C4.44732 5.2402 4.5 5.36738 4.5 5.49999C4.5 5.6326 4.44732 5.75978 4.35355 5.85354C4.25978 5.94731 4.13261 5.99999 4 5.99999H2.83333C2.78913 5.99999 2.74674 6.01755 2.71548 6.04881C2.68422 6.08006 2.66666 6.12245 2.66666 6.16666V13.1667C2.66666 13.2109 2.68422 13.2533 2.71548 13.2845C2.74674 13.3158 2.78913 13.3333 2.83333 13.3333H9.83333C9.87753 13.3333 9.91993 13.3158 9.95118 13.2845C9.98244 13.2533 10 13.2109 10 13.1667V12Z"\n />\n </g>\n <defs>\n <clipPath id="clip0_518_8403">\n <rect width="16" height="16" />\n </clipPath>\n </defs>\n </svg>\n </span>\n <span class=\'').concat(styles.icon, ' copy_success_flag\'>\n <svg\n width="1em"\n height="1em"\n shape-rendering="geometricPrecision"\n fill="currentColor"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path d="M11.2242 0.375687C11.4586 0.610002 11.4586 0.989901 11.2242 1.22422L4.82424 7.62422C4.58992 7.85853 4.21003 7.85853 3.97571 7.62422L0.775712 4.42422C0.541397 4.1899 0.541397 3.81 0.775712 3.57569C1.01003 3.34137 1.38993 3.34137 1.62424 3.57569L4.39998 6.35142L10.3757 0.375687C10.61 0.141373 10.9899 0.141373 11.2242 0.375687Z" />\n </svg>\n </span><span class="copyCode">复制代码</span></p><pre');
|
|
10362
10567
|
return text;
|
|
10363
10568
|
});
|
|
10569
|
+
// message = message.replaceAll(
|
|
10570
|
+
// new RegExp(`<img`, "ig"),
|
|
10571
|
+
// (i: any, index: any) => {
|
|
10572
|
+
// let text = `<div class='${styles.a}'><img`;
|
|
10573
|
+
// return text;
|
|
10574
|
+
// }
|
|
10575
|
+
// );
|
|
10364
10576
|
if (item.sender == mid) {
|
|
10365
10577
|
//只有引用和复制功能
|
|
10366
10578
|
li = /*#__PURE__*/ jsxs(Fragment, {
|
|
@@ -10563,10 +10775,8 @@ var CustomerService = function(props) {
|
|
|
10563
10775
|
// onMouseEnter方法内:判断回答内容的气泡是否在可视区域内,动态判断点赞按钮显示的上下位置
|
|
10564
10776
|
var isSmall = showType == 1 || showType == 3;
|
|
10565
10777
|
var container = document.getElementById(isSmall ? "chat_content" : "chat_content_modal");
|
|
10566
|
-
console.log("onMouseEnter1", container);
|
|
10567
10778
|
if (container) {
|
|
10568
10779
|
var dom = container.querySelector('[id="'.concat(item.id, '"]'));
|
|
10569
|
-
console.log("onMouseEnter2", dom);
|
|
10570
10780
|
if (dom) {
|
|
10571
10781
|
// const con_h=document.getElementById('chat_content').clientHeight-24;//滚动区域的高度
|
|
10572
10782
|
var con_h = container.clientHeight - (isSmall ? 24 : 0); //滚动区域的高度;
|
|
@@ -10574,14 +10784,6 @@ var CustomerService = function(props) {
|
|
|
10574
10784
|
var h = dom.clientHeight + (isSmall ? 24 : 0); //当前元素高度
|
|
10575
10785
|
var topDom = dom.getElementsByClassName(styles.operate_modal_showtop)[0];
|
|
10576
10786
|
var bottomDom = dom.getElementsByClassName(styles.operate_modal_showbottom)[0];
|
|
10577
|
-
console.log("onMouseEnter3", topDom, bottomDom);
|
|
10578
|
-
console.log("onMouseEnter4", {
|
|
10579
|
-
h: h,
|
|
10580
|
-
con_h: con_h,
|
|
10581
|
-
rectY: rectY,
|
|
10582
|
-
topDom: topDom,
|
|
10583
|
-
bottomDom: bottomDom
|
|
10584
|
-
});
|
|
10585
10787
|
if (topDom && bottomDom) {
|
|
10586
10788
|
if (rectY > 0) {
|
|
10587
10789
|
//显示上边
|
|
@@ -10765,6 +10967,18 @@ var CustomerService = function(props) {
|
|
|
10765
10967
|
children: li
|
|
10766
10968
|
}, item.id);
|
|
10767
10969
|
}
|
|
10970
|
+
// return (
|
|
10971
|
+
// <pre className={`${styles.mermaid}`}>
|
|
10972
|
+
// {`graph TD
|
|
10973
|
+
// A[开始] --> B[步骤1]
|
|
10974
|
+
// B --> C{条件判断}
|
|
10975
|
+
// C -- 是 --> D[步骤2]
|
|
10976
|
+
// C -- 否 --> E[步骤3]
|
|
10977
|
+
// D --> F[结束]
|
|
10978
|
+
// E --> F
|
|
10979
|
+
// `}
|
|
10980
|
+
// </pre>
|
|
10981
|
+
// )
|
|
10768
10982
|
return /*#__PURE__*/ jsx("ul", {
|
|
10769
10983
|
className: styles.message_con,
|
|
10770
10984
|
style: {
|
|
@@ -10778,45 +10992,100 @@ var CustomerService = function(props) {
|
|
|
10778
10992
|
style: {
|
|
10779
10993
|
height: "100%"
|
|
10780
10994
|
},
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10995
|
+
initialTopMostItemIndex: !finished && isPositionState ? undefined : {
|
|
10996
|
+
index: "LAST",
|
|
10997
|
+
align: "end",
|
|
10998
|
+
offset: showType === 3 ? 58 : showType === 4 ? 144 : 58
|
|
10999
|
+
},
|
|
11000
|
+
itemsRendered: function() {
|
|
11001
|
+
var t = setTimeout(function() {
|
|
11002
|
+
r.init({
|
|
11003
|
+
querySelector: ".".concat(styles.mermaid),
|
|
11004
|
+
suppressErrors: true
|
|
11005
|
+
}, ".".concat(styles.mermaid));
|
|
11006
|
+
clearTimeout(t);
|
|
11007
|
+
}, 100);
|
|
11008
|
+
},
|
|
11009
|
+
// startReached={(index) => {
|
|
11010
|
+
// console.log('atTopStateChange-startReached',index,lastIdRef.current)
|
|
11011
|
+
// if (pageCount > pageNum && pageCount > 0&& !loading&&lastIdRef.current=='') {
|
|
11012
|
+
// let number = pageNum + 1;
|
|
11013
|
+
// setPageNum((pageNum) => {
|
|
11014
|
+
// return pageNum + 1;
|
|
11015
|
+
// });
|
|
11016
|
+
// setLoading(true);
|
|
11017
|
+
// listTimer.current = setTimeout(() => {
|
|
11018
|
+
// getHistoryMessage(number, 2);
|
|
11019
|
+
// lastIdRef.current = "";
|
|
11020
|
+
// setLastId("");
|
|
11021
|
+
// }, 1000);
|
|
11022
|
+
// }
|
|
11023
|
+
// }}
|
|
11024
|
+
atTopStateChange: function(atTop) {
|
|
11025
|
+
// 判断是否滚动到顶部
|
|
11026
|
+
console.log("StateChange-atTopStateChange", {
|
|
11027
|
+
pageCount: pageCount,
|
|
11028
|
+
pageNum: pageNum
|
|
11029
|
+
}, getLisyFlagRef.current);
|
|
11030
|
+
if (atTop && pageCount > pageNum && pageCount > 0 && getLisyFlagRef.current != 1 && getLisyFlagRef.current != 4) {
|
|
10784
11031
|
var number = pageNum + 1;
|
|
10785
11032
|
setPageNum(function(pageNum) {
|
|
10786
11033
|
return pageNum + 1;
|
|
10787
11034
|
});
|
|
10788
11035
|
setLoading(true);
|
|
11036
|
+
setBottomLoading(false);
|
|
10789
11037
|
listTimer.current = setTimeout(function() {
|
|
10790
11038
|
getHistoryMessage(number, 2);
|
|
10791
|
-
},
|
|
11039
|
+
}, 100);
|
|
10792
11040
|
}
|
|
10793
11041
|
},
|
|
10794
|
-
endReached
|
|
10795
|
-
|
|
11042
|
+
// endReached={(index) => {
|
|
11043
|
+
// console.log('endReached',pageNumHistory,lastIdRef.current)
|
|
11044
|
+
// if (pageNumHistory > 1&&lastIdRef.current=='') {
|
|
11045
|
+
// let number = pageNumHistory - 1;
|
|
11046
|
+
// setPageNumHistory(number);
|
|
11047
|
+
// clearTimeout(listTimer.current);
|
|
11048
|
+
// listTimer.current = setTimeout(() => {
|
|
11049
|
+
// if (number > 0) {
|
|
11050
|
+
// setBottomLoading(true);
|
|
11051
|
+
// getHistoryMessage(number, 4);
|
|
11052
|
+
// lastIdRef.current = "";
|
|
11053
|
+
// setLastId("");
|
|
11054
|
+
// } else {
|
|
11055
|
+
// setPageNumHistory(0);
|
|
11056
|
+
// }
|
|
11057
|
+
// }, 1000);
|
|
11058
|
+
// }
|
|
11059
|
+
// }}
|
|
11060
|
+
atBottomStateChange: function(atBottom) {
|
|
11061
|
+
console.log("StateChange-atBottomStateChange", pageNumHistory, getLisyFlagRef.current);
|
|
11062
|
+
if (atBottom && pageNumHistory > 1 && getLisyFlagRef.current != 1) {
|
|
10796
11063
|
var number = pageNumHistory - 1;
|
|
10797
11064
|
setPageNumHistory(number);
|
|
10798
11065
|
clearTimeout(listTimer.current);
|
|
10799
11066
|
listTimer.current = setTimeout(function() {
|
|
10800
11067
|
if (number > 0) {
|
|
10801
11068
|
setBottomLoading(true);
|
|
11069
|
+
setLoading(false);
|
|
10802
11070
|
getHistoryMessage(number, 4);
|
|
11071
|
+
lastIdRef.current = "";
|
|
10803
11072
|
setLastId("");
|
|
10804
11073
|
} else {
|
|
10805
11074
|
setPageNumHistory(0);
|
|
10806
11075
|
}
|
|
10807
|
-
},
|
|
11076
|
+
}, 100);
|
|
10808
11077
|
}
|
|
10809
11078
|
},
|
|
10810
|
-
context
|
|
10811
|
-
loading: loading
|
|
10812
|
-
},
|
|
11079
|
+
// context={{ loading }}
|
|
10813
11080
|
firstItemIndex: firstItemIndex,
|
|
10814
|
-
increaseViewportBy: 200,
|
|
10815
|
-
overscan: 10,
|
|
10816
11081
|
logLevel: 0,
|
|
11082
|
+
overscan: {
|
|
11083
|
+
main: 500,
|
|
11084
|
+
reverse: 200
|
|
11085
|
+
},
|
|
10817
11086
|
onScroll: function(e) {
|
|
10818
11087
|
//生成答案过程中
|
|
10819
|
-
if (!finishedRef.current) {
|
|
11088
|
+
if (!finishedRef.current && isWheelRef.current) {
|
|
10820
11089
|
var _container, _container1, _container2;
|
|
10821
11090
|
var container = e.target;
|
|
10822
11091
|
var _container_scrollTop;
|
|
@@ -10835,6 +11104,7 @@ var CustomerService = function(props) {
|
|
|
10835
11104
|
isPosition.current = true;
|
|
10836
11105
|
setIsPositionState(true);
|
|
10837
11106
|
}
|
|
11107
|
+
isWheelRef.current = false;
|
|
10838
11108
|
console.log("Scroll-onScroll", {
|
|
10839
11109
|
container: container,
|
|
10840
11110
|
scrollTop: scrollTop,
|
|
@@ -10843,6 +11113,11 @@ var CustomerService = function(props) {
|
|
|
10843
11113
|
isPosition: isPosition.current
|
|
10844
11114
|
});
|
|
10845
11115
|
}
|
|
11116
|
+
},
|
|
11117
|
+
onWheel: function() {
|
|
11118
|
+
if (!finishedRef.current) {
|
|
11119
|
+
isWheelRef.current = true;
|
|
11120
|
+
}
|
|
10846
11121
|
}
|
|
10847
11122
|
})
|
|
10848
11123
|
});
|
|
@@ -11640,6 +11915,7 @@ var CustomerService = function(props) {
|
|
|
11640
11915
|
if (page != 1) {
|
|
11641
11916
|
setPageNumHistory(page);
|
|
11642
11917
|
}
|
|
11918
|
+
lastIdRef.current = id;
|
|
11643
11919
|
setLastId(id); //用于定位
|
|
11644
11920
|
setPageNum(page);
|
|
11645
11921
|
//如果是当前聊天室
|
|
@@ -12214,6 +12490,14 @@ var CustomerService = function(props) {
|
|
|
12214
12490
|
resolve(viewBase64);
|
|
12215
12491
|
});
|
|
12216
12492
|
}
|
|
12493
|
+
}),
|
|
12494
|
+
showMemaid && memaidContent && /*#__PURE__*/ jsx(ViewMemaid, {
|
|
12495
|
+
visible: showMemaid,
|
|
12496
|
+
onCancel: function() {
|
|
12497
|
+
return setShowMemaid(false);
|
|
12498
|
+
},
|
|
12499
|
+
className: "",
|
|
12500
|
+
content: memaidContent
|
|
12217
12501
|
})
|
|
12218
12502
|
]
|
|
12219
12503
|
});
|
|
@@ -14532,20 +14816,17 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
14532
14816
|
setDataSource(function(data) {
|
|
14533
14817
|
return _to_consumable_array(data).concat(_to_consumable_array(list));
|
|
14534
14818
|
});
|
|
14535
|
-
setFirstItemIndex(function(num) {
|
|
14536
|
-
return num + 1;
|
|
14537
|
-
});
|
|
14538
|
-
// timerRef.current.scrollTimer = setTimeout(() => {
|
|
14539
14819
|
scrollToBottom();
|
|
14540
|
-
// }, 100);
|
|
14541
14820
|
};
|
|
14542
14821
|
var scrollToBottom = function() {
|
|
14543
14822
|
if (!virtuosoRef.current || !autoScrollBottom.current) return;
|
|
14544
|
-
|
|
14545
|
-
|
|
14546
|
-
|
|
14547
|
-
|
|
14548
|
-
|
|
14823
|
+
timerRef.current.scrollTimer = setTimeout(function() {
|
|
14824
|
+
virtuosoRef.current.scrollToIndex({
|
|
14825
|
+
index: "LAST",
|
|
14826
|
+
align: "end",
|
|
14827
|
+
behavior: "auto"
|
|
14828
|
+
});
|
|
14829
|
+
}, 100);
|
|
14549
14830
|
};
|
|
14550
14831
|
var getData = function(page, pageSize) {
|
|
14551
14832
|
setLoading(true);
|