bhd-components 0.10.31 → 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 +540 -256
- 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 +33 -33
- 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.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
|
@@ -28,6 +28,8 @@ import { parseDate } from "../utils/Date";
|
|
|
28
28
|
import { Remarkable } from "remarkable";
|
|
29
29
|
import hljs from "highlight.js";
|
|
30
30
|
import "highlight.js/styles/github.css";
|
|
31
|
+
import mermaid from "mermaid";
|
|
32
|
+
import ViewMemaid from "./viewMemaid";
|
|
31
33
|
import { render } from "react-dom";
|
|
32
34
|
import Provider from "../provider";
|
|
33
35
|
var TextArea = Input.TextArea;
|
|
@@ -38,8 +40,8 @@ import { readMessage, getByteLen, serverUrl, copyText, getDataTime, getQuery, re
|
|
|
38
40
|
// import html2canvas from "html2canvas";
|
|
39
41
|
// const screenShot = require('./screenShotPlugin.esm')
|
|
40
42
|
import ScreenShot from "./js-screen-shot/main";
|
|
41
|
-
/*
|
|
42
|
-
自定义remarkable的text解析规则
|
|
43
|
+
/*
|
|
44
|
+
自定义remarkable的text解析规则
|
|
43
45
|
*/ var HTML_ESCAPE_TEST_RE = /[&<>"]/;
|
|
44
46
|
var HTML_ESCAPE_REPLACE_RE = /[&<>"]/g;
|
|
45
47
|
var HTML_REPLACEMENTS = {
|
|
@@ -57,6 +59,25 @@ function escapeHtml(str) {
|
|
|
57
59
|
}
|
|
58
60
|
return str;
|
|
59
61
|
}
|
|
62
|
+
function simpleFingerprint(str) {
|
|
63
|
+
var result = 0;
|
|
64
|
+
var length = str.length;
|
|
65
|
+
for(var i = 0; i < length; i++){
|
|
66
|
+
result = (result << 5) - result + str.charCodeAt(i);
|
|
67
|
+
result |= 0; // 转换为32位整数
|
|
68
|
+
}
|
|
69
|
+
// 转换为正数并格式化为8位十六进制
|
|
70
|
+
return (result >>> 0).toString(16).padStart(8, "0");
|
|
71
|
+
}
|
|
72
|
+
mermaid.initialize({
|
|
73
|
+
startOnLoad: false,
|
|
74
|
+
theme: "default",
|
|
75
|
+
securityLevel: "loose",
|
|
76
|
+
flowchart: {
|
|
77
|
+
htmlLabels: true,
|
|
78
|
+
curve: "basis"
|
|
79
|
+
}
|
|
80
|
+
});
|
|
60
81
|
var CustomerService = function(props) {
|
|
61
82
|
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;
|
|
62
83
|
// const { bese64String, startRecord, stopRecord } = useMediaRecorder(); //语音转文字
|
|
@@ -121,9 +142,17 @@ var CustomerService = function(props) {
|
|
|
121
142
|
var _useState34 = _sliced_to_array(useState(0), 2), firstItemIndex = _useState34[0], setFirstItemIndex = _useState34[1];
|
|
122
143
|
var _useState35 = _sliced_to_array(useState(null), 2), historyMessageListVirtuosoHeight = _useState35[0], setHistoryMessageListVirtuosoHeight = _useState35[1];
|
|
123
144
|
var msgStreamingCountRef = useRef(0);
|
|
145
|
+
var isWheelRef = useRef(false);
|
|
146
|
+
var getLisyFlagRef = useRef(0);
|
|
147
|
+
var _useState36 = _sliced_to_array(useState(false), 2), showMemaid = _useState36[0], setShowMemaid = _useState36[1]; //是否显示mermaid弹窗
|
|
148
|
+
var _useState37 = _sliced_to_array(useState(""), 2), memaidContent = _useState37[0], setMemaidContent = _useState37[1]; //mermaid内容
|
|
124
149
|
var remarkable = new Remarkable({
|
|
125
150
|
html: true,
|
|
126
151
|
highlight: function highlight(str, lang) {
|
|
152
|
+
// 特殊处理 mermaid 代码块
|
|
153
|
+
if (lang === "mermaid") {
|
|
154
|
+
return str; // 不高亮 mermaid 代码
|
|
155
|
+
}
|
|
127
156
|
if (lang && hljs.getLanguage(lang)) {
|
|
128
157
|
try {
|
|
129
158
|
return hljs.highlight(lang, str).value;
|
|
@@ -135,6 +164,18 @@ var CustomerService = function(props) {
|
|
|
135
164
|
return ""; // use external default escaping
|
|
136
165
|
}
|
|
137
166
|
});
|
|
167
|
+
// 添加自定义规则来处理 mermaid 代码块
|
|
168
|
+
remarkable.renderer.rules.fence_custom = {
|
|
169
|
+
mermaid: function mermaid(tokens, idx) {
|
|
170
|
+
var token = tokens[idx];
|
|
171
|
+
var id = "mermaid_" + simpleFingerprint(token.content);
|
|
172
|
+
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>");
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
remarkable.renderer.rules.image = function(tokens, idx) {
|
|
176
|
+
var token = tokens[idx];
|
|
177
|
+
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>');
|
|
178
|
+
};
|
|
138
179
|
var remarkReplaceKey = function(message, keyWordProblem) {
|
|
139
180
|
var newRemarkable = new Remarkable({
|
|
140
181
|
html: true,
|
|
@@ -154,9 +195,21 @@ var CustomerService = function(props) {
|
|
|
154
195
|
var text = escapeHtml(tokens[idx].content);
|
|
155
196
|
return text.replace(keyWordProblem, '<span class="'.concat(styles.sign, '">').concat(keyWordProblem, "</span>"));
|
|
156
197
|
};
|
|
198
|
+
// 添加自定义规则来处理 mermaid 代码块
|
|
199
|
+
newRemarkable.renderer.rules.fence_custom = {
|
|
200
|
+
mermaid: function mermaid(tokens, idx) {
|
|
201
|
+
var token = tokens[idx];
|
|
202
|
+
var id = "mermaid_" + simpleFingerprint(token.content);
|
|
203
|
+
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>");
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
remarkable.renderer.rules.image = function(tokens, idx) {
|
|
207
|
+
var token = tokens[idx];
|
|
208
|
+
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>');
|
|
209
|
+
};
|
|
157
210
|
return newRemarkable.render(message);
|
|
158
211
|
};
|
|
159
|
-
var
|
|
212
|
+
var _useState38 = _sliced_to_array(useState(0), 2), screenShotType = _useState38[0], setScreenShotType = _useState38[1]; //1是 screenShotPlugin 2是html2canvas
|
|
160
213
|
var screenShotPlugin = useRef();
|
|
161
214
|
useEffect(function() {
|
|
162
215
|
// if(config && config.type == 'video'){
|
|
@@ -299,17 +352,7 @@ var CustomerService = function(props) {
|
|
|
299
352
|
screenShotPlugin.current.destroyComponents();
|
|
300
353
|
}
|
|
301
354
|
};
|
|
302
|
-
|
|
303
|
-
if (showType == 5 || showScreenshot) {
|
|
304
|
-
// console.log("bbbbbbbbbbbbbb");
|
|
305
|
-
handlerHtml2canvas();
|
|
306
|
-
// window.addEventListener('resize',handlerHtml2canvas)
|
|
307
|
-
}
|
|
308
|
-
if (showType != 1 && !firstLoad && pageCount > 0) {
|
|
309
|
-
setFirstLoad(true);
|
|
310
|
-
// scrollToBottom();
|
|
311
|
-
}
|
|
312
|
-
// function handleScroll() {
|
|
355
|
+
var openViewBase64 = // function handleScroll() {
|
|
313
356
|
// const container = document.getElementById(
|
|
314
357
|
// showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal"
|
|
315
358
|
// );
|
|
@@ -367,6 +410,30 @@ var CustomerService = function(props) {
|
|
|
367
410
|
// if (content) {
|
|
368
411
|
// content.addEventListener("scroll", handleScroll);
|
|
369
412
|
// }
|
|
413
|
+
function openViewBase64(img) {
|
|
414
|
+
setViewBase64(img);
|
|
415
|
+
setVisible(true);
|
|
416
|
+
};
|
|
417
|
+
var openViewMemaid = function openViewMemaid(id) {
|
|
418
|
+
console.log("openViewMemaid");
|
|
419
|
+
setMemaidContent(id);
|
|
420
|
+
setShowMemaid(true);
|
|
421
|
+
};
|
|
422
|
+
//|| showScreenshot
|
|
423
|
+
if (showType == 5 || showScreenshot) {
|
|
424
|
+
// console.log("bbbbbbbbbbbbbb");
|
|
425
|
+
handlerHtml2canvas();
|
|
426
|
+
// window.addEventListener('resize',handlerHtml2canvas)
|
|
427
|
+
}
|
|
428
|
+
if (showType != 1 && !firstLoad && pageCount > 0) {
|
|
429
|
+
setFirstLoad(true);
|
|
430
|
+
scrollToBottom();
|
|
431
|
+
setTimeout(function() {
|
|
432
|
+
scrollToBottom();
|
|
433
|
+
}, 1000);
|
|
434
|
+
}
|
|
435
|
+
window.openViewBase64 = openViewBase64;
|
|
436
|
+
window.openViewMemaid = openViewMemaid;
|
|
370
437
|
return function() {
|
|
371
438
|
// const content = document.getElementById(
|
|
372
439
|
// showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal"
|
|
@@ -376,6 +443,8 @@ var CustomerService = function(props) {
|
|
|
376
443
|
// }
|
|
377
444
|
window.removeEventListener("resize", handlerHtml2canvas);
|
|
378
445
|
window.removeEventListener("resize", cancelScreenshot);
|
|
446
|
+
window.openViewBase64 = undefined;
|
|
447
|
+
window.openViewMemaid = undefined;
|
|
379
448
|
};
|
|
380
449
|
}, [
|
|
381
450
|
historyMessageList,
|
|
@@ -385,6 +454,12 @@ var CustomerService = function(props) {
|
|
|
385
454
|
]);
|
|
386
455
|
useEffect(function() {
|
|
387
456
|
historyMessageListRef.current = historyMessageList;
|
|
457
|
+
setTimeout(function() {
|
|
458
|
+
mermaid.init({
|
|
459
|
+
querySelector: ".".concat(styles.mermaid),
|
|
460
|
+
suppressErrors: true
|
|
461
|
+
}, ".".concat(styles.mermaid));
|
|
462
|
+
}, 500);
|
|
388
463
|
}, [
|
|
389
464
|
historyMessageList
|
|
390
465
|
]);
|
|
@@ -393,20 +468,12 @@ var CustomerService = function(props) {
|
|
|
393
468
|
}, [
|
|
394
469
|
lastId
|
|
395
470
|
]);
|
|
396
|
-
useEffect(function() {
|
|
397
|
-
console.log("isPositionState", isPositionState, isPosition.current);
|
|
398
|
-
}, [
|
|
399
|
-
isPositionState
|
|
400
|
-
]);
|
|
401
471
|
useEffect(function() {
|
|
402
472
|
resettingBottomHei();
|
|
403
|
-
var timer = setTimeout(function() {
|
|
404
|
-
scrollToBottom();
|
|
405
|
-
clearTimeout(timer);
|
|
406
|
-
}, 80);
|
|
407
473
|
var dom = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
|
|
408
474
|
if (dom) {
|
|
409
475
|
var hei = null;
|
|
476
|
+
console.log("buttomHei1", buttomHei);
|
|
410
477
|
if (showType == 1) {
|
|
411
478
|
hei = window.innerHeight - 60 - buttomHei;
|
|
412
479
|
dom.style.maxHeight = "".concat(hei, "px");
|
|
@@ -419,10 +486,24 @@ var CustomerService = function(props) {
|
|
|
419
486
|
}
|
|
420
487
|
setHistoryMessageListVirtuosoHeight(hei);
|
|
421
488
|
}
|
|
489
|
+
var timer = setTimeout(function() {
|
|
490
|
+
console.log("showType", showType);
|
|
491
|
+
scrollToBottom();
|
|
492
|
+
clearTimeout(timer);
|
|
493
|
+
}, 100);
|
|
422
494
|
}, [
|
|
423
495
|
buttomHei,
|
|
424
496
|
showType
|
|
425
497
|
]);
|
|
498
|
+
useEffect(function() {
|
|
499
|
+
var timer = setTimeout(function() {
|
|
500
|
+
console.log("buttomHei2", historyMessageListRef.current.length);
|
|
501
|
+
scrollToBottom();
|
|
502
|
+
clearTimeout(timer);
|
|
503
|
+
}, 100);
|
|
504
|
+
}, [
|
|
505
|
+
historyMessageListVirtuosoHeight
|
|
506
|
+
]);
|
|
426
507
|
//创建聊天室并获取聊天室列表
|
|
427
508
|
useEffect(function() {
|
|
428
509
|
createRooms("AI").then(function(res) {
|
|
@@ -441,7 +522,7 @@ var CustomerService = function(props) {
|
|
|
441
522
|
}, []);
|
|
442
523
|
useEffect(function() {
|
|
443
524
|
if (roomId != "") {
|
|
444
|
-
if (
|
|
525
|
+
if (lastIdRef.current == "") {
|
|
445
526
|
getHistoryMessage(pageNum, 2);
|
|
446
527
|
} else {
|
|
447
528
|
//查看历史记录,需要定位到当前记录
|
|
@@ -645,7 +726,10 @@ var CustomerService = function(props) {
|
|
|
645
726
|
}));
|
|
646
727
|
return newHistoryMessageList;
|
|
647
728
|
});
|
|
648
|
-
|
|
729
|
+
var timer = setTimeout(function() {
|
|
730
|
+
scrollToBottom();
|
|
731
|
+
clearTimeout(timer);
|
|
732
|
+
}, 100);
|
|
649
733
|
}
|
|
650
734
|
}
|
|
651
735
|
};
|
|
@@ -1442,6 +1526,13 @@ var CustomerService = function(props) {
|
|
|
1442
1526
|
//获取历史消息 flag:1,历史记录点击定位,2,代表是上拉加载,3,存在新的消息-->老师回答等,4,下拉加载,滚动到底部时,主要用于查看历史记录
|
|
1443
1527
|
var getHistoryMessage = function(pageNum, flag) {
|
|
1444
1528
|
var id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "1", raw_data = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [];
|
|
1529
|
+
console.log("buttomHei4", {
|
|
1530
|
+
flag: flag,
|
|
1531
|
+
pageNum: pageNum,
|
|
1532
|
+
id: id,
|
|
1533
|
+
raw_data: raw_data
|
|
1534
|
+
});
|
|
1535
|
+
getLisyFlagRef.current = flag;
|
|
1445
1536
|
clearTimeout(roomMessage.current);
|
|
1446
1537
|
// console.log(pageNum,flag,'dkfjvndfjvndfkvdf')
|
|
1447
1538
|
// flag == 1 时已经设置好了位置标记
|
|
@@ -1450,7 +1541,9 @@ var CustomerService = function(props) {
|
|
|
1450
1541
|
last_id = historyMessageList[0].id;
|
|
1451
1542
|
}
|
|
1452
1543
|
if (flag != 1 && last_id != "") {
|
|
1544
|
+
lastIdRef.current = last_id;
|
|
1453
1545
|
setLastId(last_id);
|
|
1546
|
+
console.log("历史定位", last_id);
|
|
1454
1547
|
}
|
|
1455
1548
|
//取消搜索页码标记
|
|
1456
1549
|
if (flag == 4 && pageNum == 1) {
|
|
@@ -1474,13 +1567,32 @@ var CustomerService = function(props) {
|
|
|
1474
1567
|
var total = res.data.total;
|
|
1475
1568
|
var maxPageSize = 30;
|
|
1476
1569
|
var dataList = res.data.messages.reverse();
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1570
|
+
// const mermaidChart = `\n\`\`\`mermaid\n%%\{init:\{'securityLevel':'loose','theme':'default','themeVariables': \{'useMaxWidth':false,'fontSize':'12px'\}\}\}%%
|
|
1571
|
+
// sequenceDiagram
|
|
1572
|
+
// actor 用户 as 用户
|
|
1573
|
+
// participant 前端 as Web/App前端
|
|
1574
|
+
// participant 后端 as 后端服务器
|
|
1575
|
+
// participant 数据库 as 数据库
|
|
1576
|
+
// 用户->>前端: 1. 输入用户名密码
|
|
1577
|
+
// 前端->>后端: 2. POST /api/login
|
|
1578
|
+
// 后端->>数据库: 3. 查询用户凭证
|
|
1579
|
+
// 数据库-->>后端: 4. 返回用户数据
|
|
1580
|
+
// alt 验证成功
|
|
1581
|
+
// 后端-->>前端: 5. 返回Token & 用户信息
|
|
1582
|
+
// 前端-->>用户: 6. 显示登录成功,跳转主页
|
|
1583
|
+
// else 验证失败
|
|
1584
|
+
// 后端-->>前端: 5. 返回错误信息
|
|
1585
|
+
// 前端-->>用户: 6. 提示“用户名或密码错误”
|
|
1586
|
+
// end\n\n\`\`\` `;
|
|
1587
|
+
// const imgTxt=`\n`
|
|
1588
|
+
// dataList[dataList.length - 1].message = mermaidChart+imgTxt;
|
|
1589
|
+
// //历史记录点击进来的,多加载一页,防止定位不准
|
|
1590
|
+
// if(flag == 1 && page > 1){
|
|
1591
|
+
// let markPage = page-1;
|
|
1592
|
+
// setPageNumHistory(markPage);
|
|
1593
|
+
// getHistoryMessage(page-1,5,'1',dataList);
|
|
1594
|
+
// return;
|
|
1595
|
+
// }
|
|
1484
1596
|
setPageCount(Math.ceil(total / maxPageSize));
|
|
1485
1597
|
setFirstItemIndex(total - maxPageSize * (page - 1));
|
|
1486
1598
|
var newHistoryMessageList = [];
|
|
@@ -1514,6 +1626,7 @@ var CustomerService = function(props) {
|
|
|
1514
1626
|
totalNumber = newHistoryMessageList.length;
|
|
1515
1627
|
return newHistoryMessageList;
|
|
1516
1628
|
});
|
|
1629
|
+
historyMessageListRef.current = newHistoryMessageList;
|
|
1517
1630
|
// console.log(lastId,'lastIdlastId-------')
|
|
1518
1631
|
//如果在跟老师的聊天窗口,用于找到与老师的最新的聊天,并不在与老师对话的窗口中,并聊天窗口相同
|
|
1519
1632
|
try {
|
|
@@ -1562,6 +1675,9 @@ var CustomerService = function(props) {
|
|
|
1562
1675
|
//&& pageNum == 1
|
|
1563
1676
|
getRoomidHistoryMessage(totalNumber, rid);
|
|
1564
1677
|
}
|
|
1678
|
+
setTimeout(function() {
|
|
1679
|
+
getLisyFlagRef.current = 0;
|
|
1680
|
+
}, 100);
|
|
1565
1681
|
}).catch(function(res) {
|
|
1566
1682
|
setLoading(false);
|
|
1567
1683
|
});
|
|
@@ -1932,28 +2048,49 @@ var CustomerService = function(props) {
|
|
|
1932
2048
|
if (!historyMessageListVirtuosoRef.current || !isPosition.current) {
|
|
1933
2049
|
return;
|
|
1934
2050
|
} else {
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
2051
|
+
if (showType === 4) {
|
|
2052
|
+
var t = setTimeout(function() {
|
|
2053
|
+
historyMessageListVirtuosoRef.current.scrollIntoView({
|
|
2054
|
+
index: "LAST",
|
|
2055
|
+
align: "end",
|
|
2056
|
+
behavior: "auto",
|
|
2057
|
+
offset: 144
|
|
2058
|
+
});
|
|
2059
|
+
clearTimeout(t);
|
|
2060
|
+
}, 100);
|
|
2061
|
+
} else {
|
|
2062
|
+
historyMessageListVirtuosoRef.current.scrollToIndex({
|
|
2063
|
+
index: "LAST",
|
|
2064
|
+
align: "end",
|
|
2065
|
+
behavior: "auto",
|
|
2066
|
+
offset: 58
|
|
2067
|
+
});
|
|
2068
|
+
}
|
|
1940
2069
|
}
|
|
1941
2070
|
};
|
|
1942
2071
|
//滚动到指定位置
|
|
1943
2072
|
var scrollTo = function(id) {
|
|
2073
|
+
console.log("scrollTo", {
|
|
2074
|
+
id: id
|
|
2075
|
+
});
|
|
2076
|
+
if (id == "123456_date") {
|
|
2077
|
+
return;
|
|
2078
|
+
}
|
|
1944
2079
|
var timer = setTimeout(function() {
|
|
1945
2080
|
var index = historyMessageListRef.current.findIndex(function(x) {
|
|
1946
2081
|
return x.id === id;
|
|
1947
2082
|
});
|
|
1948
|
-
|
|
2083
|
+
console.log("scrollTo", id, index, historyMessageListRef.current);
|
|
1949
2084
|
if (index > -1) {
|
|
1950
|
-
|
|
2085
|
+
var _historyMessageListVirtuosoRef_current;
|
|
2086
|
+
(_historyMessageListVirtuosoRef_current = historyMessageListVirtuosoRef.current) === null || _historyMessageListVirtuosoRef_current === void 0 ? void 0 : _historyMessageListVirtuosoRef_current.scrollToIndex({
|
|
1951
2087
|
index: index,
|
|
1952
2088
|
align: "start",
|
|
1953
2089
|
behavior: "auto"
|
|
1954
2090
|
});
|
|
1955
2091
|
}
|
|
1956
2092
|
setLoading(false);
|
|
2093
|
+
setBottomLoading(false);
|
|
1957
2094
|
clearTimeout(timer);
|
|
1958
2095
|
}, 10);
|
|
1959
2096
|
};
|
|
@@ -1967,7 +2104,10 @@ var CustomerService = function(props) {
|
|
|
1967
2104
|
}
|
|
1968
2105
|
} else {
|
|
1969
2106
|
if (document.getElementById("Drawer_buttom_modal")) {
|
|
1970
|
-
|
|
2107
|
+
// newlabo 因为是会出现两个#BottomAssociationProblem_modal
|
|
2108
|
+
var len = document.querySelectorAll("#BottomAssociationProblem_modal").length;
|
|
2109
|
+
var dom = len > 1 ? document.querySelectorAll("#BottomAssociationProblem_modal")[1] : document.getElementById("BottomAssociationProblem_modal");
|
|
2110
|
+
var hei1 = document.getElementById("Drawer_buttom_modal").offsetHeight + dom.offsetHeight;
|
|
1971
2111
|
setButtomHei(hei1);
|
|
1972
2112
|
}
|
|
1973
2113
|
}
|
|
@@ -2171,6 +2311,7 @@ var CustomerService = function(props) {
|
|
|
2171
2311
|
var switchChatRoom = function(id, type) {
|
|
2172
2312
|
if (type != "1") {
|
|
2173
2313
|
readMessage(id, urllocation, userData, http);
|
|
2314
|
+
lastIdRef.current = "";
|
|
2174
2315
|
setLastId("");
|
|
2175
2316
|
setPageNum(1);
|
|
2176
2317
|
setPageCount(0);
|
|
@@ -2267,6 +2408,13 @@ var CustomerService = function(props) {
|
|
|
2267
2408
|
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');
|
|
2268
2409
|
return text;
|
|
2269
2410
|
});
|
|
2411
|
+
// message = message.replaceAll(
|
|
2412
|
+
// new RegExp(`<img`, "ig"),
|
|
2413
|
+
// (i: any, index: any) => {
|
|
2414
|
+
// let text = `<div class='${styles.a}'><img`;
|
|
2415
|
+
// return text;
|
|
2416
|
+
// }
|
|
2417
|
+
// );
|
|
2270
2418
|
if (item.sender == mid) {
|
|
2271
2419
|
//只有引用和复制功能
|
|
2272
2420
|
li = /*#__PURE__*/ _jsxs(_Fragment, {
|
|
@@ -2469,10 +2617,8 @@ var CustomerService = function(props) {
|
|
|
2469
2617
|
// onMouseEnter方法内:判断回答内容的气泡是否在可视区域内,动态判断点赞按钮显示的上下位置
|
|
2470
2618
|
var isSmall = showType == 1 || showType == 3;
|
|
2471
2619
|
var container = document.getElementById(isSmall ? "chat_content" : "chat_content_modal");
|
|
2472
|
-
console.log("onMouseEnter1", container);
|
|
2473
2620
|
if (container) {
|
|
2474
2621
|
var dom = container.querySelector('[id="'.concat(item.id, '"]'));
|
|
2475
|
-
console.log("onMouseEnter2", dom);
|
|
2476
2622
|
if (dom) {
|
|
2477
2623
|
// const con_h=document.getElementById('chat_content').clientHeight-24;//滚动区域的高度
|
|
2478
2624
|
var con_h = container.clientHeight - (isSmall ? 24 : 0); //滚动区域的高度;
|
|
@@ -2480,14 +2626,6 @@ var CustomerService = function(props) {
|
|
|
2480
2626
|
var h = dom.clientHeight + (isSmall ? 24 : 0); //当前元素高度
|
|
2481
2627
|
var topDom = dom.getElementsByClassName(styles.operate_modal_showtop)[0];
|
|
2482
2628
|
var bottomDom = dom.getElementsByClassName(styles.operate_modal_showbottom)[0];
|
|
2483
|
-
console.log("onMouseEnter3", topDom, bottomDom);
|
|
2484
|
-
console.log("onMouseEnter4", {
|
|
2485
|
-
h: h,
|
|
2486
|
-
con_h: con_h,
|
|
2487
|
-
rectY: rectY,
|
|
2488
|
-
topDom: topDom,
|
|
2489
|
-
bottomDom: bottomDom
|
|
2490
|
-
});
|
|
2491
2629
|
if (topDom && bottomDom) {
|
|
2492
2630
|
if (rectY > 0) {
|
|
2493
2631
|
//显示上边
|
|
@@ -2671,6 +2809,18 @@ var CustomerService = function(props) {
|
|
|
2671
2809
|
children: li
|
|
2672
2810
|
}, item.id);
|
|
2673
2811
|
};
|
|
2812
|
+
// return (
|
|
2813
|
+
// <pre className={`${styles.mermaid}`}>
|
|
2814
|
+
// {`graph TD
|
|
2815
|
+
// A[开始] --> B[步骤1]
|
|
2816
|
+
// B --> C{条件判断}
|
|
2817
|
+
// C -- 是 --> D[步骤2]
|
|
2818
|
+
// C -- 否 --> E[步骤3]
|
|
2819
|
+
// D --> F[结束]
|
|
2820
|
+
// E --> F
|
|
2821
|
+
// `}
|
|
2822
|
+
// </pre>
|
|
2823
|
+
// )
|
|
2674
2824
|
return /*#__PURE__*/ _jsx("ul", {
|
|
2675
2825
|
className: styles.message_con,
|
|
2676
2826
|
style: {
|
|
@@ -2684,45 +2834,100 @@ var CustomerService = function(props) {
|
|
|
2684
2834
|
style: {
|
|
2685
2835
|
height: "100%"
|
|
2686
2836
|
},
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2837
|
+
initialTopMostItemIndex: !finished && isPositionState ? undefined : {
|
|
2838
|
+
index: "LAST",
|
|
2839
|
+
align: "end",
|
|
2840
|
+
offset: showType === 3 ? 58 : showType === 4 ? 144 : 58
|
|
2841
|
+
},
|
|
2842
|
+
itemsRendered: function() {
|
|
2843
|
+
var t = setTimeout(function() {
|
|
2844
|
+
mermaid.init({
|
|
2845
|
+
querySelector: ".".concat(styles.mermaid),
|
|
2846
|
+
suppressErrors: true
|
|
2847
|
+
}, ".".concat(styles.mermaid));
|
|
2848
|
+
clearTimeout(t);
|
|
2849
|
+
}, 100);
|
|
2850
|
+
},
|
|
2851
|
+
// startReached={(index) => {
|
|
2852
|
+
// console.log('atTopStateChange-startReached',index,lastIdRef.current)
|
|
2853
|
+
// if (pageCount > pageNum && pageCount > 0&& !loading&&lastIdRef.current=='') {
|
|
2854
|
+
// let number = pageNum + 1;
|
|
2855
|
+
// setPageNum((pageNum) => {
|
|
2856
|
+
// return pageNum + 1;
|
|
2857
|
+
// });
|
|
2858
|
+
// setLoading(true);
|
|
2859
|
+
// listTimer.current = setTimeout(() => {
|
|
2860
|
+
// getHistoryMessage(number, 2);
|
|
2861
|
+
// lastIdRef.current = "";
|
|
2862
|
+
// setLastId("");
|
|
2863
|
+
// }, 1000);
|
|
2864
|
+
// }
|
|
2865
|
+
// }}
|
|
2866
|
+
atTopStateChange: function(atTop) {
|
|
2867
|
+
// 判断是否滚动到顶部
|
|
2868
|
+
console.log("StateChange-atTopStateChange", {
|
|
2869
|
+
pageCount: pageCount,
|
|
2870
|
+
pageNum: pageNum
|
|
2871
|
+
}, getLisyFlagRef.current);
|
|
2872
|
+
if (atTop && pageCount > pageNum && pageCount > 0 && getLisyFlagRef.current != 1 && getLisyFlagRef.current != 4) {
|
|
2690
2873
|
var number = pageNum + 1;
|
|
2691
2874
|
setPageNum(function(pageNum) {
|
|
2692
2875
|
return pageNum + 1;
|
|
2693
2876
|
});
|
|
2694
2877
|
setLoading(true);
|
|
2878
|
+
setBottomLoading(false);
|
|
2695
2879
|
listTimer.current = setTimeout(function() {
|
|
2696
2880
|
getHistoryMessage(number, 2);
|
|
2697
|
-
},
|
|
2881
|
+
}, 100);
|
|
2698
2882
|
}
|
|
2699
2883
|
},
|
|
2700
|
-
endReached
|
|
2701
|
-
|
|
2884
|
+
// endReached={(index) => {
|
|
2885
|
+
// console.log('endReached',pageNumHistory,lastIdRef.current)
|
|
2886
|
+
// if (pageNumHistory > 1&&lastIdRef.current=='') {
|
|
2887
|
+
// let number = pageNumHistory - 1;
|
|
2888
|
+
// setPageNumHistory(number);
|
|
2889
|
+
// clearTimeout(listTimer.current);
|
|
2890
|
+
// listTimer.current = setTimeout(() => {
|
|
2891
|
+
// if (number > 0) {
|
|
2892
|
+
// setBottomLoading(true);
|
|
2893
|
+
// getHistoryMessage(number, 4);
|
|
2894
|
+
// lastIdRef.current = "";
|
|
2895
|
+
// setLastId("");
|
|
2896
|
+
// } else {
|
|
2897
|
+
// setPageNumHistory(0);
|
|
2898
|
+
// }
|
|
2899
|
+
// }, 1000);
|
|
2900
|
+
// }
|
|
2901
|
+
// }}
|
|
2902
|
+
atBottomStateChange: function(atBottom) {
|
|
2903
|
+
console.log("StateChange-atBottomStateChange", pageNumHistory, getLisyFlagRef.current);
|
|
2904
|
+
if (atBottom && pageNumHistory > 1 && getLisyFlagRef.current != 1) {
|
|
2702
2905
|
var number = pageNumHistory - 1;
|
|
2703
2906
|
setPageNumHistory(number);
|
|
2704
2907
|
clearTimeout(listTimer.current);
|
|
2705
2908
|
listTimer.current = setTimeout(function() {
|
|
2706
2909
|
if (number > 0) {
|
|
2707
2910
|
setBottomLoading(true);
|
|
2911
|
+
setLoading(false);
|
|
2708
2912
|
getHistoryMessage(number, 4);
|
|
2913
|
+
lastIdRef.current = "";
|
|
2709
2914
|
setLastId("");
|
|
2710
2915
|
} else {
|
|
2711
2916
|
setPageNumHistory(0);
|
|
2712
2917
|
}
|
|
2713
|
-
},
|
|
2918
|
+
}, 100);
|
|
2714
2919
|
}
|
|
2715
2920
|
},
|
|
2716
|
-
context
|
|
2717
|
-
loading: loading
|
|
2718
|
-
},
|
|
2921
|
+
// context={{ loading }}
|
|
2719
2922
|
firstItemIndex: firstItemIndex,
|
|
2720
|
-
increaseViewportBy: 200,
|
|
2721
|
-
overscan: 10,
|
|
2722
2923
|
logLevel: 0,
|
|
2924
|
+
overscan: {
|
|
2925
|
+
main: 500,
|
|
2926
|
+
reverse: 200
|
|
2927
|
+
},
|
|
2723
2928
|
onScroll: function(e) {
|
|
2724
2929
|
//生成答案过程中
|
|
2725
|
-
if (!finishedRef.current) {
|
|
2930
|
+
if (!finishedRef.current && isWheelRef.current) {
|
|
2726
2931
|
var _container, _container1, _container2;
|
|
2727
2932
|
var container = e.target;
|
|
2728
2933
|
var _container_scrollTop;
|
|
@@ -2741,6 +2946,7 @@ var CustomerService = function(props) {
|
|
|
2741
2946
|
isPosition.current = true;
|
|
2742
2947
|
setIsPositionState(true);
|
|
2743
2948
|
}
|
|
2949
|
+
isWheelRef.current = false;
|
|
2744
2950
|
console.log("Scroll-onScroll", {
|
|
2745
2951
|
container: container,
|
|
2746
2952
|
scrollTop: scrollTop,
|
|
@@ -2749,6 +2955,11 @@ var CustomerService = function(props) {
|
|
|
2749
2955
|
isPosition: isPosition.current
|
|
2750
2956
|
});
|
|
2751
2957
|
}
|
|
2958
|
+
},
|
|
2959
|
+
onWheel: function() {
|
|
2960
|
+
if (!finishedRef.current) {
|
|
2961
|
+
isWheelRef.current = true;
|
|
2962
|
+
}
|
|
2752
2963
|
}
|
|
2753
2964
|
})
|
|
2754
2965
|
});
|
|
@@ -3552,6 +3763,7 @@ var CustomerService = function(props) {
|
|
|
3552
3763
|
if (page != 1) {
|
|
3553
3764
|
setPageNumHistory(page);
|
|
3554
3765
|
}
|
|
3766
|
+
lastIdRef.current = id;
|
|
3555
3767
|
setLastId(id); //用于定位
|
|
3556
3768
|
setPageNum(page);
|
|
3557
3769
|
//如果是当前聊天室
|
|
@@ -4126,6 +4338,14 @@ var CustomerService = function(props) {
|
|
|
4126
4338
|
resolve(viewBase64);
|
|
4127
4339
|
});
|
|
4128
4340
|
}
|
|
4341
|
+
}),
|
|
4342
|
+
showMemaid && memaidContent && /*#__PURE__*/ _jsx(ViewMemaid, {
|
|
4343
|
+
visible: showMemaid,
|
|
4344
|
+
onCancel: function() {
|
|
4345
|
+
return setShowMemaid(false);
|
|
4346
|
+
},
|
|
4347
|
+
className: "",
|
|
4348
|
+
content: memaidContent
|
|
4129
4349
|
})
|
|
4130
4350
|
]
|
|
4131
4351
|
});
|