@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,250 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="['tui-chat', !isPC && 'tui-chat-h5']">
|
|
3
|
+
<div
|
|
4
|
+
v-if="currentConversationID"
|
|
5
|
+
:class="['tui-chat', !isPC && 'tui-chat-h5']"
|
|
6
|
+
>
|
|
7
|
+
<ChatHeader
|
|
8
|
+
:class="[
|
|
9
|
+
'tui-chat-header',
|
|
10
|
+
!isPC && 'tui-chat-H5-header',
|
|
11
|
+
isUniFrameWork && 'tui-chat-uniapp-header',
|
|
12
|
+
]"
|
|
13
|
+
:canCloseChat="props.canCloseChat"
|
|
14
|
+
@closeChat="closeChat"
|
|
15
|
+
/>
|
|
16
|
+
<MessageList
|
|
17
|
+
ref="messageListRef"
|
|
18
|
+
:class="['tui-chat-message-list', !isPC && 'tui-chat-h5-message-list']"
|
|
19
|
+
@handleEditor="handleEditor"
|
|
20
|
+
@closeInputToolBar="() => changeToolbarDisplayType('none')"
|
|
21
|
+
/>
|
|
22
|
+
<MessageInputToolbar
|
|
23
|
+
v-if="isInputToolbarShow"
|
|
24
|
+
:class="[
|
|
25
|
+
'tui-chat-message-input-toolbar',
|
|
26
|
+
!isPC && 'tui-chat-h5-message-input-toolbar',
|
|
27
|
+
isUniFrameWork && 'tui-chat-uni-message-input-toolbar',
|
|
28
|
+
]"
|
|
29
|
+
:displayType="inputToolbarDisplayType"
|
|
30
|
+
@insertEmoji="insertEmoji"
|
|
31
|
+
@changeToolbarDisplayType="changeToolbarDisplayType"
|
|
32
|
+
@scrollToLatestMessage="scrollToLatestMessage"
|
|
33
|
+
/>
|
|
34
|
+
<MessageInput
|
|
35
|
+
ref="messageInputRef"
|
|
36
|
+
:class="[
|
|
37
|
+
'tui-chat-message-input',
|
|
38
|
+
!isPC && 'tui-chat-h5-message-input',
|
|
39
|
+
isUniFrameWork && 'tui-chat-uni-message-input',
|
|
40
|
+
isWeChat && 'tui-chat-wx-message-input',
|
|
41
|
+
]"
|
|
42
|
+
:isMuted="false"
|
|
43
|
+
:muteText="TUITranslateService.t('TUIChat.您已被管理员禁言')"
|
|
44
|
+
:placeholder="TUITranslateService.t('TUIChat.请输入消息')"
|
|
45
|
+
:inputToolbarDisplayType="inputToolbarDisplayType"
|
|
46
|
+
@changeToolbarDisplayType="changeToolbarDisplayType"
|
|
47
|
+
@emojiShow="emojiShow"
|
|
48
|
+
@toolShow="toolShow"
|
|
49
|
+
@blurToolAndEmojiH5="blurToolAndEmojiH5"
|
|
50
|
+
/>
|
|
51
|
+
<div class="input-toolbar-h5">
|
|
52
|
+
<div :class="['emoji-dialog-h5',(toolShowH5 && !emojiOpen)?'tool-dialog-h5':'']">
|
|
53
|
+
<div v-if="emojiOpen">
|
|
54
|
+
<EmojiDialog
|
|
55
|
+
@insertEmoji="insertEmoji"
|
|
56
|
+
@sendMessage="sendMessage"
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
<MessageInputToolbar
|
|
60
|
+
v-if="!isPC"
|
|
61
|
+
:class="[
|
|
62
|
+
'tui-chat-message-input-toolbar',
|
|
63
|
+
!isPC && 'tui-chat-h5-message-input-toolbar',
|
|
64
|
+
isUniFrameWork && 'tui-chat-uni-message-input-toolbar',
|
|
65
|
+
]"
|
|
66
|
+
:isH5ToolShow="toolShowH5"
|
|
67
|
+
:displayType="inputToolbarDisplayType"
|
|
68
|
+
@insertEmoji="insertEmoji"
|
|
69
|
+
@changeToolbarDisplayType="changeToolbarDisplayType"
|
|
70
|
+
@scrollToLatestMessage="scrollToLatestMessage"
|
|
71
|
+
@sendMessage="sendMessage"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
<script lang="ts" setup>
|
|
79
|
+
import vue from '../../adapter-vue';
|
|
80
|
+
import {
|
|
81
|
+
TUITranslateService,
|
|
82
|
+
TUIConversationService,
|
|
83
|
+
TUIStore,
|
|
84
|
+
StoreName,
|
|
85
|
+
IMessageModel,
|
|
86
|
+
TUIChatEngine
|
|
87
|
+
} from '@tencentcloud/chat-uikit-engine';
|
|
88
|
+
import TUICore, { TUIConstants, TUILogin } from '@tencentcloud/tui-core';
|
|
89
|
+
import ChatHeader from './chat-header/index-web.vue';
|
|
90
|
+
import MessageList from './message-list/index-web.vue';
|
|
91
|
+
import MessageInput from './message-input/index-web.vue';
|
|
92
|
+
import MessageInputToolbar from './message-input-toolbar/index-web.vue';
|
|
93
|
+
import EmojiDialog from './message-input-toolbar/emoji-dialog-mobile/emoji-dialog-mobile.vue';
|
|
94
|
+
import { isPC, isH5 ,isWeChat, isUniFrameWork } from '../../utils/env';
|
|
95
|
+
import { ToolbarDisplayType } from '../../interface';
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
const { ref, onMounted, onUnmounted, computed } = vue;
|
|
99
|
+
|
|
100
|
+
interface IProps {
|
|
101
|
+
canCloseChat?: boolean;
|
|
102
|
+
SDKAppID?:number;
|
|
103
|
+
userID?:string;
|
|
104
|
+
userSig?:string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const emits = defineEmits(['closeChat']);
|
|
108
|
+
|
|
109
|
+
const currentConversationID = ref();
|
|
110
|
+
const inputToolbarDisplayType = ref<ToolbarDisplayType>('none');
|
|
111
|
+
const messageInputRef = ref();
|
|
112
|
+
const messageListRef = ref<InstanceType<typeof MessageList>>();
|
|
113
|
+
const emojiOpen = ref(false);
|
|
114
|
+
const toolShowH5 = ref(false);
|
|
115
|
+
const props = withDefaults(defineProps<IProps>(), {
|
|
116
|
+
canCloseChat: true,
|
|
117
|
+
SDKAppID: 0,
|
|
118
|
+
userID: '',
|
|
119
|
+
userSig: '',
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const loginCustomerUIKit = () => {
|
|
123
|
+
TUIChatEngine.login({
|
|
124
|
+
SDKAppID: props.SDKAppID as number,
|
|
125
|
+
userID: props.userID,
|
|
126
|
+
userSig: props.userSig,
|
|
127
|
+
useUploadPlugin: true,
|
|
128
|
+
}).then(() => {
|
|
129
|
+
console.log("ai-desk-customer login success");
|
|
130
|
+
let conversationID = 'C2C@customer_service_account';
|
|
131
|
+
TUIConversationService.switchConversation(conversationID);
|
|
132
|
+
}).catch((error) => {
|
|
133
|
+
console.log(error);
|
|
134
|
+
})
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
try {
|
|
138
|
+
const userContext = TUILogin.getContext();
|
|
139
|
+
if(userContext.userID == '' && props.SDKAppID!==0 && props.userID!=='' && props.userSig!==''){
|
|
140
|
+
loginCustomerUIKit();
|
|
141
|
+
}
|
|
142
|
+
} catch (e) {
|
|
143
|
+
console.log(e)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
onMounted(() => {
|
|
147
|
+
TUIStore.watch(StoreName.CONV, {
|
|
148
|
+
currentConversationID: onCurrentConversationIDUpdate,
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
onUnmounted(() => {
|
|
153
|
+
TUIStore.unwatch(StoreName.CONV, {
|
|
154
|
+
currentConversationID: onCurrentConversationIDUpdate,
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
const isInputToolbarShow = computed<boolean>(() => {
|
|
159
|
+
return (isUniFrameWork || isH5) ? inputToolbarDisplayType.value !== 'none' : true;
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
const reset = () => {
|
|
163
|
+
TUIConversationService.switchConversation('');
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
const closeChat = (conversationID: string) => {
|
|
167
|
+
emits('closeChat', conversationID);
|
|
168
|
+
reset();
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const insertEmoji = (emojiObj: object) => {
|
|
172
|
+
messageInputRef.value?.insertEmoji(emojiObj);
|
|
173
|
+
};
|
|
174
|
+
const sendMessage = () => {
|
|
175
|
+
messageInputRef.value?.sendMessage();
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const handleEditor = (message: IMessageModel, type: string) => {
|
|
179
|
+
if (!message || !type) return;
|
|
180
|
+
switch (type) {
|
|
181
|
+
case 'reference':
|
|
182
|
+
// todo
|
|
183
|
+
break;
|
|
184
|
+
case 'reply':
|
|
185
|
+
// todo
|
|
186
|
+
break;
|
|
187
|
+
case 'reedit':
|
|
188
|
+
if (message?.payload?.text) {
|
|
189
|
+
messageInputRef?.value?.reEdit(message?.payload?.text);
|
|
190
|
+
}
|
|
191
|
+
break;
|
|
192
|
+
default:
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
function changeToolbarDisplayType(type: ToolbarDisplayType) {
|
|
198
|
+
inputToolbarDisplayType.value
|
|
199
|
+
= inputToolbarDisplayType.value === type ? 'none' : type;
|
|
200
|
+
if (inputToolbarDisplayType.value !== 'none' && isUniFrameWork) {
|
|
201
|
+
uni.$emit('scroll-to-bottom');
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function scrollToLatestMessage() {
|
|
206
|
+
messageListRef.value?.scrollToLatestMessage();
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function onCurrentConversationIDUpdate(conversationID: string) {
|
|
210
|
+
if (currentConversationID.value === conversationID) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
currentConversationID.value = conversationID;
|
|
215
|
+
|
|
216
|
+
// The TUICustomerServicePlugin plugin determines if the current conversation is a customer service conversation, then sets chatType and activates the conversation.
|
|
217
|
+
TUICore.callService({
|
|
218
|
+
serviceName: TUIConstants.TUICustomerServicePlugin.SERVICE.NAME,
|
|
219
|
+
method: TUIConstants.TUICustomerServicePlugin.SERVICE.METHOD.ACTIVE_CONVERSATION,
|
|
220
|
+
params: { conversationID: conversationID },
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function emojiShow(){
|
|
225
|
+
if(toolShowH5.value === true){
|
|
226
|
+
toolShowH5.value = false;
|
|
227
|
+
}
|
|
228
|
+
emojiOpen.value = !emojiOpen.value;
|
|
229
|
+
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function toolShow(){
|
|
233
|
+
if(emojiOpen.value === true){
|
|
234
|
+
emojiOpen.value = false;
|
|
235
|
+
}
|
|
236
|
+
toolShowH5.value = !toolShowH5.value;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function blurToolAndEmojiH5(){
|
|
240
|
+
if(emojiOpen.value === true){
|
|
241
|
+
emojiOpen.value = false;
|
|
242
|
+
}
|
|
243
|
+
toolShowH5.value = false;
|
|
244
|
+
|
|
245
|
+
}
|
|
246
|
+
</script>
|
|
247
|
+
|
|
248
|
+
<style scoped lang="scss" src="./style/index.scss">
|
|
249
|
+
|
|
250
|
+
</style>
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="message-input-wrapper">
|
|
3
|
+
<MessageInputQuote />
|
|
4
|
+
<div
|
|
5
|
+
:class="[
|
|
6
|
+
'message-input-container',
|
|
7
|
+
!isPC && 'message-input-container-h5',
|
|
8
|
+
]"
|
|
9
|
+
>
|
|
10
|
+
<MessageInputEditor
|
|
11
|
+
ref="editor"
|
|
12
|
+
:placeholder="props.placeholder"
|
|
13
|
+
:isMuted="props.isMuted"
|
|
14
|
+
:muteText="props.muteText"
|
|
15
|
+
:enableInput="props.enableInput"
|
|
16
|
+
:enableTyping="props.enableTyping"
|
|
17
|
+
:enableDragUpload="props.enableDragUpload"
|
|
18
|
+
@sendMessage="sendMessage"
|
|
19
|
+
@onTyping="onTyping"
|
|
20
|
+
@blurToolAndEmojiH5="blurToolAndEmojiH5"
|
|
21
|
+
/>
|
|
22
|
+
<MessageInputButton
|
|
23
|
+
v-if="!props.isMuted && isPC"
|
|
24
|
+
@sendMessage="sendMessage"
|
|
25
|
+
/>
|
|
26
|
+
<div v-if="isH5" class="emoji-icon" id="emoji-icon-h5" @click="emojiShow">
|
|
27
|
+
<Icon :file="emojiIcon" width="20px" height="20px"/>
|
|
28
|
+
</div>
|
|
29
|
+
<div v-if="isH5" class="tool-icon" @click="toolShow">
|
|
30
|
+
<Icon :file="toolIcon" width="20px" height="20px"/>
|
|
31
|
+
</div>
|
|
32
|
+
<div v-if="isH5" class="send-btn-h5" @click="sendMessage">
|
|
33
|
+
发送
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script setup lang="ts">
|
|
41
|
+
import {
|
|
42
|
+
TUIStore,
|
|
43
|
+
StoreName,
|
|
44
|
+
IConversationModel,
|
|
45
|
+
} from '@tencentcloud/chat-uikit-engine';
|
|
46
|
+
import vue from '../../../adapter-vue';
|
|
47
|
+
import MessageInputEditor from './message-input-editor-web.vue';
|
|
48
|
+
import MessageInputButton from './message-input-button.vue';
|
|
49
|
+
import MessageInputQuote from './message-input-quote/index.vue';
|
|
50
|
+
import { sendMessages, sendTyping } from '../utils/sendMessage';
|
|
51
|
+
import { transformTextWithEmojiNamesToKeys } from '../emoji-config';
|
|
52
|
+
import { isPC,isH5 } from '../../../utils/env';
|
|
53
|
+
import Icon from '../../common/Icon.vue';
|
|
54
|
+
import emojiIcon from '../../../assets/emoji.png';
|
|
55
|
+
import toolIcon from '../../../assets/more_tools.png';
|
|
56
|
+
const { ref,onMounted,onBeforeUnmount } = vue;
|
|
57
|
+
|
|
58
|
+
const props = defineProps({
|
|
59
|
+
placeholder: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: 'this is placeholder',
|
|
62
|
+
},
|
|
63
|
+
isMuted: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: true,
|
|
66
|
+
},
|
|
67
|
+
muteText: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: '',
|
|
70
|
+
},
|
|
71
|
+
enableInput: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: true,
|
|
74
|
+
},
|
|
75
|
+
enableDragUpload: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: true,
|
|
78
|
+
},
|
|
79
|
+
enableTyping: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: true,
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const emit = defineEmits(['sendMessage', 'resetReplyOrReference', 'onTyping','scrollToLatestMessage','changeToolbarDisplayType','insertEmoji','emojiShow','toolShow','blurToolAndEmojiH5']);
|
|
86
|
+
const editor = ref<InstanceType<typeof MessageInputEditor>>();
|
|
87
|
+
const currentConversation = ref<IConversationModel>();
|
|
88
|
+
const h5Dialog = ref<HTMLElement>();
|
|
89
|
+
|
|
90
|
+
onMounted(() => {
|
|
91
|
+
// document.addEventListener('click', handleClick);
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
onBeforeUnmount(() => {
|
|
95
|
+
// document.removeEventListener('click', handleClick);
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
function handleClick(e: any) {
|
|
99
|
+
var div = document.getElementById('emoji-icon-h5'); // 替换为你的 div 元素的 ID
|
|
100
|
+
var targetElement = e.target;
|
|
101
|
+
|
|
102
|
+
if (div!=null && targetElement!=null && !div.contains(targetElement instanceof Node ? targetElement : null)) {
|
|
103
|
+
// 在这里执行你想要触发的函数
|
|
104
|
+
emit('blurToolAndEmojiH5');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
TUIStore.watch(StoreName.CONV, {
|
|
109
|
+
currentConversation: (conversation: IConversationModel) => {
|
|
110
|
+
currentConversation.value = conversation;
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const onTyping = (inputContentEmpty: boolean, inputBlur: boolean) => {
|
|
115
|
+
sendTyping(inputContentEmpty, inputBlur);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const sendMessage = async () => {
|
|
119
|
+
const _editorContentList = editor.value?.getEditorContent();
|
|
120
|
+
if (!_editorContentList || !currentConversation.value) return;
|
|
121
|
+
const editorContentList = _editorContentList.map((editor: any) => {
|
|
122
|
+
if (editor.type === 'text') {
|
|
123
|
+
editor.payload.text = transformTextWithEmojiNamesToKeys(
|
|
124
|
+
editor.payload.text,
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
return editor;
|
|
128
|
+
});
|
|
129
|
+
await sendMessages(editorContentList, currentConversation.value);
|
|
130
|
+
emit('sendMessage');
|
|
131
|
+
editor.value?.resetEditor();
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const insertEmoji = (emoji: any) => {
|
|
135
|
+
editor.value?.addEmoji(emoji);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const reEdit = (content: any) => {
|
|
139
|
+
editor.value?.resetEditor();
|
|
140
|
+
editor.value?.setEditorContent(content);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
const emojiShow = () => {
|
|
145
|
+
emit('emojiShow');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const toolShow = () => {
|
|
149
|
+
emit('toolShow');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const blurToolAndEmojiH5 = () =>{
|
|
153
|
+
emit('blurToolAndEmojiH5');
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
defineExpose({
|
|
157
|
+
insertEmoji,
|
|
158
|
+
reEdit,
|
|
159
|
+
sendMessage,
|
|
160
|
+
});
|
|
161
|
+
</script>
|
|
162
|
+
|
|
163
|
+
<style scoped lang="scss">
|
|
164
|
+
@import "../style/common";
|
|
165
|
+
|
|
166
|
+
.message-input-wrapper {
|
|
167
|
+
box-sizing: border-box;
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-direction: column;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.message-input-container {
|
|
173
|
+
box-sizing: border-box;
|
|
174
|
+
flex: 1;
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
border: none;
|
|
178
|
+
overflow: hidden;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.message-input-container-h5 {
|
|
182
|
+
display: flex;
|
|
183
|
+
flex-flow: row nowrap;
|
|
184
|
+
align-items: flex-end;
|
|
185
|
+
}
|
|
186
|
+
.emoji-icon {
|
|
187
|
+
background: #fff;
|
|
188
|
+
border-radius: 0 9.4px 9.4px 0;
|
|
189
|
+
padding: 9.4px;
|
|
190
|
+
display: flex;
|
|
191
|
+
justify-content: center;
|
|
192
|
+
align-items: center;
|
|
193
|
+
}
|
|
194
|
+
.tool-icon {
|
|
195
|
+
background: #fff;
|
|
196
|
+
margin-left: 4px;
|
|
197
|
+
border-radius: 9.4px;
|
|
198
|
+
padding: 9.4px;
|
|
199
|
+
display: flex;
|
|
200
|
+
justify-content: center;
|
|
201
|
+
align-items: center;
|
|
202
|
+
}
|
|
203
|
+
.input-tool-dialog{
|
|
204
|
+
height: fit-content;
|
|
205
|
+
background: #fff;
|
|
206
|
+
}
|
|
207
|
+
.send-btn-h5 {
|
|
208
|
+
background-color: #1c66e5;
|
|
209
|
+
color: #fff;
|
|
210
|
+
padding: 10px 12px;
|
|
211
|
+
margin-left: 5px;
|
|
212
|
+
border-radius: 7px;
|
|
213
|
+
}
|
|
214
|
+
</style>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="['message-input-button', !isPC && 'message-input-button-h5']">
|
|
3
|
+
<button
|
|
4
|
+
v-if="props.enableSend"
|
|
5
|
+
class="message-input-button-cont"
|
|
6
|
+
data-type="text"
|
|
7
|
+
:disabled="false"
|
|
8
|
+
@click="sendMessage"
|
|
9
|
+
>
|
|
10
|
+
<p class="message-input-button-hover">
|
|
11
|
+
{{ TUITranslateService.t("TUIChat.按Enter发送,Ctrl+Enter换行") }}
|
|
12
|
+
</p>
|
|
13
|
+
{{ TUITranslateService.t("发送") }}
|
|
14
|
+
</button>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import { TUITranslateService } from '@tencentcloud/chat-uikit-engine';
|
|
19
|
+
import { isPC } from '../../../utils/env';
|
|
20
|
+
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
enableSend: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: true,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const emits = defineEmits(['sendMessage']);
|
|
29
|
+
|
|
30
|
+
const sendMessage = () => {
|
|
31
|
+
emits('sendMessage');
|
|
32
|
+
};
|
|
33
|
+
</script>
|
|
34
|
+
<style scoped lang="scss">
|
|
35
|
+
@import "../style/common";
|
|
36
|
+
|
|
37
|
+
.message-input-button {
|
|
38
|
+
position: absolute;
|
|
39
|
+
bottom: 20px;
|
|
40
|
+
right: 20px;
|
|
41
|
+
|
|
42
|
+
&-h5 {
|
|
43
|
+
position: static;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-cont {
|
|
47
|
+
padding: 8px 20px;
|
|
48
|
+
border-radius: 4px;
|
|
49
|
+
border: none;
|
|
50
|
+
font-size: 14px;
|
|
51
|
+
text-align: center;
|
|
52
|
+
line-height: 20px;
|
|
53
|
+
font-weight: 400;
|
|
54
|
+
background: #1c66e5;
|
|
55
|
+
color: #fff;
|
|
56
|
+
letter-spacing: 0;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&-hover {
|
|
61
|
+
display: none;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
align-items: center;
|
|
64
|
+
position: absolute;
|
|
65
|
+
right: 120%;
|
|
66
|
+
word-break: keep-all;
|
|
67
|
+
height: 30px;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
top: 0;
|
|
70
|
+
bottom: 0;
|
|
71
|
+
margin: auto 0;
|
|
72
|
+
padding: 5px 10px;
|
|
73
|
+
border-radius: 3px;
|
|
74
|
+
background: #000;
|
|
75
|
+
color: #fff;
|
|
76
|
+
opacity: 0.3;
|
|
77
|
+
|
|
78
|
+
&::before {
|
|
79
|
+
content: "";
|
|
80
|
+
position: absolute;
|
|
81
|
+
width: 0;
|
|
82
|
+
height: 0;
|
|
83
|
+
right: -20px;
|
|
84
|
+
border: 10px solid transparent;
|
|
85
|
+
border-left: 10px solid #000;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:hover {
|
|
90
|
+
.message-input-button-hover {
|
|
91
|
+
display: flex;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</style>
|