@tencentcloud/ai-desk-customer-vue 0.1.0
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/.code.yml +17 -0
- package/.eslintignore +6 -0
- package/.stylelintrc.json +40 -0
- package/CHANGELOG.md +5 -0
- package/README.md +12 -0
- package/adapter-vue-web.ts +73 -0
- package/adapter-vue.ts +10 -0
- package/assets/audio-before-delete.svg +4 -0
- package/assets/audio-blue.png +0 -0
- package/assets/audio-bubble-blue.svg +3 -0
- package/assets/audio-bubble-red.svg +3 -0
- package/assets/audio-delete.svg +10 -0
- package/assets/audio.svg +6 -0
- package/assets/back.svg +16 -0
- package/assets/background_mobile.png +0 -0
- package/assets/camera-uni.png +0 -0
- package/assets/close-quote-icon.svg +3 -0
- package/assets/customer_avatar.png +0 -0
- package/assets/customer_avatar_mobile.png +0 -0
- package/assets/dialog-close.png +0 -0
- package/assets/double-arrow.svg +1 -0
- package/assets/download.svg +6 -0
- package/assets/emoji.png +0 -0
- package/assets/face-uni.png +0 -0
- package/assets/face.png +0 -0
- package/assets/file-h5.png +0 -0
- package/assets/files.png +0 -0
- package/assets/form-dialog-bg.png +0 -0
- package/assets/icon-arrow-left.svg +7 -0
- package/assets/icon-close.svg +6 -0
- package/assets/iconRight.svg +3 -0
- package/assets/icon_form.png +0 -0
- package/assets/icon_form_filled.png +0 -0
- package/assets/icon_question.png +0 -0
- package/assets/icon_refresh.png +0 -0
- package/assets/icon_success.png +0 -0
- package/assets/imRobotGuess.svg +4 -0
- package/assets/image-uni.png +0 -0
- package/assets/image.png +0 -0
- package/assets/keyboard_icon.png +0 -0
- package/assets/loading.png +0 -0
- package/assets/more-uni.png +0 -0
- package/assets/more_tools.png +0 -0
- package/assets/msg-audio.svg +1 -0
- package/assets/msg-copy.svg +30 -0
- package/assets/msg-del.svg +33 -0
- package/assets/msg-quote.svg +8 -0
- package/assets/msg-revoke.svg +29 -0
- package/assets/radio-check.png +0 -0
- package/assets/radio-uncheck.png +0 -0
- package/assets/radio.svg +6 -0
- package/assets/refresh.svg +4 -0
- package/assets/rotate-left.svg +7 -0
- package/assets/rotate-right.svg +7 -0
- package/assets/star.png +0 -0
- package/assets/starLine.png +0 -0
- package/assets/translate.svg +12 -0
- package/assets/video-play.png +0 -0
- package/assets/video-uni.png +0 -0
- package/assets/video.png +0 -0
- package/assets/zoom-in.svg +9 -0
- package/assets/zoom-out.svg +9 -0
- package/components/CustomerServiceChat/chat-header/index-web.vue +141 -0
- package/components/CustomerServiceChat/emoji-config/custom-emoji.ts +15 -0
- package/components/CustomerServiceChat/emoji-config/default-emoji.ts +114 -0
- package/components/CustomerServiceChat/emoji-config/index.ts +140 -0
- package/components/CustomerServiceChat/emoji-config/locales/en.ts +66 -0
- package/components/CustomerServiceChat/emoji-config/locales/zh_cn.ts +66 -0
- package/components/CustomerServiceChat/index-web.vue +250 -0
- package/components/CustomerServiceChat/message-input/index-web.vue +214 -0
- package/components/CustomerServiceChat/message-input/index.ts +2 -0
- package/components/CustomerServiceChat/message-input/message-input-button.vue +95 -0
- package/components/CustomerServiceChat/message-input/message-input-editor-web.vue +884 -0
- package/components/CustomerServiceChat/message-input/message-input-file-web.ts +38 -0
- package/components/CustomerServiceChat/message-input/message-input-quote/index.vue +204 -0
- package/components/CustomerServiceChat/message-input-toolbar/emoji-dialog-mobile/emoji-dialog-mobile.vue +145 -0
- package/components/CustomerServiceChat/message-input-toolbar/emoji-picker/emoji-picker-dialog.vue +180 -0
- package/components/CustomerServiceChat/message-input-toolbar/emoji-picker/index.ts +2 -0
- package/components/CustomerServiceChat/message-input-toolbar/emoji-picker/index.vue +90 -0
- package/components/CustomerServiceChat/message-input-toolbar/emoji-picker/style/h5.scss +26 -0
- package/components/CustomerServiceChat/message-input-toolbar/emoji-picker/style/index.scss +4 -0
- package/components/CustomerServiceChat/message-input-toolbar/emoji-picker/style/web.scss +55 -0
- package/components/CustomerServiceChat/message-input-toolbar/file-upload/index.ts +2 -0
- package/components/CustomerServiceChat/message-input-toolbar/file-upload/index.vue +77 -0
- package/components/CustomerServiceChat/message-input-toolbar/image-upload/index.ts +2 -0
- package/components/CustomerServiceChat/message-input-toolbar/image-upload/index.vue +185 -0
- package/components/CustomerServiceChat/message-input-toolbar/index-web.vue +191 -0
- package/components/CustomerServiceChat/message-input-toolbar/index.ts +2 -0
- package/components/CustomerServiceChat/message-input-toolbar/style/uni.scss +111 -0
- package/components/CustomerServiceChat/message-input-toolbar/toolbar-item-container/index.vue +149 -0
- package/components/CustomerServiceChat/message-input-toolbar/toolbar-item-container/style/color.scss +6 -0
- package/components/CustomerServiceChat/message-input-toolbar/toolbar-item-container/style/h5.scss +20 -0
- package/components/CustomerServiceChat/message-input-toolbar/toolbar-item-container/style/index.scss +5 -0
- package/components/CustomerServiceChat/message-input-toolbar/toolbar-item-container/style/uni.scss +36 -0
- package/components/CustomerServiceChat/message-input-toolbar/toolbar-item-container/style/web.scss +19 -0
- package/components/CustomerServiceChat/message-input-toolbar/video-upload/index.ts +2 -0
- package/components/CustomerServiceChat/message-input-toolbar/video-upload/index.vue +146 -0
- package/components/CustomerServiceChat/message-list/index-web.vue +712 -0
- package/components/CustomerServiceChat/message-list/link/index.ts +23 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-audio-web.vue +223 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-bubble-web.vue +504 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-custom.vue +5 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-face.vue +45 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-file.vue +151 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-image-web.vue +97 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-location.vue +34 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-quote/index-web.vue +286 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-quote/interface.ts +60 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-record/index.vue +139 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-text.vue +94 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-timestamp.vue +76 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-video-web.vue +319 -0
- package/components/CustomerServiceChat/message-list/message-elements/plugins/plugin-components/index.ts +9 -0
- package/components/CustomerServiceChat/message-list/message-elements/plugins/plugin-components/message-customer/index.ts +5 -0
- package/components/CustomerServiceChat/message-list/message-elements/plugins/plugin-components/message-customer/message-customer-service.vue +22 -0
- package/components/CustomerServiceChat/message-list/message-elements/plugins/plugin-components/message-plugin-layout-web.vue +133 -0
- package/components/CustomerServiceChat/message-list/message-elements/plugins/plugin-components/message-plugin-web.vue +83 -0
- package/components/CustomerServiceChat/message-list/message-elements/read-status/index.vue +193 -0
- package/components/CustomerServiceChat/message-list/message-elements/simple-message-list/index.vue +462 -0
- package/components/CustomerServiceChat/message-list/message-elements/simple-message-list/message-container.vue +105 -0
- package/components/CustomerServiceChat/message-list/message-elements/video-play.vue +59 -0
- package/components/CustomerServiceChat/message-list/message-tool/index-web.vue +312 -0
- package/components/CustomerServiceChat/message-list/message-tool/message-revoked.vue +63 -0
- package/components/CustomerServiceChat/message-list/scroll-button/index.vue +201 -0
- package/components/CustomerServiceChat/message-list/style/color.scss +32 -0
- package/components/CustomerServiceChat/message-list/style/h5.scss +16 -0
- package/components/CustomerServiceChat/message-list/style/index.scss +11 -0
- package/components/CustomerServiceChat/message-list/style/web.scss +180 -0
- package/components/CustomerServiceChat/style/common.scss +59 -0
- package/components/CustomerServiceChat/style/h5.scss +51 -0
- package/components/CustomerServiceChat/style/index.scss +12 -0
- package/components/CustomerServiceChat/style/uni.scss +13 -0
- package/components/CustomerServiceChat/style/web.scss +46 -0
- package/components/CustomerServiceChat/style/wx.scss +5 -0
- package/components/CustomerServiceChat/utils/conversationDraft.ts +86 -0
- package/components/CustomerServiceChat/utils/sendMessage.ts +140 -0
- package/components/common/Avatar/index.vue +148 -0
- package/components/common/BottomPopup/index.ts +3 -0
- package/components/common/BottomPopup/index.vue +160 -0
- package/components/common/BottomPopup/style/h5.scss +62 -0
- package/components/common/BottomPopup/style/index.scss +3 -0
- package/components/common/BottomPopup/style/modal.scss +5 -0
- package/components/common/Dialog/index.ts +3 -0
- package/components/common/Dialog/index.vue +120 -0
- package/components/common/Dialog/style/color.scss +43 -0
- package/components/common/Dialog/style/dialog.scss +4 -0
- package/components/common/Dialog/style/h5.scss +56 -0
- package/components/common/Dialog/style/web.scss +61 -0
- package/components/common/Drawer/index.vue +164 -0
- package/components/common/Icon.vue +83 -0
- package/components/common/ImagePreviewer/image-item-web.vue +42 -0
- package/components/common/ImagePreviewer/index-web.vue +682 -0
- package/components/common/ImagePreviewer/index.ts +3 -0
- package/components/common/Overlay/index.vue +126 -0
- package/components/common/ProgressMessage/index.vue +95 -0
- package/components/common/RadioSelect/index.vue +59 -0
- package/components/common/RichText/LICENSE +21 -0
- package/components/common/RichText/README.md +244 -0
- package/components/common/RichText/dist/mp-alipay/index.acss +1 -0
- package/components/common/RichText/dist/mp-alipay/index.axml +1 -0
- package/components/common/RichText/dist/mp-alipay/index.js +8 -0
- package/components/common/RichText/dist/mp-alipay/index.json +1 -0
- package/components/common/RichText/dist/mp-alipay/node/node.acss +1 -0
- package/components/common/RichText/dist/mp-alipay/node/node.axml +1 -0
- package/components/common/RichText/dist/mp-alipay/node/node.js +1 -0
- package/components/common/RichText/dist/mp-alipay/node/node.json +1 -0
- package/components/common/RichText/dist/mp-alipay/parser.js +1 -0
- package/components/common/RichText/dist/mp-baidu/index.css +1 -0
- package/components/common/RichText/dist/mp-baidu/index.js +8 -0
- package/components/common/RichText/dist/mp-baidu/index.json +1 -0
- package/components/common/RichText/dist/mp-baidu/index.swan +1 -0
- package/components/common/RichText/dist/mp-baidu/node/node.css +1 -0
- package/components/common/RichText/dist/mp-baidu/node/node.js +1 -0
- package/components/common/RichText/dist/mp-baidu/node/node.json +1 -0
- package/components/common/RichText/dist/mp-baidu/node/node.swan +1 -0
- package/components/common/RichText/dist/mp-baidu/parser.js +1 -0
- package/components/common/RichText/dist/mp-qq/index.js +8 -0
- package/components/common/RichText/dist/mp-qq/index.json +1 -0
- package/components/common/RichText/dist/mp-qq/index.qml +1 -0
- package/components/common/RichText/dist/mp-qq/index.qss +1 -0
- package/components/common/RichText/dist/mp-qq/node/node.js +1 -0
- package/components/common/RichText/dist/mp-qq/node/node.json +1 -0
- package/components/common/RichText/dist/mp-qq/node/node.qml +1 -0
- package/components/common/RichText/dist/mp-qq/node/node.qss +1 -0
- package/components/common/RichText/dist/mp-qq/parser.js +1 -0
- package/components/common/RichText/dist/mp-toutiao/index.js +8 -0
- package/components/common/RichText/dist/mp-toutiao/index.json +1 -0
- package/components/common/RichText/dist/mp-toutiao/index.ttml +1 -0
- package/components/common/RichText/dist/mp-toutiao/index.ttss +1 -0
- package/components/common/RichText/dist/mp-toutiao/node/node.js +1 -0
- package/components/common/RichText/dist/mp-toutiao/node/node.json +1 -0
- package/components/common/RichText/dist/mp-toutiao/node/node.ttml +1 -0
- package/components/common/RichText/dist/mp-toutiao/node/node.ttss +1 -0
- package/components/common/RichText/dist/mp-toutiao/parser.js +1 -0
- package/components/common/RichText/dist/mp-weixin/index.js +8 -0
- package/components/common/RichText/dist/mp-weixin/index.json +1 -0
- package/components/common/RichText/dist/mp-weixin/index.wxml +1 -0
- package/components/common/RichText/dist/mp-weixin/index.wxss +1 -0
- package/components/common/RichText/dist/mp-weixin/node/node.js +1 -0
- package/components/common/RichText/dist/mp-weixin/node/node.json +1 -0
- package/components/common/RichText/dist/mp-weixin/node/node.wxml +1 -0
- package/components/common/RichText/dist/mp-weixin/node/node.wxss +1 -0
- package/components/common/RichText/dist/mp-weixin/parser.js +1 -0
- package/components/common/RichText/dist/uni-app/components/mp-html/mp-html.vue +498 -0
- package/components/common/RichText/dist/uni-app/components/mp-html/node/node.vue +587 -0
- package/components/common/RichText/dist/uni-app/components/mp-html/parser.js +1393 -0
- package/components/common/RichText/dist/uni-app/static/app-plus/mp-html/js/handler.js +1 -0
- package/components/common/RichText/dist/uni-app/static/app-plus/mp-html/js/uni.webview.min.js +1 -0
- package/components/common/RichText/dist/uni-app/static/app-plus/mp-html/local.html +1 -0
- package/components/common/RichText/docs/.nojekyll +0 -0
- package/components/common/RichText/docs/index.html +50 -0
- package/components/common/RichText/docs/lib/docsify.min.js +1 -0
- package/components/common/RichText/docs/lib/prism-bash.min.js +1 -0
- package/components/common/RichText/docs/lib/search.min.js +1 -0
- package/components/common/RichText/docs/lib/vue.css +858 -0
- package/components/common/RichText/gulpfile.js +113 -0
- package/components/common/RichText/lint.js +63 -0
- package/components/common/RichText/package.json +74 -0
- package/components/common/RichText/plugins/README.md +2 -0
- package/components/common/RichText/plugins/audio/README.md +25 -0
- package/components/common/RichText/plugins/audio/build.js +11 -0
- package/components/common/RichText/plugins/audio/context.js +7 -0
- package/components/common/RichText/plugins/audio/index.js +34 -0
- package/components/common/RichText/plugins/audio/miniprogram/audio.js +189 -0
- package/components/common/RichText/plugins/audio/miniprogram/audio.json +3 -0
- package/components/common/RichText/plugins/audio/miniprogram/audio.wxml +17 -0
- package/components/common/RichText/plugins/audio/miniprogram/audio.wxss +127 -0
- package/components/common/RichText/plugins/audio/miniprogram/build.js +3 -0
- package/components/common/RichText/plugins/audio/uni-app/audio.vue +269 -0
- package/components/common/RichText/plugins/audio/uni-app/build.js +3 -0
- package/components/common/RichText/plugins/card/README.md +30 -0
- package/components/common/RichText/plugins/card/build.js +14 -0
- package/components/common/RichText/plugins/card/index.js +7 -0
- package/components/common/RichText/plugins/card/miniprogram/build.js +3 -0
- package/components/common/RichText/plugins/card/miniprogram/card.js +26 -0
- package/components/common/RichText/plugins/card/miniprogram/card.json +3 -0
- package/components/common/RichText/plugins/card/miniprogram/card.wxml +9 -0
- package/components/common/RichText/plugins/card/miniprogram/card.wxss +55 -0
- package/components/common/RichText/plugins/card/uni-app/build.js +3 -0
- package/components/common/RichText/plugins/card/uni-app/card.vue +122 -0
- package/components/common/RichText/plugins/editable/README.md +137 -0
- package/components/common/RichText/plugins/editable/config.js +15 -0
- package/components/common/RichText/plugins/editable/miniprogram/build.js +813 -0
- package/components/common/RichText/plugins/editable/miniprogram/index.js +551 -0
- package/components/common/RichText/plugins/editable/uni-app/build.js +744 -0
- package/components/common/RichText/plugins/editable/uni-app/index.js +553 -0
- package/components/common/RichText/plugins/emoji/README.md +15 -0
- package/components/common/RichText/plugins/emoji/index.js +203 -0
- package/components/common/RichText/plugins/highlight/README.md +26 -0
- package/components/common/RichText/plugins/highlight/config.js +5 -0
- package/components/common/RichText/plugins/highlight/index.js +96 -0
- package/components/common/RichText/plugins/highlight/miniprogram/build.js +88 -0
- package/components/common/RichText/plugins/highlight/prism.css +125 -0
- package/components/common/RichText/plugins/highlight/prism.min.js +7 -0
- package/components/common/RichText/plugins/highlight/uni-app/build.js +88 -0
- package/components/common/RichText/plugins/img-cache/README.md +24 -0
- package/components/common/RichText/plugins/img-cache/build.js +16 -0
- package/components/common/RichText/plugins/img-cache/index.js +138 -0
- package/components/common/RichText/plugins/latex/README.md +16 -0
- package/components/common/RichText/plugins/latex/build.js +14 -0
- package/components/common/RichText/plugins/latex/index.js +77 -0
- package/components/common/RichText/plugins/latex/katex.css +1070 -0
- package/components/common/RichText/plugins/latex/katex.min.js +1 -0
- package/components/common/RichText/plugins/markdown/README.md +17 -0
- package/components/common/RichText/plugins/markdown/index.js +34 -0
- package/components/common/RichText/plugins/markdown/marked.min.js +6 -0
- package/components/common/RichText/plugins/markdown/miniprogram/build.js +70 -0
- package/components/common/RichText/plugins/markdown/uni-app/build.js +68 -0
- package/components/common/RichText/plugins/search/README.md +46 -0
- package/components/common/RichText/plugins/search/miniprogram/index.js +137 -0
- package/components/common/RichText/plugins/search/uni-app/index.js +132 -0
- package/components/common/RichText/plugins/style/README.md +30 -0
- package/components/common/RichText/plugins/style/index.js +129 -0
- package/components/common/RichText/plugins/style/parser.js +175 -0
- package/components/common/RichText/plugins/template/README.md +2 -0
- package/components/common/RichText/plugins/template/build.js +65 -0
- package/components/common/RichText/plugins/template/index.js +67 -0
- package/components/common/RichText/plugins/txv-video/README.md +18 -0
- package/components/common/RichText/plugins/txv-video/build.js +3 -0
- package/components/common/RichText/plugins/txv-video/index.js +46 -0
- package/components/common/RichText/plugins/txv-video/miniprogram/build.js +6 -0
- package/components/common/RichText/plugins/txv-video/uni-app/build.js +3 -0
- package/components/common/RichText/src/miniprogram/index.js +396 -0
- package/components/common/RichText/src/miniprogram/index.json +6 -0
- package/components/common/RichText/src/miniprogram/index.wxml +7 -0
- package/components/common/RichText/src/miniprogram/index.wxss +13 -0
- package/components/common/RichText/src/miniprogram/node/node.js +247 -0
- package/components/common/RichText/src/miniprogram/node/node.json +6 -0
- package/components/common/RichText/src/miniprogram/node/node.wxml +112 -0
- package/components/common/RichText/src/miniprogram/node/node.wxss +164 -0
- package/components/common/RichText/src/miniprogram/parser.js +1269 -0
- package/components/common/RichText/src/uni-app/components/mp-html/mp-html.vue +498 -0
- package/components/common/RichText/src/uni-app/components/mp-html/node/node.vue +585 -0
- package/components/common/RichText/src/uni-app/components/mp-html/parser.js +1393 -0
- package/components/common/RichText/src/uni-app/static/app-plus/mp-html/js/handler.js +254 -0
- package/components/common/RichText/src/uni-app/static/app-plus/mp-html/js/uni.webview.min.js +1 -0
- package/components/common/RichText/src/uni-app/static/app-plus/mp-html/local.html +33 -0
- package/components/common/RichText/tools/config.js +82 -0
- package/components/common/RichText/tools/converter.js +205 -0
- package/components/common/RichText/tools/ifdef.js +115 -0
- package/components/common/RichText/tools/minifier.js +40 -0
- package/components/common/RichText/tools/plugin.js +248 -0
- package/components/common/Toast/index-web.ts +122 -0
- package/components/common/Toast/index-web.vue +178 -0
- package/components/common/Toast/type.ts +8 -0
- package/components/common/common.scss +59 -0
- package/components/customer-icon.vue +56 -0
- package/components/message-branch.vue +120 -0
- package/components/message-customer-service.vue +114 -0
- package/components/message-form/form-branch.vue +68 -0
- package/components/message-form/form-input.vue +242 -0
- package/components/message-form/index.vue +80 -0
- package/components/message-multi-branch/branch-pc.vue +79 -0
- package/components/message-multi-branch/index.vue +60 -0
- package/components/message-multi-form/component-mobile/form-popup.vue +37 -0
- package/components/message-multi-form/component-mobile/input-mobile.vue +102 -0
- package/components/message-multi-form/component-mobile/label-mobile.vue +32 -0
- package/components/message-multi-form/component-mobile/radios-mobile.vue +161 -0
- package/components/message-multi-form/component-pc/input-pc.vue +93 -0
- package/components/message-multi-form/component-pc/label-pc.vue +33 -0
- package/components/message-multi-form/component-pc/radio-pc.vue +98 -0
- package/components/message-multi-form/form-mobile.vue +385 -0
- package/components/message-multi-form/form-pc.vue +184 -0
- package/components/message-multi-form/index.vue +61 -0
- package/components/message-product-card.vue +129 -0
- package/components/message-rating/index.vue +56 -0
- package/components/message-rating/message-rating-number.vue +247 -0
- package/components/message-rating/message-rating-star.vue +237 -0
- package/components/message-rich-text.vue +155 -0
- package/components/message-robot-welcome.vue +181 -0
- package/components/message-stream.vue +109 -0
- package/constant.ts +122 -0
- package/excluded-list.txt +6 -0
- package/index.ts +30 -0
- package/index.vue +60 -0
- package/interface.ts +176 -0
- package/logger/index.ts +12 -0
- package/logger/main.ts +120 -0
- package/package.json +62 -0
- package/script/fileCopy.js +60 -0
- package/script/syncVersion.js +35 -0
- package/server.ts +128 -0
- package/styles/common.scss +116 -0
- package/tsconfig.json +34 -0
- package/typings.d.ts +20 -0
- package/utils/chatStorage.ts +70 -0
- package/utils/copy-web.ts +141 -0
- package/utils/enableSampleTaskStatus.ts +8 -0
- package/utils/env.ts +15 -0
- package/utils/index.ts +59 -0
- package/utils/utils.ts +162 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-show="isShowReadStatus"
|
|
4
|
+
:class="{
|
|
5
|
+
'message-label': true,
|
|
6
|
+
unread: isUseUnreadStyle,
|
|
7
|
+
}"
|
|
8
|
+
>
|
|
9
|
+
<span>{{ readStatusText }}</span>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import vue from '../../../../../adapter-vue';
|
|
15
|
+
import TUIChatEngine, {
|
|
16
|
+
TUIStore,
|
|
17
|
+
StoreName,
|
|
18
|
+
IMessageModel,
|
|
19
|
+
TUITranslateService,
|
|
20
|
+
} from '@tencentcloud/chat-uikit-engine';
|
|
21
|
+
const { computed, ref, onMounted, onUnmounted } = vue;
|
|
22
|
+
|
|
23
|
+
interface IProps {
|
|
24
|
+
message: IMessageModel;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const props = withDefaults(defineProps<IProps>(), {
|
|
28
|
+
message: () => ({} as IMessageModel),
|
|
29
|
+
});
|
|
30
|
+
const ReadStatus = true;
|
|
31
|
+
|
|
32
|
+
enum ReadState {
|
|
33
|
+
Read,
|
|
34
|
+
Unread,
|
|
35
|
+
AllRead,
|
|
36
|
+
NotShow,
|
|
37
|
+
PartiallyRead,
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const TYPES = TUIChatEngine.TYPES;
|
|
41
|
+
// User-level read receipt toggle has the highest priority.
|
|
42
|
+
const isDisplayMessageReadReceipt = ref<boolean>(
|
|
43
|
+
// TUIStore.getData(StoreName.USER, 'displayMessageReadReceipt'),
|
|
44
|
+
true
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
onMounted(() => {
|
|
48
|
+
TUIStore.watch(StoreName.USER, {
|
|
49
|
+
displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate,
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
onUnmounted(() => {
|
|
54
|
+
TUIStore.unwatch(StoreName.USER, {
|
|
55
|
+
displayMessageReadReceipt: onDisplayMessageReadReceiptUpdate,
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const isShowReadStatus = computed<boolean>(() => {
|
|
60
|
+
if (!ReadStatus) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
if (!isDisplayMessageReadReceipt.value) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
const {
|
|
67
|
+
ID,
|
|
68
|
+
type,
|
|
69
|
+
flow,
|
|
70
|
+
status,
|
|
71
|
+
hasRiskContent,
|
|
72
|
+
conversationID,
|
|
73
|
+
conversationType,
|
|
74
|
+
needReadReceipt = false,
|
|
75
|
+
} = props.message;
|
|
76
|
+
|
|
77
|
+
// Asynchronous message strike: Determine if there is risky content after the message has been sent
|
|
78
|
+
if (hasRiskContent) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const { groupProfile } = TUIStore.getConversationModel(conversationID) || {};
|
|
83
|
+
// AVCHATROOM and COMMUNITY chats do not display read status
|
|
84
|
+
if (
|
|
85
|
+
groupProfile?.type === TYPES.GRP_AVCHATROOM
|
|
86
|
+
|| groupProfile?.type === TYPES.GRP_COMMUNITY
|
|
87
|
+
) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (type === TYPES.MSG_CUSTOM) {
|
|
92
|
+
const message = TUIStore.getMessageModel(ID);
|
|
93
|
+
// If it is a signaling message, do not display the read status
|
|
94
|
+
if (message?.getSignalingInfo() !== null) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Unsuccessful message: Received messages do not display read status
|
|
100
|
+
if (flow !== 'out' || status !== 'success') {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (conversationType === 'GROUP') {
|
|
105
|
+
return needReadReceipt;
|
|
106
|
+
} else if (conversationType === 'C2C') {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
return false;
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const readState = computed<ReadState>(() => {
|
|
113
|
+
const {
|
|
114
|
+
conversationType,
|
|
115
|
+
needReadReceipt = false,
|
|
116
|
+
isPeerRead = false,
|
|
117
|
+
} = props.message;
|
|
118
|
+
const {
|
|
119
|
+
readCount = 0,
|
|
120
|
+
unreadCount = 0,
|
|
121
|
+
isPeerRead: isReceiptPeerRead = false,
|
|
122
|
+
} = props.message.readReceiptInfo;
|
|
123
|
+
if (conversationType === 'C2C') {
|
|
124
|
+
if (needReadReceipt) {
|
|
125
|
+
return isReceiptPeerRead ? ReadState.Read : ReadState.Unread;
|
|
126
|
+
} else {
|
|
127
|
+
return isPeerRead ? ReadState.Read : ReadState.Unread;
|
|
128
|
+
}
|
|
129
|
+
} else if (conversationType === 'GROUP') {
|
|
130
|
+
if (needReadReceipt) {
|
|
131
|
+
if (readCount === 0) {
|
|
132
|
+
return ReadState.Unread;
|
|
133
|
+
} else if (unreadCount === 0) {
|
|
134
|
+
return ReadState.AllRead;
|
|
135
|
+
} else {
|
|
136
|
+
return ReadState.PartiallyRead;
|
|
137
|
+
}
|
|
138
|
+
} else {
|
|
139
|
+
return ReadState.NotShow;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return ReadState.Unread;
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
const readStatusText = computed(() => {
|
|
146
|
+
const { readCount = 0 } = props.message.readReceiptInfo;
|
|
147
|
+
switch (readState.value) {
|
|
148
|
+
case ReadState.Read:
|
|
149
|
+
return TUITranslateService.t('TUIChat.已读');
|
|
150
|
+
case ReadState.Unread:
|
|
151
|
+
return TUITranslateService.t('TUIChat.未读');
|
|
152
|
+
case ReadState.AllRead:
|
|
153
|
+
return TUITranslateService.t('TUIChat.全部已读');
|
|
154
|
+
case ReadState.PartiallyRead:
|
|
155
|
+
return `${readCount}${TUITranslateService.t('TUIChat.人已读')}`;
|
|
156
|
+
default:
|
|
157
|
+
return '';
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
const isUseUnreadStyle = computed(() => {
|
|
162
|
+
const { conversationType } = props.message;
|
|
163
|
+
if (conversationType === 'C2C') {
|
|
164
|
+
return readState.value !== ReadState.Read;
|
|
165
|
+
} else if (conversationType === 'GROUP') {
|
|
166
|
+
return readState.value !== ReadState.AllRead;
|
|
167
|
+
}
|
|
168
|
+
return false;
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
function onDisplayMessageReadReceiptUpdate(isDisplay: boolean) {
|
|
172
|
+
isDisplayMessageReadReceipt.value = isDisplay;
|
|
173
|
+
}
|
|
174
|
+
</script>
|
|
175
|
+
|
|
176
|
+
<style scoped lang="scss">
|
|
177
|
+
.message-label {
|
|
178
|
+
align-self: flex-end;
|
|
179
|
+
font-size: 12px;
|
|
180
|
+
color: #b6b8ba;
|
|
181
|
+
word-break: keep-all;
|
|
182
|
+
flex: 0 0 auto;
|
|
183
|
+
|
|
184
|
+
&.unread {
|
|
185
|
+
color: #679ce1 !important;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.finger-point {
|
|
190
|
+
cursor: pointer;
|
|
191
|
+
-webkit-tap-highlight-color: transparent;
|
|
192
|
+
}
|
|
193
|
+
</style>
|
package/components/CustomerServiceChat/message-list/message-elements/simple-message-list/index.vue
ADDED
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="{
|
|
4
|
+
'simple-message-list-container': true,
|
|
5
|
+
'simple-message-list-container-mobile': isMobile,
|
|
6
|
+
}"
|
|
7
|
+
>
|
|
8
|
+
<div class="header-container">
|
|
9
|
+
<span
|
|
10
|
+
class="back"
|
|
11
|
+
@click="backPreviousLevel"
|
|
12
|
+
>
|
|
13
|
+
<Icon
|
|
14
|
+
class="close-icon"
|
|
15
|
+
:file="addIcon"
|
|
16
|
+
:size="'18px'"
|
|
17
|
+
/>
|
|
18
|
+
<span v-if="isReturn">{{ TUITranslateService.t("TUIChat.返回") }}</span>
|
|
19
|
+
<span v-else>{{ TUITranslateService.t("TUIChat.关闭") }}</span>
|
|
20
|
+
</span>
|
|
21
|
+
|
|
22
|
+
<span class="title">
|
|
23
|
+
{{ currentMergeMessageInfo.title }}
|
|
24
|
+
</span>
|
|
25
|
+
</div>
|
|
26
|
+
<div v-if="isDownloadOccurError">
|
|
27
|
+
Load Merge Message Error
|
|
28
|
+
</div>
|
|
29
|
+
<div
|
|
30
|
+
v-else-if="isMergeMessageInfoLoaded"
|
|
31
|
+
ref="simpleMessageListRef"
|
|
32
|
+
class="message-list"
|
|
33
|
+
>
|
|
34
|
+
<div
|
|
35
|
+
v-for="item in currentMergeMessageInfo.messageList"
|
|
36
|
+
:key="item.ID"
|
|
37
|
+
:class="{
|
|
38
|
+
'message-item': true,
|
|
39
|
+
}"
|
|
40
|
+
>
|
|
41
|
+
<MessageContainer
|
|
42
|
+
:sender="item.nick"
|
|
43
|
+
:avatar="item.avatar"
|
|
44
|
+
:type="item.messageBody[0].type"
|
|
45
|
+
:time="item.time"
|
|
46
|
+
>
|
|
47
|
+
<!-- text -->
|
|
48
|
+
<div
|
|
49
|
+
v-if="item.messageBody[0].type === TYPES.MSG_TEXT"
|
|
50
|
+
class="message-text"
|
|
51
|
+
>
|
|
52
|
+
<span
|
|
53
|
+
v-for="(textInfo, index) in parseTextToRenderArray(
|
|
54
|
+
item.messageBody[0].payload['text']
|
|
55
|
+
)"
|
|
56
|
+
:key="index"
|
|
57
|
+
class="message-text-container"
|
|
58
|
+
>
|
|
59
|
+
<span
|
|
60
|
+
v-if="textInfo.type === 'text'"
|
|
61
|
+
class="text"
|
|
62
|
+
>{{
|
|
63
|
+
textInfo.content
|
|
64
|
+
}}</span>
|
|
65
|
+
<img
|
|
66
|
+
v-else
|
|
67
|
+
class="simple-emoji"
|
|
68
|
+
:src="textInfo.content"
|
|
69
|
+
alt="small-face"
|
|
70
|
+
>
|
|
71
|
+
</span>
|
|
72
|
+
</div>
|
|
73
|
+
<!-- image -->
|
|
74
|
+
<div
|
|
75
|
+
v-else-if="item.messageBody[0].type === TYPES.MSG_IMAGE"
|
|
76
|
+
class="message-image"
|
|
77
|
+
>
|
|
78
|
+
<img
|
|
79
|
+
class="image"
|
|
80
|
+
:src="item.messageBody[0].payload['imageInfoArray'][2]['url']"
|
|
81
|
+
mode="widthFix"
|
|
82
|
+
alt="image"
|
|
83
|
+
>
|
|
84
|
+
</div>
|
|
85
|
+
<!-- video -->
|
|
86
|
+
<div
|
|
87
|
+
v-else-if="item.messageBody[0].type === TYPES.MSG_VIDEO"
|
|
88
|
+
class="message-video"
|
|
89
|
+
>
|
|
90
|
+
<div
|
|
91
|
+
v-if="isUniFrameWork"
|
|
92
|
+
@click="
|
|
93
|
+
previewVideoInUniapp(
|
|
94
|
+
item.messageBody[0].payload['remoteVideoUrl']
|
|
95
|
+
)
|
|
96
|
+
"
|
|
97
|
+
>
|
|
98
|
+
<image
|
|
99
|
+
class="image"
|
|
100
|
+
:src="item.messageBody[0].payload['thumbUrl']"
|
|
101
|
+
mode="widthFix"
|
|
102
|
+
alt="image"
|
|
103
|
+
/>
|
|
104
|
+
<Icon
|
|
105
|
+
class="video-play-icon"
|
|
106
|
+
:file="playIcon"
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
<video
|
|
110
|
+
v-else
|
|
111
|
+
class="video"
|
|
112
|
+
controls
|
|
113
|
+
:poster="item.messageBody[0].payload['thumbUrl']"
|
|
114
|
+
>
|
|
115
|
+
<source
|
|
116
|
+
:src="item.messageBody[0].payload['remoteVideoUrl']"
|
|
117
|
+
type="video/mp4"
|
|
118
|
+
>
|
|
119
|
+
</video>
|
|
120
|
+
</div>
|
|
121
|
+
<!-- audio -->
|
|
122
|
+
<div
|
|
123
|
+
v-else-if="item.messageBody[0].type === TYPES.MSG_AUDIO"
|
|
124
|
+
class="message-audio"
|
|
125
|
+
>
|
|
126
|
+
<span>{{ TUITranslateService.t("TUIChat.语音") }} </span>
|
|
127
|
+
<span>{{ item.messageBody[0].payload.second }}s</span>
|
|
128
|
+
</div>
|
|
129
|
+
<!-- big face -->
|
|
130
|
+
<div
|
|
131
|
+
v-else-if="item.messageBody[0].type === TYPES.MSG_FACE"
|
|
132
|
+
class="message-face"
|
|
133
|
+
>
|
|
134
|
+
<img
|
|
135
|
+
class="image"
|
|
136
|
+
:src="resolveBigFaceUrl(item.messageBody[0].payload.data)"
|
|
137
|
+
alt="face"
|
|
138
|
+
>
|
|
139
|
+
</div>
|
|
140
|
+
<!-- file -->
|
|
141
|
+
<div
|
|
142
|
+
v-else-if="item.messageBody[0].type === TYPES.MSG_FILE"
|
|
143
|
+
class="message-file"
|
|
144
|
+
>
|
|
145
|
+
{{ TUITranslateService.t("TUIChat.[文件]") }}
|
|
146
|
+
</div>
|
|
147
|
+
<!-- location -->
|
|
148
|
+
<div v-else-if="item.messageBody[0].type === TYPES.MSG_LOCATION">
|
|
149
|
+
{{ TUITranslateService.t("TUIChat.[地理位置]") }}
|
|
150
|
+
</div>
|
|
151
|
+
<!-- merger -->
|
|
152
|
+
<div
|
|
153
|
+
v-else-if="item.messageBody[0].type === TYPES.MSG_MERGER"
|
|
154
|
+
class="message-merger"
|
|
155
|
+
@click.capture="entryNextLevel($event, item)"
|
|
156
|
+
>
|
|
157
|
+
<MessageRecord
|
|
158
|
+
disabled
|
|
159
|
+
:renderData="item.messageBody[0].payload"
|
|
160
|
+
/>
|
|
161
|
+
</div>
|
|
162
|
+
<!-- custom -->
|
|
163
|
+
<div v-else-if="item.messageBody[0].type === TYPES.MSG_CUSTOM">
|
|
164
|
+
{{ TUITranslateService.t("TUIChat.[自定义消息]") }}
|
|
165
|
+
</div>
|
|
166
|
+
</MessageContainer>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
</template>
|
|
171
|
+
|
|
172
|
+
<script setup lang="ts">
|
|
173
|
+
import vue from '../../../../../adapter-vue';
|
|
174
|
+
import TUIChatEngine, {
|
|
175
|
+
TUIStore,
|
|
176
|
+
TUIChatService,
|
|
177
|
+
TUITranslateService,
|
|
178
|
+
} from '@tencentcloud/chat-uikit-engine';
|
|
179
|
+
import addIcon from '../../../../../assets/back.svg';
|
|
180
|
+
import playIcon from '../../../../../assets/video-play.png';
|
|
181
|
+
import Icon from '../../../../common/Icon.vue';
|
|
182
|
+
import MessageContainer from './message-container.vue';
|
|
183
|
+
import MessageRecord from '../message-record/index.vue';
|
|
184
|
+
import {
|
|
185
|
+
parseTextToRenderArray,
|
|
186
|
+
DEFAULT_BIG_EMOJI_URL,
|
|
187
|
+
CUSTOM_BIG_EMOJI_URL,
|
|
188
|
+
} from '../../../emoji-config/index';
|
|
189
|
+
import { isMobile, isUniFrameWork } from '../../../../../utils/env';
|
|
190
|
+
import { IMergeMessageContent } from '../../../../../interface';
|
|
191
|
+
const { computed, ref, watch } = vue;
|
|
192
|
+
|
|
193
|
+
interface IProps {
|
|
194
|
+
/**
|
|
195
|
+
* only use messageID when first render of simple-message-list
|
|
196
|
+
* because the nested simple-message-list do not have corresponding message object
|
|
197
|
+
* need to download message from sdk by constructed message
|
|
198
|
+
* and use downloaded message object to render nested simple-message-list
|
|
199
|
+
*/
|
|
200
|
+
messageID?: string;
|
|
201
|
+
isMounted?: boolean;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
interface IEmits {
|
|
205
|
+
(e: 'closeOverlay'): void;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const emits = defineEmits<IEmits>();
|
|
209
|
+
const props = withDefaults(defineProps<IProps>(), {
|
|
210
|
+
messageID: '',
|
|
211
|
+
isMounted: false,
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
const TYPES = TUIChatEngine.TYPES;
|
|
215
|
+
const isDownloadOccurError = ref(false);
|
|
216
|
+
const messageListStack = ref<IMergeMessageContent[]>([]);
|
|
217
|
+
const currentMergeMessageInfo = ref<Partial<IMergeMessageContent>>({
|
|
218
|
+
title: '',
|
|
219
|
+
messageList: [],
|
|
220
|
+
});
|
|
221
|
+
const simpleMessageListRef = ref<HTMLElement>();
|
|
222
|
+
|
|
223
|
+
watch(
|
|
224
|
+
() => messageListStack.value.length,
|
|
225
|
+
async (newValue) => {
|
|
226
|
+
isDownloadOccurError.value = false;
|
|
227
|
+
if (newValue < 1) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
const stackTopMessageInfo
|
|
231
|
+
= messageListStack.value[messageListStack.value.length - 1];
|
|
232
|
+
if (
|
|
233
|
+
stackTopMessageInfo.downloadKey
|
|
234
|
+
&& stackTopMessageInfo.messageList.length === 0
|
|
235
|
+
) {
|
|
236
|
+
try {
|
|
237
|
+
const res = await TUIChatService.downloadMergedMessages({
|
|
238
|
+
payload: stackTopMessageInfo,
|
|
239
|
+
type: TUIChatEngine.TYPES.MSG_MERGER,
|
|
240
|
+
} as any);
|
|
241
|
+
// if download complete message, cover the original message in stack top
|
|
242
|
+
messageListStack.value[messageListStack.value.length - 1] = res.payload;
|
|
243
|
+
} catch (error) {
|
|
244
|
+
isDownloadOccurError.value = true;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
currentMergeMessageInfo.value
|
|
248
|
+
= messageListStack.value[messageListStack.value.length - 1];
|
|
249
|
+
},
|
|
250
|
+
);
|
|
251
|
+
|
|
252
|
+
watch(
|
|
253
|
+
() => props.isMounted,
|
|
254
|
+
(newValue) => {
|
|
255
|
+
// For compatibility with uniapp, use watch to implement onMounted
|
|
256
|
+
if (newValue) {
|
|
257
|
+
if (!props.messageID) {
|
|
258
|
+
throw new Error(
|
|
259
|
+
'messageID is required when first render of simple-message-list.',
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
const sdkMessagePayload = TUIStore.getMessageModel(
|
|
263
|
+
props.messageID,
|
|
264
|
+
).getMessage().payload;
|
|
265
|
+
messageListStack.value = [sdkMessagePayload];
|
|
266
|
+
} else {
|
|
267
|
+
messageListStack.value = [];
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
immediate: true,
|
|
272
|
+
},
|
|
273
|
+
);
|
|
274
|
+
|
|
275
|
+
const isReturn = computed(() => {
|
|
276
|
+
return messageListStack.value.length > 1;
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
const isMergeMessageInfoLoaded = computed(() => {
|
|
280
|
+
return currentMergeMessageInfo.value?.messageList
|
|
281
|
+
? currentMergeMessageInfo.value.messageList.length > 0
|
|
282
|
+
: false;
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
function entryNextLevel(e, sdkMessage: any) {
|
|
286
|
+
messageListStack.value.push(sdkMessage.messageBody[0].payload);
|
|
287
|
+
e.stopPropagation();
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function backPreviousLevel() {
|
|
291
|
+
messageListStack.value.pop();
|
|
292
|
+
if (messageListStack.value.length < 1) {
|
|
293
|
+
emits('closeOverlay');
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
function previewVideoInUniapp(url: string) {
|
|
298
|
+
if (isUniFrameWork) {
|
|
299
|
+
const encodedUrl = encodeURIComponent(url);
|
|
300
|
+
uni.navigateTo({
|
|
301
|
+
url: `/TUIKit/components/TUIChat/video-play?videoUrl=${encodedUrl}`,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
function resolveBigFaceUrl(bigFaceKey: string): string {
|
|
307
|
+
let url = '';
|
|
308
|
+
if (bigFaceKey.indexOf('@custom') > -1) {
|
|
309
|
+
url = CUSTOM_BIG_EMOJI_URL + bigFaceKey;
|
|
310
|
+
} else {
|
|
311
|
+
url = DEFAULT_BIG_EMOJI_URL + bigFaceKey;
|
|
312
|
+
if (url.indexOf('@2x') === -1) {
|
|
313
|
+
url += '@2x.png';
|
|
314
|
+
} else {
|
|
315
|
+
url += '.png';
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
return url;
|
|
319
|
+
}
|
|
320
|
+
</script>
|
|
321
|
+
|
|
322
|
+
<style scoped lang="scss">
|
|
323
|
+
:not(not) {
|
|
324
|
+
display: flex;
|
|
325
|
+
flex-direction: column;
|
|
326
|
+
min-width: 0;
|
|
327
|
+
box-sizing: border-box;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.simple-message-list-container {
|
|
331
|
+
flex: 1;
|
|
332
|
+
position: relative;
|
|
333
|
+
overflow: hidden;
|
|
334
|
+
width: calc(40vw);
|
|
335
|
+
min-width: 550px;
|
|
336
|
+
height: calc(100vh - 200px);
|
|
337
|
+
background-color: #fff;
|
|
338
|
+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
339
|
+
border-radius: 8px;
|
|
340
|
+
|
|
341
|
+
&-mobile {
|
|
342
|
+
width: 100vw;
|
|
343
|
+
height: 100vh;
|
|
344
|
+
min-width: auto;
|
|
345
|
+
border-radius: 0;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.header-container {
|
|
349
|
+
width: 100%;
|
|
350
|
+
text-align: center;
|
|
351
|
+
font-weight: bold;
|
|
352
|
+
position: absolute;
|
|
353
|
+
top: 0;
|
|
354
|
+
left: 0;
|
|
355
|
+
z-index: 1;
|
|
356
|
+
height: 60px;
|
|
357
|
+
justify-content: center;
|
|
358
|
+
align-items: center;
|
|
359
|
+
padding: 0 70px;
|
|
360
|
+
background-color: #fff;
|
|
361
|
+
|
|
362
|
+
.back {
|
|
363
|
+
flex-direction: row;
|
|
364
|
+
align-items: center;
|
|
365
|
+
position: absolute;
|
|
366
|
+
left: 10px;
|
|
367
|
+
cursor: pointer;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.title {
|
|
371
|
+
width: 100%;
|
|
372
|
+
display: block;
|
|
373
|
+
overflow: hidden;
|
|
374
|
+
text-overflow: ellipsis;
|
|
375
|
+
white-space: nowrap;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.message-list {
|
|
380
|
+
padding: 60px 20px 20px;
|
|
381
|
+
flex: 1 1 auto;
|
|
382
|
+
overflow: hidden auto;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.message-item {
|
|
387
|
+
flex-direction: row;
|
|
388
|
+
margin: 10px 0;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.message-text {
|
|
392
|
+
flex-flow: row wrap;
|
|
393
|
+
display: inline;
|
|
394
|
+
|
|
395
|
+
&-container {
|
|
396
|
+
display: inline;
|
|
397
|
+
flex: 0 0 auto;
|
|
398
|
+
flex-direction: row;
|
|
399
|
+
|
|
400
|
+
.text {
|
|
401
|
+
vertical-align: bottom;
|
|
402
|
+
display: inline;
|
|
403
|
+
word-break: break-all;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.simple-emoji {
|
|
407
|
+
display: inline-flex;
|
|
408
|
+
width: 20px;
|
|
409
|
+
height: 20px;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.message-image {
|
|
415
|
+
max-width: 180px;
|
|
416
|
+
border-radius: 10px;
|
|
417
|
+
overflow: hidden;
|
|
418
|
+
|
|
419
|
+
.image {
|
|
420
|
+
max-width: 180px;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.message-face {
|
|
425
|
+
max-width: 100px;
|
|
426
|
+
|
|
427
|
+
.image {
|
|
428
|
+
width: 80px;
|
|
429
|
+
height: 80px;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.message-audio {
|
|
434
|
+
flex-direction: row;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.message-video {
|
|
438
|
+
position: relative;
|
|
439
|
+
|
|
440
|
+
.image {
|
|
441
|
+
max-width: 180px;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.video-play-icon {
|
|
445
|
+
position: absolute;
|
|
446
|
+
top: 50%;
|
|
447
|
+
left: 50%;
|
|
448
|
+
transform: translate(-50%, -50%);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.video {
|
|
452
|
+
max-width: 150px;
|
|
453
|
+
width: inherit;
|
|
454
|
+
height: inherit;
|
|
455
|
+
border-radius: 10px;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.message-combine {
|
|
460
|
+
max-width: 300px;
|
|
461
|
+
}
|
|
462
|
+
</style>
|