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
|
@@ -24,6 +24,8 @@ import { parseDate } from "../utils/Date";
|
|
|
24
24
|
import { Remarkable } from "remarkable";
|
|
25
25
|
import hljs from "highlight.js";
|
|
26
26
|
import "highlight.js/styles/github.css";
|
|
27
|
+
import mermaid from "mermaid";
|
|
28
|
+
import ViewMemaid from "./viewMemaid";
|
|
27
29
|
import { render } from "react-dom";
|
|
28
30
|
import Provider from "../provider";
|
|
29
31
|
const { TextArea } = Input;
|
|
@@ -34,8 +36,8 @@ import { readMessage, getByteLen, serverUrl, copyText, getDataTime, getQuery, re
|
|
|
34
36
|
// import html2canvas from "html2canvas";
|
|
35
37
|
// const screenShot = require('./screenShotPlugin.esm')
|
|
36
38
|
import ScreenShot from "./js-screen-shot/main";
|
|
37
|
-
/*
|
|
38
|
-
自定义remarkable的text解析规则
|
|
39
|
+
/*
|
|
40
|
+
自定义remarkable的text解析规则
|
|
39
41
|
*/ const HTML_ESCAPE_TEST_RE = /[&<>"]/;
|
|
40
42
|
const HTML_ESCAPE_REPLACE_RE = /[&<>"]/g;
|
|
41
43
|
const HTML_REPLACEMENTS = {
|
|
@@ -53,6 +55,25 @@ function escapeHtml(str) {
|
|
|
53
55
|
}
|
|
54
56
|
return str;
|
|
55
57
|
}
|
|
58
|
+
function simpleFingerprint(str) {
|
|
59
|
+
let result = 0;
|
|
60
|
+
const length = str.length;
|
|
61
|
+
for(let i = 0; i < length; i++){
|
|
62
|
+
result = (result << 5) - result + str.charCodeAt(i);
|
|
63
|
+
result |= 0; // 转换为32位整数
|
|
64
|
+
}
|
|
65
|
+
// 转换为正数并格式化为8位十六进制
|
|
66
|
+
return (result >>> 0).toString(16).padStart(8, '0');
|
|
67
|
+
}
|
|
68
|
+
mermaid.initialize({
|
|
69
|
+
startOnLoad: false,
|
|
70
|
+
theme: 'default',
|
|
71
|
+
securityLevel: 'loose',
|
|
72
|
+
flowchart: {
|
|
73
|
+
htmlLabels: true,
|
|
74
|
+
curve: 'basis'
|
|
75
|
+
}
|
|
76
|
+
});
|
|
56
77
|
const CustomerService = (props)=>{
|
|
57
78
|
let { userData, http, urllocation, onCancel, serverName, fetchEventSource, initShowType, onEvent, stepIds, stepId, screenshotAreaId, config } = props;
|
|
58
79
|
// const { bese64String, startRecord, stopRecord } = useMediaRecorder(); //语音转文字
|
|
@@ -117,9 +138,17 @@ const CustomerService = (props)=>{
|
|
|
117
138
|
const [firstItemIndex, setFirstItemIndex] = useState(0);
|
|
118
139
|
const [historyMessageListVirtuosoHeight, setHistoryMessageListVirtuosoHeight] = useState(null);
|
|
119
140
|
const msgStreamingCountRef = useRef(0);
|
|
141
|
+
const isWheelRef = useRef(false);
|
|
142
|
+
const getLisyFlagRef = useRef(0);
|
|
143
|
+
const [showMemaid, setShowMemaid] = useState(false); //是否显示mermaid弹窗
|
|
144
|
+
const [memaidContent, setMemaidContent] = useState(""); //mermaid内容
|
|
120
145
|
const remarkable = new Remarkable({
|
|
121
146
|
html: true,
|
|
122
147
|
highlight: function(str, lang) {
|
|
148
|
+
// 特殊处理 mermaid 代码块
|
|
149
|
+
if (lang === 'mermaid') {
|
|
150
|
+
return str; // 不高亮 mermaid 代码
|
|
151
|
+
}
|
|
123
152
|
if (lang && hljs.getLanguage(lang)) {
|
|
124
153
|
try {
|
|
125
154
|
return hljs.highlight(lang, str).value;
|
|
@@ -131,6 +160,18 @@ const CustomerService = (props)=>{
|
|
|
131
160
|
return ""; // use external default escaping
|
|
132
161
|
}
|
|
133
162
|
});
|
|
163
|
+
// 添加自定义规则来处理 mermaid 代码块
|
|
164
|
+
remarkable.renderer.rules.fence_custom = {
|
|
165
|
+
mermaid: function(tokens, idx) {
|
|
166
|
+
const token = tokens[idx];
|
|
167
|
+
const id = 'mermaid_' + simpleFingerprint(token.content);
|
|
168
|
+
return `<span class="${styles.maskZoomBox}"><pre class="${styles.mermaid}">${token.content}</pre><span class="${styles.zoomBox}" onclick="openViewMemaid('${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="${id}">${token.content}</span></span>`;
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
remarkable.renderer.rules.image = (tokens, idx)=>{
|
|
172
|
+
const token = tokens[idx];
|
|
173
|
+
return `<span class="${styles.maskZoomBox}"><img src="${token.src}" alt="${token.alt}" title="${token.title}"/><span class="${styles.zoomBox}" onclick="openViewBase64('${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>`;
|
|
174
|
+
};
|
|
134
175
|
const remarkReplaceKey = (message, keyWordProblem)=>{
|
|
135
176
|
let newRemarkable = new Remarkable({
|
|
136
177
|
html: true,
|
|
@@ -150,6 +191,18 @@ const CustomerService = (props)=>{
|
|
|
150
191
|
let text = escapeHtml(tokens[idx].content);
|
|
151
192
|
return text.replace(keyWordProblem, `<span class="${styles.sign}">${keyWordProblem}</span>`);
|
|
152
193
|
};
|
|
194
|
+
// 添加自定义规则来处理 mermaid 代码块
|
|
195
|
+
newRemarkable.renderer.rules.fence_custom = {
|
|
196
|
+
mermaid: function(tokens, idx) {
|
|
197
|
+
const token = tokens[idx];
|
|
198
|
+
const id = 'mermaid_' + simpleFingerprint(token.content);
|
|
199
|
+
return `<span class="${styles.maskZoomBox}"><pre class="${styles.mermaid}">${token.content}</pre><span class="${styles.zoomBox}" onclick="openViewMemaid('${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="${id}">${token.content}</span></span>`;
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
remarkable.renderer.rules.image = (tokens, idx)=>{
|
|
203
|
+
const token = tokens[idx];
|
|
204
|
+
return `<span class="${styles.maskZoomBox}"><img src="${token.src}" alt="${token.alt}" title="${token.title}"/><span class="${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>`;
|
|
205
|
+
};
|
|
153
206
|
return newRemarkable.render(message);
|
|
154
207
|
};
|
|
155
208
|
const [screenShotType, setScreenShotType] = useState(0); //1是 screenShotPlugin 2是html2canvas
|
|
@@ -302,7 +355,10 @@ const CustomerService = (props)=>{
|
|
|
302
355
|
}
|
|
303
356
|
if (showType != 1 && !firstLoad && pageCount > 0) {
|
|
304
357
|
setFirstLoad(true);
|
|
305
|
-
|
|
358
|
+
scrollToBottom();
|
|
359
|
+
setTimeout(()=>{
|
|
360
|
+
scrollToBottom();
|
|
361
|
+
}, 1000);
|
|
306
362
|
}
|
|
307
363
|
// function handleScroll() {
|
|
308
364
|
// const container = document.getElementById(
|
|
@@ -362,6 +418,17 @@ const CustomerService = (props)=>{
|
|
|
362
418
|
// if (content) {
|
|
363
419
|
// content.addEventListener("scroll", handleScroll);
|
|
364
420
|
// }
|
|
421
|
+
function openViewBase64(img) {
|
|
422
|
+
setViewBase64(img);
|
|
423
|
+
setVisible(true);
|
|
424
|
+
}
|
|
425
|
+
function openViewMemaid(id) {
|
|
426
|
+
console.log('openViewMemaid');
|
|
427
|
+
setMemaidContent(id);
|
|
428
|
+
setShowMemaid(true);
|
|
429
|
+
}
|
|
430
|
+
window.openViewBase64 = openViewBase64;
|
|
431
|
+
window.openViewMemaid = openViewMemaid;
|
|
365
432
|
return ()=>{
|
|
366
433
|
// const content = document.getElementById(
|
|
367
434
|
// showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal"
|
|
@@ -371,6 +438,8 @@ const CustomerService = (props)=>{
|
|
|
371
438
|
// }
|
|
372
439
|
window.removeEventListener("resize", handlerHtml2canvas);
|
|
373
440
|
window.removeEventListener("resize", cancelScreenshot);
|
|
441
|
+
window.openViewBase64 = undefined;
|
|
442
|
+
window.openViewMemaid = undefined;
|
|
374
443
|
};
|
|
375
444
|
}, [
|
|
376
445
|
historyMessageList,
|
|
@@ -380,6 +449,12 @@ const CustomerService = (props)=>{
|
|
|
380
449
|
]);
|
|
381
450
|
useEffect(()=>{
|
|
382
451
|
historyMessageListRef.current = historyMessageList;
|
|
452
|
+
setTimeout(()=>{
|
|
453
|
+
mermaid.init({
|
|
454
|
+
querySelector: `.${styles.mermaid}`,
|
|
455
|
+
suppressErrors: true
|
|
456
|
+
}, `.${styles.mermaid}`);
|
|
457
|
+
}, 500);
|
|
383
458
|
}, [
|
|
384
459
|
historyMessageList
|
|
385
460
|
]);
|
|
@@ -388,20 +463,12 @@ const CustomerService = (props)=>{
|
|
|
388
463
|
}, [
|
|
389
464
|
lastId
|
|
390
465
|
]);
|
|
391
|
-
useEffect(()=>{
|
|
392
|
-
console.log('isPositionState', isPositionState, isPosition.current);
|
|
393
|
-
}, [
|
|
394
|
-
isPositionState
|
|
395
|
-
]);
|
|
396
466
|
useEffect(()=>{
|
|
397
467
|
resettingBottomHei();
|
|
398
|
-
const timer = setTimeout(()=>{
|
|
399
|
-
scrollToBottom();
|
|
400
|
-
clearTimeout(timer);
|
|
401
|
-
}, 80);
|
|
402
468
|
let dom = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
|
|
403
469
|
if (dom) {
|
|
404
470
|
let hei = null;
|
|
471
|
+
console.log('buttomHei1', buttomHei);
|
|
405
472
|
if (showType == 1) {
|
|
406
473
|
hei = window.innerHeight - 60 - buttomHei;
|
|
407
474
|
dom.style.maxHeight = `${hei}px`;
|
|
@@ -414,10 +481,24 @@ const CustomerService = (props)=>{
|
|
|
414
481
|
}
|
|
415
482
|
setHistoryMessageListVirtuosoHeight(hei);
|
|
416
483
|
}
|
|
484
|
+
const timer = setTimeout(()=>{
|
|
485
|
+
console.log('showType', showType);
|
|
486
|
+
scrollToBottom();
|
|
487
|
+
clearTimeout(timer);
|
|
488
|
+
}, 100);
|
|
417
489
|
}, [
|
|
418
490
|
buttomHei,
|
|
419
491
|
showType
|
|
420
492
|
]);
|
|
493
|
+
useEffect(()=>{
|
|
494
|
+
const timer = setTimeout(()=>{
|
|
495
|
+
console.log('buttomHei2', historyMessageListRef.current.length);
|
|
496
|
+
scrollToBottom();
|
|
497
|
+
clearTimeout(timer);
|
|
498
|
+
}, 100);
|
|
499
|
+
}, [
|
|
500
|
+
historyMessageListVirtuosoHeight
|
|
501
|
+
]);
|
|
421
502
|
//创建聊天室并获取聊天室列表
|
|
422
503
|
useEffect(()=>{
|
|
423
504
|
createRooms("AI").then((res)=>{
|
|
@@ -436,7 +517,7 @@ const CustomerService = (props)=>{
|
|
|
436
517
|
}, []);
|
|
437
518
|
useEffect(()=>{
|
|
438
519
|
if (roomId != "") {
|
|
439
|
-
if (
|
|
520
|
+
if (lastIdRef.current == "") {
|
|
440
521
|
getHistoryMessage(pageNum, 2);
|
|
441
522
|
} else {
|
|
442
523
|
//查看历史记录,需要定位到当前记录
|
|
@@ -630,7 +711,10 @@ const CustomerService = (props)=>{
|
|
|
630
711
|
}));
|
|
631
712
|
return newHistoryMessageList;
|
|
632
713
|
});
|
|
633
|
-
|
|
714
|
+
const timer = setTimeout(()=>{
|
|
715
|
+
scrollToBottom();
|
|
716
|
+
clearTimeout(timer);
|
|
717
|
+
}, 100);
|
|
634
718
|
}
|
|
635
719
|
}
|
|
636
720
|
};
|
|
@@ -1349,6 +1433,13 @@ const CustomerService = (props)=>{
|
|
|
1349
1433
|
};
|
|
1350
1434
|
//获取历史消息 flag:1,历史记录点击定位,2,代表是上拉加载,3,存在新的消息-->老师回答等,4,下拉加载,滚动到底部时,主要用于查看历史记录
|
|
1351
1435
|
const getHistoryMessage = (pageNum, flag, id = "1", raw_data = [])=>{
|
|
1436
|
+
console.log('buttomHei4', {
|
|
1437
|
+
flag,
|
|
1438
|
+
pageNum,
|
|
1439
|
+
id,
|
|
1440
|
+
raw_data
|
|
1441
|
+
});
|
|
1442
|
+
getLisyFlagRef.current = flag;
|
|
1352
1443
|
clearTimeout(roomMessage.current);
|
|
1353
1444
|
// console.log(pageNum,flag,'dkfjvndfjvndfkvdf')
|
|
1354
1445
|
// flag == 1 时已经设置好了位置标记
|
|
@@ -1357,7 +1448,9 @@ const CustomerService = (props)=>{
|
|
|
1357
1448
|
last_id = historyMessageList[0].id;
|
|
1358
1449
|
}
|
|
1359
1450
|
if (flag != 1 && last_id != "") {
|
|
1451
|
+
lastIdRef.current = last_id;
|
|
1360
1452
|
setLastId(last_id);
|
|
1453
|
+
console.log('历史定位', last_id);
|
|
1361
1454
|
}
|
|
1362
1455
|
//取消搜索页码标记
|
|
1363
1456
|
if (flag == 4 && pageNum == 1) {
|
|
@@ -1381,13 +1474,32 @@ const CustomerService = (props)=>{
|
|
|
1381
1474
|
let total = res.data.total;
|
|
1382
1475
|
let maxPageSize = 30;
|
|
1383
1476
|
let dataList = res.data.messages.reverse();
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1477
|
+
// const mermaidChart = `\n\`\`\`mermaid\n%%\{init:\{'securityLevel':'loose','theme':'default','themeVariables': \{'useMaxWidth':false,'fontSize':'12px'\}\}\}%%
|
|
1478
|
+
// sequenceDiagram
|
|
1479
|
+
// actor 用户 as 用户
|
|
1480
|
+
// participant 前端 as Web/App前端
|
|
1481
|
+
// participant 后端 as 后端服务器
|
|
1482
|
+
// participant 数据库 as 数据库
|
|
1483
|
+
// 用户->>前端: 1. 输入用户名密码
|
|
1484
|
+
// 前端->>后端: 2. POST /api/login
|
|
1485
|
+
// 后端->>数据库: 3. 查询用户凭证
|
|
1486
|
+
// 数据库-->>后端: 4. 返回用户数据
|
|
1487
|
+
// alt 验证成功
|
|
1488
|
+
// 后端-->>前端: 5. 返回Token & 用户信息
|
|
1489
|
+
// 前端-->>用户: 6. 显示登录成功,跳转主页
|
|
1490
|
+
// else 验证失败
|
|
1491
|
+
// 后端-->>前端: 5. 返回错误信息
|
|
1492
|
+
// 前端-->>用户: 6. 提示“用户名或密码错误”
|
|
1493
|
+
// end\n\n\`\`\` `;
|
|
1494
|
+
// const imgTxt=`\n`
|
|
1495
|
+
// dataList[dataList.length - 1].message = mermaidChart+imgTxt;
|
|
1496
|
+
// //历史记录点击进来的,多加载一页,防止定位不准
|
|
1497
|
+
// if(flag == 1 && page > 1){
|
|
1498
|
+
// let markPage = page-1;
|
|
1499
|
+
// setPageNumHistory(markPage);
|
|
1500
|
+
// getHistoryMessage(page-1,5,'1',dataList);
|
|
1501
|
+
// return;
|
|
1502
|
+
// }
|
|
1391
1503
|
setPageCount(Math.ceil(total / maxPageSize));
|
|
1392
1504
|
setFirstItemIndex(total - maxPageSize * (page - 1));
|
|
1393
1505
|
let newHistoryMessageList = [];
|
|
@@ -1419,6 +1531,7 @@ const CustomerService = (props)=>{
|
|
|
1419
1531
|
totalNumber = newHistoryMessageList.length;
|
|
1420
1532
|
return newHistoryMessageList;
|
|
1421
1533
|
});
|
|
1534
|
+
historyMessageListRef.current = newHistoryMessageList;
|
|
1422
1535
|
// console.log(lastId,'lastIdlastId-------')
|
|
1423
1536
|
//如果在跟老师的聊天窗口,用于找到与老师的最新的聊天,并不在与老师对话的窗口中,并聊天窗口相同
|
|
1424
1537
|
try {
|
|
@@ -1465,6 +1578,9 @@ const CustomerService = (props)=>{
|
|
|
1465
1578
|
//&& pageNum == 1
|
|
1466
1579
|
getRoomidHistoryMessage(totalNumber, rid);
|
|
1467
1580
|
}
|
|
1581
|
+
setTimeout(()=>{
|
|
1582
|
+
getLisyFlagRef.current = 0;
|
|
1583
|
+
}, 100);
|
|
1468
1584
|
}).catch((res)=>{
|
|
1469
1585
|
setLoading(false);
|
|
1470
1586
|
});
|
|
@@ -1824,26 +1940,47 @@ const CustomerService = (props)=>{
|
|
|
1824
1940
|
if (!historyMessageListVirtuosoRef.current || !isPosition.current) {
|
|
1825
1941
|
return;
|
|
1826
1942
|
} else {
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1943
|
+
if (showType === 4) {
|
|
1944
|
+
const t = setTimeout(()=>{
|
|
1945
|
+
historyMessageListVirtuosoRef.current.scrollIntoView({
|
|
1946
|
+
index: "LAST",
|
|
1947
|
+
align: "end",
|
|
1948
|
+
behavior: "auto",
|
|
1949
|
+
offset: 144
|
|
1950
|
+
});
|
|
1951
|
+
clearTimeout(t);
|
|
1952
|
+
}, 100);
|
|
1953
|
+
} else {
|
|
1954
|
+
historyMessageListVirtuosoRef.current.scrollToIndex({
|
|
1955
|
+
index: "LAST",
|
|
1956
|
+
align: "end",
|
|
1957
|
+
behavior: "auto",
|
|
1958
|
+
offset: 58
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1832
1961
|
}
|
|
1833
1962
|
};
|
|
1834
1963
|
//滚动到指定位置
|
|
1835
1964
|
const scrollTo = (id)=>{
|
|
1965
|
+
console.log('scrollTo', {
|
|
1966
|
+
id
|
|
1967
|
+
});
|
|
1968
|
+
if (id == '123456_date') {
|
|
1969
|
+
return;
|
|
1970
|
+
}
|
|
1836
1971
|
const timer = setTimeout(()=>{
|
|
1837
1972
|
const index = historyMessageListRef.current.findIndex((x)=>x.id === id);
|
|
1838
|
-
|
|
1973
|
+
console.log("scrollTo", id, index, historyMessageListRef.current);
|
|
1839
1974
|
if (index > -1) {
|
|
1840
|
-
|
|
1975
|
+
var _historyMessageListVirtuosoRef_current;
|
|
1976
|
+
(_historyMessageListVirtuosoRef_current = historyMessageListVirtuosoRef.current) === null || _historyMessageListVirtuosoRef_current === void 0 ? void 0 : _historyMessageListVirtuosoRef_current.scrollToIndex({
|
|
1841
1977
|
index,
|
|
1842
|
-
align:
|
|
1978
|
+
align: 'start',
|
|
1843
1979
|
behavior: "auto"
|
|
1844
1980
|
});
|
|
1845
1981
|
}
|
|
1846
1982
|
setLoading(false);
|
|
1983
|
+
setBottomLoading(false);
|
|
1847
1984
|
clearTimeout(timer);
|
|
1848
1985
|
}, 10);
|
|
1849
1986
|
};
|
|
@@ -1857,7 +1994,10 @@ const CustomerService = (props)=>{
|
|
|
1857
1994
|
}
|
|
1858
1995
|
} else {
|
|
1859
1996
|
if (document.getElementById("Drawer_buttom_modal")) {
|
|
1860
|
-
|
|
1997
|
+
// newlabo 因为是会出现两个#BottomAssociationProblem_modal
|
|
1998
|
+
const len = document.querySelectorAll('#BottomAssociationProblem_modal').length;
|
|
1999
|
+
const dom = len > 1 ? document.querySelectorAll('#BottomAssociationProblem_modal')[1] : document.getElementById("BottomAssociationProblem_modal");
|
|
2000
|
+
let hei = document.getElementById("Drawer_buttom_modal").offsetHeight + dom.offsetHeight;
|
|
1861
2001
|
setButtomHei(hei);
|
|
1862
2002
|
}
|
|
1863
2003
|
}
|
|
@@ -2057,6 +2197,7 @@ const CustomerService = (props)=>{
|
|
|
2057
2197
|
const switchChatRoom = (id, type)=>{
|
|
2058
2198
|
if (type != "1") {
|
|
2059
2199
|
readMessage(id, urllocation, userData, http);
|
|
2200
|
+
lastIdRef.current = "";
|
|
2060
2201
|
setLastId("");
|
|
2061
2202
|
setPageNum(1);
|
|
2062
2203
|
setPageCount(0);
|
|
@@ -2144,42 +2285,49 @@ const CustomerService = (props)=>{
|
|
|
2144
2285
|
let position = 0;
|
|
2145
2286
|
message = message.replaceAll(new RegExp(`<pre`, "ig"), (i, index)=>{
|
|
2146
2287
|
position++;
|
|
2147
|
-
let text = `<p class='${styles.copyCode} copyCodeFun' data-id=${item.id} data-position=${position}>
|
|
2148
|
-
<span class='${styles.icon} copy' >
|
|
2149
|
-
<svg
|
|
2150
|
-
width="1em"
|
|
2151
|
-
height="1em"
|
|
2152
|
-
viewBox="0 0 14 14"
|
|
2153
|
-
shape-rendering="geometricPrecision"
|
|
2154
|
-
fill="currentColor"
|
|
2155
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2156
|
-
>
|
|
2157
|
-
<g clip-path="url(#clip0_518_8403)">
|
|
2158
|
-
<path
|
|
2159
|
-
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"
|
|
2160
|
-
/>
|
|
2161
|
-
</g>
|
|
2162
|
-
<defs>
|
|
2163
|
-
<clipPath id="clip0_518_8403">
|
|
2164
|
-
<rect width="16" height="16" />
|
|
2165
|
-
</clipPath>
|
|
2166
|
-
</defs>
|
|
2167
|
-
</svg>
|
|
2168
|
-
</span>
|
|
2169
|
-
<span class='${styles.icon} copy_success_flag'>
|
|
2170
|
-
<svg
|
|
2171
|
-
width="1em"
|
|
2172
|
-
height="1em"
|
|
2173
|
-
shape-rendering="geometricPrecision"
|
|
2174
|
-
fill="currentColor"
|
|
2175
|
-
viewBox="0 0 12 7"
|
|
2176
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2177
|
-
>
|
|
2178
|
-
<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" />
|
|
2179
|
-
</svg>
|
|
2288
|
+
let text = `<p class='${styles.copyCode} copyCodeFun' data-id=${item.id} data-position=${position}>
|
|
2289
|
+
<span class='${styles.icon} copy' >
|
|
2290
|
+
<svg
|
|
2291
|
+
width="1em"
|
|
2292
|
+
height="1em"
|
|
2293
|
+
viewBox="0 0 14 14"
|
|
2294
|
+
shape-rendering="geometricPrecision"
|
|
2295
|
+
fill="currentColor"
|
|
2296
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2297
|
+
>
|
|
2298
|
+
<g clip-path="url(#clip0_518_8403)">
|
|
2299
|
+
<path
|
|
2300
|
+
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"
|
|
2301
|
+
/>
|
|
2302
|
+
</g>
|
|
2303
|
+
<defs>
|
|
2304
|
+
<clipPath id="clip0_518_8403">
|
|
2305
|
+
<rect width="16" height="16" />
|
|
2306
|
+
</clipPath>
|
|
2307
|
+
</defs>
|
|
2308
|
+
</svg>
|
|
2309
|
+
</span>
|
|
2310
|
+
<span class='${styles.icon} copy_success_flag'>
|
|
2311
|
+
<svg
|
|
2312
|
+
width="1em"
|
|
2313
|
+
height="1em"
|
|
2314
|
+
shape-rendering="geometricPrecision"
|
|
2315
|
+
fill="currentColor"
|
|
2316
|
+
viewBox="0 0 12 7"
|
|
2317
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2318
|
+
>
|
|
2319
|
+
<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" />
|
|
2320
|
+
</svg>
|
|
2180
2321
|
</span><span class="copyCode">复制代码</span></p><pre`;
|
|
2181
2322
|
return text;
|
|
2182
2323
|
});
|
|
2324
|
+
// message = message.replaceAll(
|
|
2325
|
+
// new RegExp(`<img`, "ig"),
|
|
2326
|
+
// (i: any, index: any) => {
|
|
2327
|
+
// let text = `<div class='${styles.a}'><img`;
|
|
2328
|
+
// return text;
|
|
2329
|
+
// }
|
|
2330
|
+
// );
|
|
2183
2331
|
if (item.sender == mid) {
|
|
2184
2332
|
//只有引用和复制功能
|
|
2185
2333
|
li = /*#__PURE__*/ _jsxs(_Fragment, {
|
|
@@ -2374,10 +2522,8 @@ const CustomerService = (props)=>{
|
|
|
2374
2522
|
// onMouseEnter方法内:判断回答内容的气泡是否在可视区域内,动态判断点赞按钮显示的上下位置
|
|
2375
2523
|
const isSmall = showType == 1 || showType == 3;
|
|
2376
2524
|
const container = document.getElementById(isSmall ? "chat_content" : "chat_content_modal");
|
|
2377
|
-
console.log('onMouseEnter1', container);
|
|
2378
2525
|
if (container) {
|
|
2379
2526
|
const dom = container.querySelector(`[id="${item.id}"]`);
|
|
2380
|
-
console.log('onMouseEnter2', dom);
|
|
2381
2527
|
if (dom) {
|
|
2382
2528
|
// const con_h=document.getElementById('chat_content').clientHeight-24;//滚动区域的高度
|
|
2383
2529
|
const con_h = container.clientHeight - (isSmall ? 24 : 0); //滚动区域的高度;
|
|
@@ -2385,14 +2531,6 @@ const CustomerService = (props)=>{
|
|
|
2385
2531
|
const h = dom.clientHeight + (isSmall ? 24 : 0); //当前元素高度
|
|
2386
2532
|
const topDom = dom.getElementsByClassName(styles.operate_modal_showtop)[0];
|
|
2387
2533
|
const bottomDom = dom.getElementsByClassName(styles.operate_modal_showbottom)[0];
|
|
2388
|
-
console.log('onMouseEnter3', topDom, bottomDom);
|
|
2389
|
-
console.log('onMouseEnter4', {
|
|
2390
|
-
h,
|
|
2391
|
-
con_h,
|
|
2392
|
-
rectY,
|
|
2393
|
-
topDom,
|
|
2394
|
-
bottomDom
|
|
2395
|
-
});
|
|
2396
2534
|
if (topDom && bottomDom) {
|
|
2397
2535
|
if (rectY > 0) {
|
|
2398
2536
|
//显示上边
|
|
@@ -2576,6 +2714,18 @@ const CustomerService = (props)=>{
|
|
|
2576
2714
|
children: li
|
|
2577
2715
|
}, item.id);
|
|
2578
2716
|
}
|
|
2717
|
+
// return (
|
|
2718
|
+
// <pre className={`${styles.mermaid}`}>
|
|
2719
|
+
// {`graph TD
|
|
2720
|
+
// A[开始] --> B[步骤1]
|
|
2721
|
+
// B --> C{条件判断}
|
|
2722
|
+
// C -- 是 --> D[步骤2]
|
|
2723
|
+
// C -- 否 --> E[步骤3]
|
|
2724
|
+
// D --> F[结束]
|
|
2725
|
+
// E --> F
|
|
2726
|
+
// `}
|
|
2727
|
+
// </pre>
|
|
2728
|
+
// )
|
|
2579
2729
|
return /*#__PURE__*/ _jsx("ul", {
|
|
2580
2730
|
className: styles.message_con,
|
|
2581
2731
|
style: {
|
|
@@ -2587,47 +2737,102 @@ const CustomerService = (props)=>{
|
|
|
2587
2737
|
itemContent: itemContent,
|
|
2588
2738
|
totalCount: historyMessageList.length,
|
|
2589
2739
|
style: {
|
|
2590
|
-
height:
|
|
2740
|
+
height: '100%'
|
|
2741
|
+
},
|
|
2742
|
+
initialTopMostItemIndex: !finished && isPositionState ? undefined : {
|
|
2743
|
+
index: "LAST",
|
|
2744
|
+
align: "end",
|
|
2745
|
+
offset: showType === 3 ? 58 : showType === 4 ? 144 : 58
|
|
2746
|
+
},
|
|
2747
|
+
itemsRendered: ()=>{
|
|
2748
|
+
const t = setTimeout(()=>{
|
|
2749
|
+
mermaid.init({
|
|
2750
|
+
querySelector: `.${styles.mermaid}`,
|
|
2751
|
+
suppressErrors: true
|
|
2752
|
+
}, `.${styles.mermaid}`);
|
|
2753
|
+
clearTimeout(t);
|
|
2754
|
+
}, 100);
|
|
2591
2755
|
},
|
|
2592
|
-
//
|
|
2593
|
-
startReached
|
|
2594
|
-
|
|
2756
|
+
// startReached={(index) => {
|
|
2757
|
+
// console.log('atTopStateChange-startReached',index,lastIdRef.current)
|
|
2758
|
+
// if (pageCount > pageNum && pageCount > 0&& !loading&&lastIdRef.current=='') {
|
|
2759
|
+
// let number = pageNum + 1;
|
|
2760
|
+
// setPageNum((pageNum) => {
|
|
2761
|
+
// return pageNum + 1;
|
|
2762
|
+
// });
|
|
2763
|
+
// setLoading(true);
|
|
2764
|
+
// listTimer.current = setTimeout(() => {
|
|
2765
|
+
// getHistoryMessage(number, 2);
|
|
2766
|
+
// lastIdRef.current = "";
|
|
2767
|
+
// setLastId("");
|
|
2768
|
+
// }, 1000);
|
|
2769
|
+
// }
|
|
2770
|
+
// }}
|
|
2771
|
+
atTopStateChange: (atTop)=>{
|
|
2772
|
+
// 判断是否滚动到顶部
|
|
2773
|
+
console.log('StateChange-atTopStateChange', {
|
|
2774
|
+
pageCount,
|
|
2775
|
+
pageNum
|
|
2776
|
+
}, getLisyFlagRef.current);
|
|
2777
|
+
if (atTop && pageCount > pageNum && pageCount > 0 && getLisyFlagRef.current != 1 && getLisyFlagRef.current != 4) {
|
|
2595
2778
|
let number = pageNum + 1;
|
|
2596
2779
|
setPageNum((pageNum)=>{
|
|
2597
2780
|
return pageNum + 1;
|
|
2598
2781
|
});
|
|
2599
2782
|
setLoading(true);
|
|
2783
|
+
setBottomLoading(false);
|
|
2600
2784
|
listTimer.current = setTimeout(()=>{
|
|
2601
2785
|
getHistoryMessage(number, 2);
|
|
2602
|
-
},
|
|
2786
|
+
}, 100);
|
|
2603
2787
|
}
|
|
2604
2788
|
},
|
|
2605
|
-
endReached
|
|
2606
|
-
|
|
2789
|
+
// endReached={(index) => {
|
|
2790
|
+
// console.log('endReached',pageNumHistory,lastIdRef.current)
|
|
2791
|
+
// if (pageNumHistory > 1&&lastIdRef.current=='') {
|
|
2792
|
+
// let number = pageNumHistory - 1;
|
|
2793
|
+
// setPageNumHistory(number);
|
|
2794
|
+
// clearTimeout(listTimer.current);
|
|
2795
|
+
// listTimer.current = setTimeout(() => {
|
|
2796
|
+
// if (number > 0) {
|
|
2797
|
+
// setBottomLoading(true);
|
|
2798
|
+
// getHistoryMessage(number, 4);
|
|
2799
|
+
// lastIdRef.current = "";
|
|
2800
|
+
// setLastId("");
|
|
2801
|
+
// } else {
|
|
2802
|
+
// setPageNumHistory(0);
|
|
2803
|
+
// }
|
|
2804
|
+
// }, 1000);
|
|
2805
|
+
// }
|
|
2806
|
+
// }}
|
|
2807
|
+
atBottomStateChange: (atBottom)=>{
|
|
2808
|
+
console.log('StateChange-atBottomStateChange', pageNumHistory, getLisyFlagRef.current);
|
|
2809
|
+
if (atBottom && pageNumHistory > 1 && getLisyFlagRef.current != 1) {
|
|
2607
2810
|
let number = pageNumHistory - 1;
|
|
2608
2811
|
setPageNumHistory(number);
|
|
2609
2812
|
clearTimeout(listTimer.current);
|
|
2610
2813
|
listTimer.current = setTimeout(()=>{
|
|
2611
2814
|
if (number > 0) {
|
|
2612
2815
|
setBottomLoading(true);
|
|
2816
|
+
setLoading(false);
|
|
2613
2817
|
getHistoryMessage(number, 4);
|
|
2818
|
+
lastIdRef.current = "";
|
|
2614
2819
|
setLastId("");
|
|
2615
2820
|
} else {
|
|
2616
2821
|
setPageNumHistory(0);
|
|
2617
2822
|
}
|
|
2618
|
-
},
|
|
2823
|
+
}, 100);
|
|
2619
2824
|
}
|
|
2620
2825
|
},
|
|
2621
|
-
context
|
|
2622
|
-
loading
|
|
2623
|
-
},
|
|
2826
|
+
// context={{ loading }}
|
|
2624
2827
|
firstItemIndex: firstItemIndex,
|
|
2625
|
-
increaseViewportBy: 200,
|
|
2626
|
-
overscan: 10,
|
|
2627
2828
|
logLevel: 0,
|
|
2829
|
+
overscan: {
|
|
2830
|
+
main: 500,
|
|
2831
|
+
reverse: 200
|
|
2832
|
+
},
|
|
2628
2833
|
onScroll: (e)=>{
|
|
2629
2834
|
//生成答案过程中
|
|
2630
|
-
if (!finishedRef.current) {
|
|
2835
|
+
if (!finishedRef.current && isWheelRef.current) {
|
|
2631
2836
|
var _container, _container1, _container2;
|
|
2632
2837
|
const container = e.target;
|
|
2633
2838
|
var _container_scrollTop;
|
|
@@ -2646,6 +2851,7 @@ const CustomerService = (props)=>{
|
|
|
2646
2851
|
isPosition.current = true;
|
|
2647
2852
|
setIsPositionState(true);
|
|
2648
2853
|
}
|
|
2854
|
+
isWheelRef.current = false;
|
|
2649
2855
|
console.log("Scroll-onScroll", {
|
|
2650
2856
|
container,
|
|
2651
2857
|
scrollTop,
|
|
@@ -2654,6 +2860,11 @@ const CustomerService = (props)=>{
|
|
|
2654
2860
|
isPosition: isPosition.current
|
|
2655
2861
|
});
|
|
2656
2862
|
}
|
|
2863
|
+
},
|
|
2864
|
+
onWheel: ()=>{
|
|
2865
|
+
if (!finishedRef.current) {
|
|
2866
|
+
isWheelRef.current = true;
|
|
2867
|
+
}
|
|
2657
2868
|
}
|
|
2658
2869
|
})
|
|
2659
2870
|
});
|
|
@@ -3424,6 +3635,7 @@ const CustomerService = (props)=>{
|
|
|
3424
3635
|
if (page != 1) {
|
|
3425
3636
|
setPageNumHistory(page);
|
|
3426
3637
|
}
|
|
3638
|
+
lastIdRef.current = id;
|
|
3427
3639
|
setLastId(id); //用于定位
|
|
3428
3640
|
setPageNum(page);
|
|
3429
3641
|
//如果是当前聊天室
|
|
@@ -3996,6 +4208,12 @@ const CustomerService = (props)=>{
|
|
|
3996
4208
|
resolve(viewBase64);
|
|
3997
4209
|
});
|
|
3998
4210
|
}
|
|
4211
|
+
}),
|
|
4212
|
+
showMemaid && memaidContent && /*#__PURE__*/ _jsx(ViewMemaid, {
|
|
4213
|
+
visible: showMemaid,
|
|
4214
|
+
onCancel: ()=>setShowMemaid(false),
|
|
4215
|
+
className: "",
|
|
4216
|
+
content: memaidContent
|
|
3999
4217
|
})
|
|
4000
4218
|
]
|
|
4001
4219
|
});
|