@aochuang/client-sdk 1.0.278
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 +93 -0
- package/common/avatar/avatar.vue +86 -0
- package/common/avatar/index.js +3 -0
- package/common/badge/badge.vue +105 -0
- package/common/badge/index.js +3 -0
- package/common/context-menu/context-menu-box.vue +61 -0
- package/common/context-menu/context-menu-group.vue +162 -0
- package/common/context-menu/context-menu-item.vue +179 -0
- package/common/context-menu/context-menu.vue +201 -0
- package/common/context-menu/index.js +3 -0
- package/common/context-menu/utils.js +138 -0
- package/common/friend-avatar/default.svg +1 -0
- package/common/friend-avatar/friend-avatar.vue +29 -0
- package/common/friend-avatar/index.js +3 -0
- package/common/image/index.js +3 -0
- package/common/index.js +17 -0
- package/common/room-avatar/default.svg +6 -0
- package/common/room-avatar/index.js +3 -0
- package/common/room-avatar/room-avatar.vue +29 -0
- package/common/scroll-load-more/index.js +3 -0
- package/common/scroll-load-more/scroll-load-more.vue +195 -0
- package/common/user-avatar/default.svg +1 -0
- package/common/user-avatar/index.js +3 -0
- package/common/user-avatar/user-avatar.vue +29 -0
- package/components/account-select/account-select-skeleton.vue +56 -0
- package/components/account-select/account-select.vue +205 -0
- package/components/account-select/all.svg +1 -0
- package/components/account-select/index.js +3 -0
- package/components/chat-editor/MENTION_TOKEN_SUMMARY.md +74 -0
- package/components/chat-editor/chat-editor-button/chat-editor-button.vue +78 -0
- package/components/chat-editor/chat-editor-suggestions/chat-editor-suggestions.vue +329 -0
- package/components/chat-editor/chat-editor-toolbar/chat-editor-toolbar-item.vue +28 -0
- package/components/chat-editor/chat-editor-toolbar/chat-editor-toolbar.vue +17 -0
- package/components/chat-editor/chat-editor.vue +933 -0
- package/components/chat-editor/index.js +12 -0
- package/components/chat-editor/utils.js +189 -0
- package/components/chat-friend-profile/chat-friend-profile.vue +118 -0
- package/components/chat-friend-profile/index.js +3 -0
- package/components/chat-layout/chat-layout.vue +71 -0
- package/components/chat-layout/index.js +3 -0
- package/components/chat-panel/chat-panel-box.vue +350 -0
- package/components/chat-panel/chat-panel-chat.vue +121 -0
- package/components/chat-panel/chat-panel-chats.vue +674 -0
- package/components/chat-panel/chat-panel-empty.vue +32 -0
- package/components/chat-panel/chat-panel-increment.vue +80 -0
- package/components/chat-panel/chat-panel-inner-msg.vue +25 -0
- package/components/chat-panel/chat-panel-loading.vue +29 -0
- package/components/chat-panel/chat-panel-nearest.vue +136 -0
- package/components/chat-panel/chat-panel.vue +292 -0
- package/components/chat-panel/index.js +3 -0
- package/components/chat-panel/util.js +83 -0
- package/components/chat-room-profile/chat-room-profile.vue +103 -0
- package/components/chat-room-profile/index.js +3 -0
- package/components/contacts-friend-select/contacts-friend-select-skeleton.vue +41 -0
- package/components/contacts-friend-select/contacts-friend-select.vue +204 -0
- package/components/contacts-friend-select/index.js +3 -0
- package/components/contacts-group-select/contacts-group-select-item.vue +98 -0
- package/components/contacts-group-select/contacts-group-select-skeleton.vue +81 -0
- package/components/contacts-group-select/contacts-group-select.vue +396 -0
- package/components/contacts-group-select/index.js +3 -0
- package/components/contacts-room-select/contacts-room-select-skeleton.vue +41 -0
- package/components/contacts-room-select/contacts-room-select.vue +208 -0
- package/components/contacts-room-select/index.js +3 -0
- package/components/index.js +43 -0
- package/components/layout/index.js +3 -0
- package/components/layout/layout.vue +70 -0
- package/components/session-select/index.js +11 -0
- package/components/session-select/session-select-item-skeleton.vue +59 -0
- package/components/session-select/session-select-item.vue +190 -0
- package/components/session-select/session-select.vue +386 -0
- package/components/wechat-chat-control/calling/calling.vue +227 -0
- package/components/wechat-chat-control/calling/phone-fill.svg +1 -0
- package/components/wechat-chat-control/calling/vidicon-fill.svg +1 -0
- package/components/wechat-chat-control/channel-live/channel-live.vue +198 -0
- package/components/wechat-chat-control/channel-live/quote-icon.svg +1 -0
- package/components/wechat-chat-control/channel-video/channel-video.vue +180 -0
- package/components/wechat-chat-control/channel-video/quote-icon.svg +1 -0
- package/components/wechat-chat-control/channel-video-card/channel-video-card.vue +139 -0
- package/components/wechat-chat-control/channel-video-card/quote-icon.svg +1 -0
- package/components/wechat-chat-control/company-card/company-card.vue +136 -0
- package/components/wechat-chat-control/company-card/quote-icon.svg +1 -0
- package/components/wechat-chat-control/custom-expression/custom-expression.vue +45 -0
- package/components/wechat-chat-control/empty/empty.vue +27 -0
- package/components/wechat-chat-control/file-url/file-url.vue +307 -0
- package/components/wechat-chat-control/file-url/icons/file-excel-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-info-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-music-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-pdf-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-ppt-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-settings-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-text-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-unknow-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-word-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/file-zip-line.svg +1 -0
- package/components/wechat-chat-control/file-url/icons/index.js +24 -0
- package/components/wechat-chat-control/image/image.vue +344 -0
- package/components/wechat-chat-control/image/index.js +1 -0
- package/components/wechat-chat-control/image/util.js +29 -0
- package/components/wechat-chat-control/index.js +104 -0
- package/components/wechat-chat-control/jx-sys-text/jx-sys-text.vue +28 -0
- package/components/wechat-chat-control/location/location.vue +179 -0
- package/components/wechat-chat-control/location/offline-bg.png +0 -0
- package/components/wechat-chat-control/member-change/member-change.vue +37 -0
- package/components/wechat-chat-control/music/icons/163.png +0 -0
- package/components/wechat-chat-control/music/icons/163.svg +12 -0
- package/components/wechat-chat-control/music/icons/default.png +0 -0
- package/components/wechat-chat-control/music/icons/default.svg +1 -0
- package/components/wechat-chat-control/music/icons/kuwo.png +0 -0
- package/components/wechat-chat-control/music/icons/qq.png +0 -0
- package/components/wechat-chat-control/music/icons/qq.svg +1 -0
- package/components/wechat-chat-control/music/music.vue +156 -0
- package/components/wechat-chat-control/music/utils.js +30 -0
- package/components/wechat-chat-control/quote-message/quote-message.vue +257 -0
- package/components/wechat-chat-control/real-time-position/icon.svg +1 -0
- package/components/wechat-chat-control/real-time-position/real-time-position.vue +57 -0
- package/components/wechat-chat-control/red-envelopes/quote-icon.svg +1 -0
- package/components/wechat-chat-control/red-envelopes/red-envelope.svg +1 -0
- package/components/wechat-chat-control/red-envelopes/red-envelopes.vue +168 -0
- package/components/wechat-chat-control/revoke-me-message/revoke-me-message.vue +41 -0
- package/components/wechat-chat-control/revoke-other-message/revoke-other-message.vue +41 -0
- package/components/wechat-chat-control/revoke-you-message/revoke-you-message.vue +41 -0
- package/components/wechat-chat-control/room-calling/phone-fill.svg +1 -0
- package/components/wechat-chat-control/room-calling/room-calling.vue +52 -0
- package/components/wechat-chat-control/room-calling/vidicon-fill.svg +1 -0
- package/components/wechat-chat-control/share-card/quote-icon.svg +1 -0
- package/components/wechat-chat-control/share-card/share-card.vue +140 -0
- package/components/wechat-chat-control/system/system.vue +122 -0
- package/components/wechat-chat-control/system-batch-message/system-batch-message.vue +28 -0
- package/components/wechat-chat-control/system-money/system-money.vue +39 -0
- package/components/wechat-chat-control/text/icons/icon.svg +6 -0
- package/components/wechat-chat-control/text/text.vue +164 -0
- package/components/wechat-chat-control/text-with-at/text-with-at.vue +88 -0
- package/components/wechat-chat-control/transfer/collection.svg +1 -0
- package/components/wechat-chat-control/transfer/quote-icon.svg +1 -0
- package/components/wechat-chat-control/transfer/red-transfer.svg +1 -0
- package/components/wechat-chat-control/transfer/refund.svg +1 -0
- package/components/wechat-chat-control/transfer/transfer.svg +1 -0
- package/components/wechat-chat-control/transfer/transfer.vue +263 -0
- package/components/wechat-chat-control/unknow/unknow.vue +21 -0
- package/components/wechat-chat-control/url/icons/link.svg +1 -0
- package/components/wechat-chat-control/url/icons/video.svg +6 -0
- package/components/wechat-chat-control/url/miniprogram.svg +1 -0
- package/components/wechat-chat-control/url/url-file.vue +47 -0
- package/components/wechat-chat-control/url/url-link.vue +169 -0
- package/components/wechat-chat-control/url/url-merge.vue +164 -0
- package/components/wechat-chat-control/url/url-miniprogram.vue +259 -0
- package/components/wechat-chat-control/url/url.vue +116 -0
- package/components/wechat-chat-control/util.js +234 -0
- package/components/wechat-chat-control/video/icons/video.svg +1 -0
- package/components/wechat-chat-control/video/video.vue +304 -0
- package/components/wechat-chat-control/voice/icons/voice.svg +1 -0
- package/components/wechat-chat-control/voice/voice.vue +464 -0
- package/components/wechat-chat-control/wechat-chat-control-config-item.vue +24 -0
- package/components/wechat-chat-control/wechat-chat-control-config-msg.vue +21 -0
- package/components/wechat-chat-control/wechat-chat-control-config.vue +57 -0
- package/components/wechat-chat-panel/chat-panel-chat-status/chat-panel-chat-status.vue +69 -0
- package/components/wechat-chat-panel/chat-panel-item.vue +695 -0
- package/components/wechat-chat-panel/chat-panel.vue +257 -0
- package/components/wechat-chat-panel/index.js +3 -0
- package/components/wework-chat-control/calling/calling.vue +223 -0
- package/components/wework-chat-control/calling/phone-fill.svg +1 -0
- package/components/wework-chat-control/calling/vidicon-fill.svg +1 -0
- package/components/wework-chat-control/channel-live/channel-live.vue +198 -0
- package/components/wework-chat-control/channel-live/quote-icon.svg +1 -0
- package/components/wework-chat-control/channel-video/channel-video.vue +180 -0
- package/components/wework-chat-control/channel-video/quote-icon.svg +1 -0
- package/components/wework-chat-control/company-card/company-card.vue +136 -0
- package/components/wework-chat-control/company-card/quote-icon.svg +1 -0
- package/components/wework-chat-control/custom-expression/custom-expression.vue +34 -0
- package/components/wework-chat-control/empty/empty.vue +27 -0
- package/components/wework-chat-control/expression/expression.vue +53 -0
- package/components/wework-chat-control/file-url/file-url.vue +247 -0
- package/components/wework-chat-control/file-url/icons/file-excel-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-info-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-music-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-pdf-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-ppt-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-settings-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-text-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-unknow-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-word-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/file-zip-line.svg +1 -0
- package/components/wework-chat-control/file-url/icons/index.js +24 -0
- package/components/wework-chat-control/image/image.vue +296 -0
- package/components/wework-chat-control/image/index.js +1 -0
- package/components/wework-chat-control/image/util.js +21 -0
- package/components/wework-chat-control/index.js +105 -0
- package/components/wework-chat-control/jx-sys-text/jx-sys-text.vue +28 -0
- package/components/wework-chat-control/link/link.vue +100 -0
- package/components/wework-chat-control/location/location.vue +181 -0
- package/components/wework-chat-control/location/offline-bg.png +0 -0
- package/components/wework-chat-control/red-envelopes/quote-icon.svg +1 -0
- package/components/wework-chat-control/red-envelopes/red-envelope.svg +1 -0
- package/components/wework-chat-control/red-envelopes/red-envelopes.vue +168 -0
- package/components/wework-chat-control/share-card/quote-icon.svg +1 -0
- package/components/wework-chat-control/share-card/share-card.vue +140 -0
- package/components/wework-chat-control/text/icons/icon.svg +6 -0
- package/components/wework-chat-control/text/text.vue +157 -0
- package/components/wework-chat-control/unknow/unknow.vue +21 -0
- package/components/wework-chat-control/url/icons/link.svg +1 -0
- package/components/wework-chat-control/url/icons/video.svg +6 -0
- package/components/wework-chat-control/url/miniprogram.svg +1 -0
- package/components/wework-chat-control/url/url-file.vue +37 -0
- package/components/wework-chat-control/url/url-link.vue +169 -0
- package/components/wework-chat-control/url/url-merge.vue +164 -0
- package/components/wework-chat-control/url/url-miniprogram.vue +248 -0
- package/components/wework-chat-control/url/url.vue +103 -0
- package/components/wework-chat-control/util.js +223 -0
- package/components/wework-chat-control/video/icons/video.svg +1 -0
- package/components/wework-chat-control/video/video.vue +304 -0
- package/components/wework-chat-control/voice/icons/voice.svg +1 -0
- package/components/wework-chat-control/voice/voice.vue +464 -0
- package/components/wework-chat-panel/chat-panel-controls/company-card/company-card.vue +35 -0
- package/components/wework-chat-panel/chat-panel-controls/expression/expression.vue +36 -0
- package/components/wework-chat-panel/chat-panel-controls/file-url/file-url.vue +35 -0
- package/components/wework-chat-panel/chat-panel-controls/image/image.vue +36 -0
- package/components/wework-chat-panel/chat-panel-controls/index.js +35 -0
- package/components/wework-chat-panel/chat-panel-controls/jx-sys-text/jx-sys-text.vue +28 -0
- package/components/wework-chat-panel/chat-panel-controls/link/link.vue +35 -0
- package/components/wework-chat-panel/chat-panel-controls/location/location.vue +35 -0
- package/components/wework-chat-panel/chat-panel-controls/text/text.vue +43 -0
- package/components/wework-chat-panel/chat-panel-controls/unkonw/unkonw.vue +39 -0
- package/components/wework-chat-panel/chat-panel-controls/video/video.vue +37 -0
- package/components/wework-chat-panel/chat-panel-controls/voice/voice.vue +35 -0
- package/components/wework-chat-panel/chat-panel-item.vue +650 -0
- package/components/wework-chat-panel/chat-panel.vue +163 -0
- package/components/wework-chat-panel/index.js +3 -0
- package/package.json +23 -0
- package/services/client-chat/client-chat-wechat/client-chat-account.js +426 -0
- package/services/client-chat/client-chat-wechat/client-chat-concats.js +1029 -0
- package/services/client-chat/client-chat-wechat/client-chat-draft.js +92 -0
- package/services/client-chat/client-chat-wechat/client-chat-message.js +588 -0
- package/services/client-chat/client-chat-wechat/client-chat-session-manage.js +67 -0
- package/services/client-chat/client-chat-wechat/client-chat-session.js +1048 -0
- package/services/client-chat/client-chat-wechat/client-chat-socket.js +215 -0
- package/services/client-chat/client-chat-wechat/client-chat.js +1065 -0
- package/services/client-chat/client-chat-wechat/index.js +3 -0
- package/services/client-chat/client-chat-wechat/utils.js +82 -0
- package/services/client-chat/client-chat-wework/client-chat-account.js +310 -0
- package/services/client-chat/client-chat-wework/client-chat-concats.js +772 -0
- package/services/client-chat/client-chat-wework/client-chat-message.js +278 -0
- package/services/client-chat/client-chat-wework/client-chat-session.js +929 -0
- package/services/client-chat/client-chat-wework/client-chat-socket.js +64 -0
- package/services/client-chat/client-chat-wework/client-chat.js +330 -0
- package/services/client-chat/client-chat-wework/index.js +3 -0
- package/services/client-chat/client-chat-wework/utils.js +82 -0
- package/services/index.js +10 -0
- package/services/socket/index.js +5 -0
- package/services/socket/socket.js +797 -0
- package/services/socket/utils.js +7 -0
- package/uni-common/account-portray/account-portray.vue +51 -0
- package/uni-common/account-select/account-select-item.vue +172 -0
- package/uni-common/account-select/account-select.vue +252 -0
- package/uni-common/all-friend-avatar/all-friend-avatar.vue +49 -0
- package/uni-common/friend-avatar/default.svg +1 -0
- package/uni-common/friend-avatar/friend-avatar.vue +27 -0
- package/uni-common/friend-avatar/index.js +3 -0
- package/uni-common/friend-loader/friend-loader.vue +53 -0
- package/uni-common/friend-portray/friend-portray.vue +56 -0
- package/uni-common/group-avatar/default.svg +1 -0
- package/uni-common/group-avatar/group-avatar.vue +18 -0
- package/uni-common/group-avatar/index.js +3 -0
- package/uni-common/room-avatar/default.svg +6 -0
- package/uni-common/room-avatar/index.js +3 -0
- package/uni-common/room-avatar/room-avatar.vue +27 -0
- package/uni-common/room-loader/room-loader.vue +53 -0
- package/uni-common/room-portray/room-portray.vue +56 -0
- package/uni-components/chat-control/calling/calling.vue +91 -0
- package/uni-components/chat-control/calling/phone-fill.svg +1 -0
- package/uni-components/chat-control/calling/vidicon-fill.svg +1 -0
- package/uni-components/chat-control/channel-video/channel-video.vue +89 -0
- package/uni-components/chat-control/channel-video-card/channel-video-card.vue +105 -0
- package/uni-components/chat-control/channel-video-live/channel-video-live.vue +92 -0
- package/uni-components/chat-control/chat-control-config-item/chat-control-config-item.vue +20 -0
- package/uni-components/chat-control/chat-control-config-item/index.js +3 -0
- package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-app.vue +25 -0
- package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-h5.vue +21 -0
- package/uni-components/chat-control/chat-control-config.vue +59 -0
- package/uni-components/chat-control/chat-control.vue +218 -0
- package/uni-components/chat-control/company-card/company-card.vue +123 -0
- package/uni-components/chat-control/const.js +28 -0
- package/uni-components/chat-control/expression/expression.vue +41 -0
- package/uni-components/chat-control/image/image.vue +68 -0
- package/uni-components/chat-control/index.js +89 -0
- package/uni-components/chat-control/location/location.vue +110 -0
- package/uni-components/chat-control/member-change/member-change.vue +32 -0
- package/uni-components/chat-control/quote-message/quote-message.vue +216 -0
- package/uni-components/chat-control/real-time-position/real-time-position.vue +62 -0
- package/uni-components/chat-control/redpacket/red-envelope.svg +1 -0
- package/uni-components/chat-control/redpacket/redpacket.vue +75 -0
- package/uni-components/chat-control/share-card/share-card.vue +101 -0
- package/uni-components/chat-control/system/system.vue +69 -0
- package/uni-components/chat-control/system-batch-message/system-batch-message.vue +30 -0
- package/uni-components/chat-control/system-text/system-text.vue +32 -0
- package/uni-components/chat-control/text/text.vue +67 -0
- package/uni-components/chat-control/text-with-at/text-with-at.vue +51 -0
- package/uni-components/chat-control/transfer/red-transfer.svg +1 -0
- package/uni-components/chat-control/transfer/transfer.vue +80 -0
- package/uni-components/chat-control/unkonw/unkonw.vue +37 -0
- package/uni-components/chat-control/url/icons/file-excel-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-info-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-music-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-pdf-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-ppt-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-settings-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-text-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-unknow-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-word-line.svg +1 -0
- package/uni-components/chat-control/url/icons/file-zip-line.svg +1 -0
- package/uni-components/chat-control/url/icons/index.js +24 -0
- package/uni-components/chat-control/url/miniprogram.svg +1 -0
- package/uni-components/chat-control/url/url-miniprogram.vue +116 -0
- package/uni-components/chat-control/url/url.vue +306 -0
- package/uni-components/chat-control/url-new/icons/file-excel-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-info-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-music-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-pdf-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-ppt-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-settings-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-text-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-unknow-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-word-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/file-zip-line.svg +1 -0
- package/uni-components/chat-control/url-new/icons/index.js +24 -0
- package/uni-components/chat-control/url-new/url-new.vue +110 -0
- package/uni-components/chat-control/utils.js +12 -0
- package/uni-components/chat-control/video/video.vue +156 -0
- package/uni-components/chat-control/voice/voice.vue +166 -0
- package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-collect.vue +84 -0
- package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-system.vue +28 -0
- package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet.vue +85 -0
- package/uni-components/chat-editor/chat-editor-func/chat-editor-func.vue +157 -0
- package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at-panel.vue +158 -0
- package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at.vue +61 -0
- package/uni-components/chat-editor/chat-editor-func-button/chat-editor-func-button.vue +58 -0
- package/uni-components/chat-editor/chat-editor-func-file/chat-editor-func-file.vue +54 -0
- package/uni-components/chat-editor/chat-editor-func-image/chat-editor-func-image.vue +42 -0
- package/uni-components/chat-editor/chat-editor-func-video/chat-editor-func-video.vue +42 -0
- package/uni-components/chat-editor/chat-editor-func-voice/chat-editor-func-voice.vue +25 -0
- package/uni-components/chat-editor/chat-editor-message-send/chat-editor-message-send.vue +158 -0
- package/uni-components/chat-editor/chat-editor-quote/chat-editor-quote.vue +75 -0
- package/uni-components/chat-editor/chat-editor.vue +257 -0
- package/uni-components/chat-editor/index.js +10 -0
- package/uni-components/chat-editor/util.js +65 -0
- package/uni-components/chat-panel/chat-panel-chats-box.vue +238 -0
- package/uni-components/chat-panel/chat-panel-chats-forward/chat-panel-chats-forward.vue +273 -0
- package/uni-components/chat-panel/chat-panel-chats-item.vue +578 -0
- package/uni-components/chat-panel/chat-panel-chats-status/chat-panel-chats-status.vue +71 -0
- package/uni-components/chat-panel/chat-panel-chats.vue +368 -0
- package/uni-components/chat-panel/chat-panel.vue +227 -0
- package/uni-components/contacts-group-select/contacts-group-select-item.vue +85 -0
- package/uni-components/contacts-group-select/contacts-group-select-panel.vue +119 -0
- package/uni-components/contacts-group-select/contacts-group-select.vue +150 -0
- package/utils/color.js +178 -0
- package/utils/data.js +11 -0
- package/utils/date.js +107 -0
- package/utils/event.js +3 -0
- package/utils/file.js +26 -0
- package/utils/index.js +5 -0
- package/utils/json.js +40 -0
- package/utils/log.js +243 -0
- package/utils/queue.js +97 -0
- package/utils/regexp.js +9 -0
- package/utils/string.js +66 -0
- package/utils/url.js +48 -0
- package/utils/util.js +130 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="sdk-chat-editor-chartlet">
|
|
3
|
+
<view class="sdk-chat-editor-chartlet__tabbar">
|
|
4
|
+
<ui-tabbar v-model="currentTabName">
|
|
5
|
+
<ui-tabbar-item name="default" text="默认"></ui-tabbar-item>
|
|
6
|
+
<ui-tabbar-item name="collect" text="收藏"></ui-tabbar-item>
|
|
7
|
+
</ui-tabbar>
|
|
8
|
+
</view>
|
|
9
|
+
<view class="sdk-chat-editor-chartlet__main">
|
|
10
|
+
<keep-alive>
|
|
11
|
+
<template v-if="currentTabName === 'default'">
|
|
12
|
+
<chat-editor-chartlet-system
|
|
13
|
+
@select="handleDefaultSelect"
|
|
14
|
+
></chat-editor-chartlet-system>
|
|
15
|
+
</template>
|
|
16
|
+
<template v-else-if="currentTabName === 'collect'">
|
|
17
|
+
<chat-editor-chartlet-collect
|
|
18
|
+
@select="handleCollectSelect"
|
|
19
|
+
></chat-editor-chartlet-collect>
|
|
20
|
+
</template>
|
|
21
|
+
</keep-alive>
|
|
22
|
+
</view>
|
|
23
|
+
</view>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import { MESSAGE_TYPE } from 'client-sdk/uni-components/chat-control'
|
|
28
|
+
import UiTabbar from '@aochuang/common/uni-components/tabbar/tabbar.vue'
|
|
29
|
+
import UiTabbarItem from '@aochuang/common/uni-components/tabbar/tabbar-item.vue'
|
|
30
|
+
import ChatEditorChartletSystem from './chat-editor-chartlet-system.vue'
|
|
31
|
+
import ChatEditorChartletCollect from './chat-editor-chartlet-collect.vue'
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: 'SdkChatEditorChartlet',
|
|
35
|
+
components: {
|
|
36
|
+
UiTabbar,
|
|
37
|
+
UiTabbarItem,
|
|
38
|
+
ChatEditorChartletSystem,
|
|
39
|
+
ChatEditorChartletCollect
|
|
40
|
+
},
|
|
41
|
+
props: {
|
|
42
|
+
insertTextMethod: {
|
|
43
|
+
type: Function,
|
|
44
|
+
required: true
|
|
45
|
+
},
|
|
46
|
+
submitMethod: {
|
|
47
|
+
type: Function,
|
|
48
|
+
required: true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
data () {
|
|
52
|
+
return {
|
|
53
|
+
currentTabName: 'default'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
methods: {
|
|
57
|
+
handleDefaultSelect ({ item }) {
|
|
58
|
+
if (!item) {
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
this.insertTextMethod(`[${item.label}]`)
|
|
62
|
+
},
|
|
63
|
+
handleCollectSelect ({ item }) {
|
|
64
|
+
return this.submitMethod({
|
|
65
|
+
data: {
|
|
66
|
+
messageType: MESSAGE_TYPE.CUSTOM_EXPRESSION,
|
|
67
|
+
content: item.data.url
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</script>
|
|
74
|
+
|
|
75
|
+
<style lang="less">
|
|
76
|
+
.sdk-chat-editor-chartlet{
|
|
77
|
+
height: 100%;
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
}
|
|
81
|
+
.sdk-chat-editor-chartlet__main{
|
|
82
|
+
flex: 1;
|
|
83
|
+
min-height: 0;
|
|
84
|
+
}
|
|
85
|
+
</style>
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="bi-chat-editor-func">
|
|
3
|
+
<uv-grid :col="4">
|
|
4
|
+
<uv-grid-item>
|
|
5
|
+
<chat-editor-func-image
|
|
6
|
+
:upload-root-directory="uploadRootDirectory"
|
|
7
|
+
@confirm="handleSendImageConfirm"
|
|
8
|
+
></chat-editor-func-image>
|
|
9
|
+
</uv-grid-item>
|
|
10
|
+
<uv-grid-item>
|
|
11
|
+
<chat-editor-func-video
|
|
12
|
+
:upload-root-directory="uploadRootDirectory"
|
|
13
|
+
@confirm="handleSendVideoConfirm"
|
|
14
|
+
></chat-editor-func-video>
|
|
15
|
+
</uv-grid-item>
|
|
16
|
+
<uv-grid-item>
|
|
17
|
+
<chat-editor-func-file
|
|
18
|
+
:upload-root-directory="uploadRootDirectory"
|
|
19
|
+
@confirm="handleSendFileConfirm"
|
|
20
|
+
></chat-editor-func-file>
|
|
21
|
+
</uv-grid-item>
|
|
22
|
+
<template v-if="$slots.reply">
|
|
23
|
+
<uv-grid-item>
|
|
24
|
+
<slot name="reply"></slot>
|
|
25
|
+
</uv-grid-item>
|
|
26
|
+
</template>
|
|
27
|
+
<template v-if="$slots.atmember">
|
|
28
|
+
<uv-grid-item>
|
|
29
|
+
<slot name="atmember"></slot>
|
|
30
|
+
</uv-grid-item>
|
|
31
|
+
</template>
|
|
32
|
+
<template v-if="$slots.notread">
|
|
33
|
+
<uv-grid-item>
|
|
34
|
+
<slot name="notread"></slot>
|
|
35
|
+
</uv-grid-item>
|
|
36
|
+
</template>
|
|
37
|
+
<template v-if="$slots.material">
|
|
38
|
+
<uv-grid-item>
|
|
39
|
+
<slot name="material"></slot>
|
|
40
|
+
</uv-grid-item>
|
|
41
|
+
</template>
|
|
42
|
+
</uv-grid>
|
|
43
|
+
<uv-popup
|
|
44
|
+
ref="popup"
|
|
45
|
+
mode="center"
|
|
46
|
+
bgColor="none"
|
|
47
|
+
>
|
|
48
|
+
<chat-editor-message-send
|
|
49
|
+
v-if="showMessageSendPopup"
|
|
50
|
+
:send-target="sendTarget"
|
|
51
|
+
:message-type="currentMessageType"
|
|
52
|
+
:message-content="currentMessageContent"
|
|
53
|
+
:submit-method="handleSubmitMethod"
|
|
54
|
+
@cancel="handleCancelSend"
|
|
55
|
+
>
|
|
56
|
+
</chat-editor-message-send>
|
|
57
|
+
</uv-popup>
|
|
58
|
+
</view>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script>
|
|
62
|
+
import ChatEditorFuncFile from '../chat-editor-func-file/chat-editor-func-file.vue'
|
|
63
|
+
import ChatEditorFuncImage from '../chat-editor-func-image/chat-editor-func-image.vue'
|
|
64
|
+
import ChatEditorFuncVideo from '../chat-editor-func-video/chat-editor-func-video.vue'
|
|
65
|
+
import ChatEditorFuncVoice from '../chat-editor-func-voice/chat-editor-func-voice.vue'
|
|
66
|
+
import ChatEditorFuncAt from '../chat-editor-func-at/chat-editor-func-at.vue'
|
|
67
|
+
import ChatEditorMessageSend from '../chat-editor-message-send/chat-editor-message-send.vue'
|
|
68
|
+
import { MESSAGE_TYPE } from 'client-sdk/uni-components/chat-control/index.js'
|
|
69
|
+
import { getNameByFileUrl } from '@/utils/file.js'
|
|
70
|
+
|
|
71
|
+
export default {
|
|
72
|
+
name: 'BiChatEditorFunc',
|
|
73
|
+
components: {
|
|
74
|
+
ChatEditorFuncAt,
|
|
75
|
+
ChatEditorFuncFile,
|
|
76
|
+
ChatEditorFuncImage,
|
|
77
|
+
ChatEditorFuncVideo,
|
|
78
|
+
ChatEditorFuncVoice,
|
|
79
|
+
ChatEditorMessageSend
|
|
80
|
+
},
|
|
81
|
+
props: {
|
|
82
|
+
sendTarget: {
|
|
83
|
+
type: Object,
|
|
84
|
+
required: true
|
|
85
|
+
},
|
|
86
|
+
submitMethod: {
|
|
87
|
+
type: Function,
|
|
88
|
+
required: true
|
|
89
|
+
},
|
|
90
|
+
uploadRootDirectory: {
|
|
91
|
+
type: String
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
data () {
|
|
95
|
+
return {
|
|
96
|
+
showMessageSendPopup: false,
|
|
97
|
+
currentMessageType: null,
|
|
98
|
+
currentMessageContent: null
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
methods: {
|
|
102
|
+
handleSubmitMethod (evt) {
|
|
103
|
+
return this.submitMethod(evt).then(() => {
|
|
104
|
+
this.showMessageSendPopup = false
|
|
105
|
+
this.$refs.popup.close()
|
|
106
|
+
})
|
|
107
|
+
},
|
|
108
|
+
handleSendImageConfirm ({ data }) {
|
|
109
|
+
this.showMessageSendPopup = true
|
|
110
|
+
this.currentMessageType = MESSAGE_TYPE.IMAGE
|
|
111
|
+
this.currentMessageContent = data
|
|
112
|
+
this.$refs.popup.open()
|
|
113
|
+
},
|
|
114
|
+
handleSendVideoConfirm ({ data }) {
|
|
115
|
+
this.showMessageSendPopup = true
|
|
116
|
+
this.currentMessageType = MESSAGE_TYPE.VIDEO
|
|
117
|
+
this.currentMessageContent = data
|
|
118
|
+
this.$refs.popup.open()
|
|
119
|
+
},
|
|
120
|
+
handleSendFileConfirm ({ data, file }) {
|
|
121
|
+
const params = {}
|
|
122
|
+
if (file.type.indexOf('image') >= 0) {
|
|
123
|
+
params.msgType = MESSAGE_TYPE.IMAGE
|
|
124
|
+
params.content = data
|
|
125
|
+
} else if (file.type.indexOf('video') >= 0) {
|
|
126
|
+
params.msgType = MESSAGE_TYPE.VIDEO
|
|
127
|
+
params.content = data
|
|
128
|
+
} else {
|
|
129
|
+
params.msgType = MESSAGE_TYPE.URL
|
|
130
|
+
params.content = JSON.stringify({
|
|
131
|
+
type: 'file',
|
|
132
|
+
title: file.name,
|
|
133
|
+
url: data
|
|
134
|
+
})
|
|
135
|
+
}
|
|
136
|
+
this.showMessageSendPopup = true
|
|
137
|
+
this.currentMessageType = params.msgType
|
|
138
|
+
this.currentMessageContent = params.content
|
|
139
|
+
this.$refs.popup.open()
|
|
140
|
+
},
|
|
141
|
+
handleCancelSend () {
|
|
142
|
+
this.showMessageSendPopup = false
|
|
143
|
+
this.currentMessageType = null
|
|
144
|
+
this.currentMessageContent = null
|
|
145
|
+
this.$refs.popup.close()
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
</script>
|
|
150
|
+
|
|
151
|
+
<style lang="less">
|
|
152
|
+
.bi-chat-editor-func /deep/ {
|
|
153
|
+
.uv-grid-item--hover-class{
|
|
154
|
+
opacity: 1!important;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
</style>
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="sdk-chat-editor-func-at">
|
|
3
|
+
<view class="sdk-chat-editor-func-at__result">
|
|
4
|
+
<bi-scroll-load-more
|
|
5
|
+
:data="showMemberData"
|
|
6
|
+
:page-size="false"
|
|
7
|
+
@query="handleQueryData"
|
|
8
|
+
>
|
|
9
|
+
<view
|
|
10
|
+
class="sdk-chat-editor-func-at__item"
|
|
11
|
+
v-for="item in showMemberData"
|
|
12
|
+
:key="item.id"
|
|
13
|
+
@click="handleMemberItemClick(item)"
|
|
14
|
+
>
|
|
15
|
+
<view class="sdk-chat-editor-func-at__item-avatar">
|
|
16
|
+
<ui-avatar :src="item.avatar"></ui-avatar>
|
|
17
|
+
</view>
|
|
18
|
+
<view class="sdk-chat-editor-func-at__item-main">
|
|
19
|
+
<view class="sdk-chat-editor-func-at__item-name">{{ item.nickname }}</view>
|
|
20
|
+
</view>
|
|
21
|
+
</view>
|
|
22
|
+
</bi-scroll-load-more>
|
|
23
|
+
</view>
|
|
24
|
+
<view class="sdk-chat-editor-func-at__search">
|
|
25
|
+
<ui-search
|
|
26
|
+
v-model="filters.keyword"
|
|
27
|
+
placeholder="输入群成员名称搜索"
|
|
28
|
+
immediate
|
|
29
|
+
></ui-search>
|
|
30
|
+
</view>
|
|
31
|
+
</view>
|
|
32
|
+
</template>
|
|
33
|
+
<script>
|
|
34
|
+
import UiAvatar from '@aochuang/common/uni-components/avatar/avatar.vue'
|
|
35
|
+
import UiSearch from '@aochuang/common/uni-components/search/search.vue'
|
|
36
|
+
import BiScrollLoadMore from '@aochuang/common/uni-common/scroll-load-more/scroll-load-more.vue'
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
name: 'ChatPanelEditorAtPanel',
|
|
40
|
+
components: {
|
|
41
|
+
UiAvatar,
|
|
42
|
+
UiSearch,
|
|
43
|
+
BiScrollLoadMore
|
|
44
|
+
},
|
|
45
|
+
props: {
|
|
46
|
+
queryMethod: {
|
|
47
|
+
type: Function,
|
|
48
|
+
required: true
|
|
49
|
+
},
|
|
50
|
+
confirmMethod: {
|
|
51
|
+
type: Function
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
data () {
|
|
55
|
+
return {
|
|
56
|
+
filters: {
|
|
57
|
+
keyword: null
|
|
58
|
+
},
|
|
59
|
+
selected: null,
|
|
60
|
+
roomMemberData: []
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
computed: {
|
|
64
|
+
roomMemberDataMap () {
|
|
65
|
+
return (this.roomMemberData || []).reduce((rs, v) => {
|
|
66
|
+
rs[v.id] = v
|
|
67
|
+
return rs
|
|
68
|
+
}, {})
|
|
69
|
+
},
|
|
70
|
+
showMemberData () {
|
|
71
|
+
if (!this.filters.keyword) {
|
|
72
|
+
return this.roomMemberData
|
|
73
|
+
}
|
|
74
|
+
return this.roomMemberData.filter(v => {
|
|
75
|
+
if (v.conRemark && v.conRemark.indexOf(this.filters.keyword) >= 0) {
|
|
76
|
+
return true
|
|
77
|
+
}
|
|
78
|
+
if (v.nickname && v.nickname.indexOf(this.filters.keyword) >= 0) {
|
|
79
|
+
return true
|
|
80
|
+
}
|
|
81
|
+
return false
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
methods: {
|
|
86
|
+
handleMemberItemClick (item) {
|
|
87
|
+
this.selected = item
|
|
88
|
+
this.confirmMethod && this.confirmMethod({
|
|
89
|
+
item
|
|
90
|
+
})
|
|
91
|
+
},
|
|
92
|
+
handleQueryData ({ setCallback }) {
|
|
93
|
+
setCallback(() => {
|
|
94
|
+
return this.queryMethod().then(rs => {
|
|
95
|
+
this.roomMemberData = rs
|
|
96
|
+
return rs
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
</script>
|
|
103
|
+
<style lang="less">
|
|
104
|
+
.sdk-chat-editor-func-at{
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
height: 60vh;
|
|
108
|
+
}
|
|
109
|
+
.sdk-chat-editor-func-at__title{
|
|
110
|
+
height: 24px;
|
|
111
|
+
line-height: 24px;
|
|
112
|
+
padding: 6px 12px;
|
|
113
|
+
border-bottom: 1px solid #f3f3f3;
|
|
114
|
+
box-sizing: content-box;
|
|
115
|
+
font-weight: bold;
|
|
116
|
+
}
|
|
117
|
+
.sdk-chat-editor-func-at__search{
|
|
118
|
+
padding: 6px 12px;
|
|
119
|
+
background-color: #f8f8f8;
|
|
120
|
+
border-top: 1px solid #eee;
|
|
121
|
+
}
|
|
122
|
+
.sdk-chat-editor-func-at__result {
|
|
123
|
+
flex: 1;
|
|
124
|
+
min-height: 0;
|
|
125
|
+
overflow: auto;
|
|
126
|
+
padding-bottom: 6px;
|
|
127
|
+
}
|
|
128
|
+
.sdk-chat-editor-func-at__item{
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: row;
|
|
131
|
+
align-items: center;
|
|
132
|
+
padding: 6px 12px;
|
|
133
|
+
transition: all .25s;
|
|
134
|
+
cursor: pointer;
|
|
135
|
+
position: relative;
|
|
136
|
+
&:hover {
|
|
137
|
+
background-color: #f8f8f8;
|
|
138
|
+
}
|
|
139
|
+
&.is-active {
|
|
140
|
+
background-color: #edf3fb;
|
|
141
|
+
&:after {
|
|
142
|
+
content: '';
|
|
143
|
+
position: absolute;
|
|
144
|
+
right: 12px;
|
|
145
|
+
top: 50%;
|
|
146
|
+
transform: translateY(-50%) rotate(-45deg);
|
|
147
|
+
width: 7px;
|
|
148
|
+
height: 5px;
|
|
149
|
+
border: 1px solid #4387ff;
|
|
150
|
+
border-top: 0;
|
|
151
|
+
border-right: 0;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
.sdk-chat-editor-func-at__item-avatar{
|
|
156
|
+
margin-right: 6px;
|
|
157
|
+
}
|
|
158
|
+
</style>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="bi-chat-editor-func-at">
|
|
3
|
+
<chat-editor-func-button text="@群成员" icon="at-line" @click="handleHandleClick"></chat-editor-func-button>
|
|
4
|
+
<ui-popup
|
|
5
|
+
ref="popup"
|
|
6
|
+
mode="bottom"
|
|
7
|
+
title="@群成员"
|
|
8
|
+
v-model="showPopup"
|
|
9
|
+
>
|
|
10
|
+
<chat-editor-func-at-panel
|
|
11
|
+
:query-method="queryMethod"
|
|
12
|
+
:confirm-method="handleConfirmMethod"
|
|
13
|
+
></chat-editor-func-at-panel>
|
|
14
|
+
</ui-popup>
|
|
15
|
+
</view>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import UiPopup from '@aochuang/common/uni-components/popup/popup.vue'
|
|
20
|
+
import ChatEditorFuncButton from '../chat-editor-func-button/chat-editor-func-button.vue'
|
|
21
|
+
import ChatEditorFuncAtPanel from './chat-editor-func-at-panel.vue'
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
name: 'BiChatEditorFuncAt',
|
|
25
|
+
components: {
|
|
26
|
+
UiPopup,
|
|
27
|
+
ChatEditorFuncButton,
|
|
28
|
+
ChatEditorFuncAtPanel
|
|
29
|
+
},
|
|
30
|
+
props: {
|
|
31
|
+
queryMethod: {
|
|
32
|
+
type: Function
|
|
33
|
+
},
|
|
34
|
+
confirmMethod: {
|
|
35
|
+
type: Function
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
data () {
|
|
39
|
+
return {
|
|
40
|
+
showPopup: false
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
handleHandleClick () {
|
|
45
|
+
this.showPopup = true
|
|
46
|
+
},
|
|
47
|
+
handleConfirmMethod (evt) {
|
|
48
|
+
if (!this.confirmMethod) {
|
|
49
|
+
return
|
|
50
|
+
}
|
|
51
|
+
const rs = this.confirmMethod(evt)
|
|
52
|
+
Promise.all([rs]).then(() => {
|
|
53
|
+
this.showPopup = false
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<style>
|
|
61
|
+
</style>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="bi-chat-editor-func-button" @click="handleClick">
|
|
3
|
+
<view class="bi-chat-editor-func-button__icon">
|
|
4
|
+
<slot name="icon">
|
|
5
|
+
<bi-icon :name="icon" size="24px" color="#666"></bi-icon>
|
|
6
|
+
</slot>
|
|
7
|
+
</view>
|
|
8
|
+
<view class="bi-chat-editor-func-button__text">
|
|
9
|
+
{{ text }}
|
|
10
|
+
</view>
|
|
11
|
+
</view>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import BiIcon from '@aochuang/common/uni-components/icon/icon.vue'
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
name: 'BiChatEditorFuncButton',
|
|
19
|
+
components: {
|
|
20
|
+
BiIcon
|
|
21
|
+
},
|
|
22
|
+
props: {
|
|
23
|
+
text: {
|
|
24
|
+
type: String
|
|
25
|
+
},
|
|
26
|
+
icon: {
|
|
27
|
+
type: String
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
handleClick () {
|
|
32
|
+
this.$emit('click')
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style lang="less">
|
|
39
|
+
.bi-chat-editor-func-button{
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
padding: 12px;
|
|
45
|
+
color: #666;
|
|
46
|
+
}
|
|
47
|
+
.bi-chat-editor-func-button__icon{
|
|
48
|
+
width: 54px;
|
|
49
|
+
height: 54px;
|
|
50
|
+
background-color: #fff;
|
|
51
|
+
border-radius: 4px;
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
margin-bottom: 4px;
|
|
57
|
+
}
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="bi-chat-editor-func-file">
|
|
3
|
+
<bi-oss-upload
|
|
4
|
+
source-type="file"
|
|
5
|
+
:root-directory="uploadRootDirectory"
|
|
6
|
+
:sub-directory="handleUploadSubDirectory"
|
|
7
|
+
@change="handleUploadFileSuccess"
|
|
8
|
+
>
|
|
9
|
+
<template slot="handle">
|
|
10
|
+
<chat-editor-func-button text="文件" icon="attachment-line"></chat-editor-func-button>
|
|
11
|
+
</template>
|
|
12
|
+
</bi-oss-upload>
|
|
13
|
+
</view>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import BiOssUpload from '@/common/oss-upload/oss-upload.vue'
|
|
18
|
+
import ChatEditorFuncButton from '../chat-editor-func-button/chat-editor-func-button.vue'
|
|
19
|
+
import { error } from '@aochuang/common/uni-components/message/message.js'
|
|
20
|
+
import { MESSAGE_TYPE } from 'client-sdk/uni-components/chat-control/index.js'
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
name: 'BiChatEditorFuncFuncFile',
|
|
24
|
+
components: {
|
|
25
|
+
BiOssUpload,
|
|
26
|
+
ChatEditorFuncButton
|
|
27
|
+
},
|
|
28
|
+
props: {
|
|
29
|
+
uploadRootDirectory: {
|
|
30
|
+
type: String
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
methods: {
|
|
34
|
+
handleUploadSubDirectory ({ file }) {
|
|
35
|
+
if (file.type.indexOf('image') >= 0) {
|
|
36
|
+
return MESSAGE_TYPE.IMAGE
|
|
37
|
+
} else if (file.type.indexOf('video') >= 0) {
|
|
38
|
+
return MESSAGE_TYPE.VIDEO
|
|
39
|
+
} else {
|
|
40
|
+
return MESSAGE_TYPE.URL
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
handleUploadFileSuccess ({ value, file }) {
|
|
44
|
+
this.$emit('confirm', {
|
|
45
|
+
file,
|
|
46
|
+
data: value
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<style>
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="bi-chat-editor-func-image">
|
|
3
|
+
<bi-oss-upload
|
|
4
|
+
source-type="image"
|
|
5
|
+
sub-directory="3"
|
|
6
|
+
:root-directory="uploadRootDirectory"
|
|
7
|
+
@input="handleUploadImageSuccess"
|
|
8
|
+
>
|
|
9
|
+
<template slot="handle">
|
|
10
|
+
<chat-editor-func-button text="图片" icon="image-line"></chat-editor-func-button>
|
|
11
|
+
</template>
|
|
12
|
+
</bi-oss-upload>
|
|
13
|
+
</view>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import BiOssUpload from '@/common/oss-upload/oss-upload.vue'
|
|
18
|
+
import ChatEditorFuncButton from '../chat-editor-func-button/chat-editor-func-button.vue'
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'BiChatEditorFuncImage',
|
|
22
|
+
components: {
|
|
23
|
+
BiOssUpload,
|
|
24
|
+
ChatEditorFuncButton
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
uploadRootDirectory: {
|
|
28
|
+
type: String
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
handleUploadImageSuccess (value) {
|
|
33
|
+
this.$emit('confirm', {
|
|
34
|
+
data: value
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style>
|
|
42
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="bi-chat-editor-func-video">
|
|
3
|
+
<bi-oss-upload
|
|
4
|
+
source-type="video"
|
|
5
|
+
sub-directory="43"
|
|
6
|
+
:root-directory="uploadRootDirectory"
|
|
7
|
+
@input="handleUploadVideoSuccess"
|
|
8
|
+
>
|
|
9
|
+
<template slot="handle">
|
|
10
|
+
<chat-editor-func-button text="视频" icon="vidicon-line"></chat-editor-func-button>
|
|
11
|
+
</template>
|
|
12
|
+
</bi-oss-upload>
|
|
13
|
+
</view>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import BiOssUpload from '@/common/oss-upload/oss-upload.vue'
|
|
18
|
+
import ChatEditorFuncButton from '../chat-editor-func-button/chat-editor-func-button.vue'
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'BiChatEditorFuncVideo',
|
|
22
|
+
components: {
|
|
23
|
+
BiOssUpload,
|
|
24
|
+
ChatEditorFuncButton
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
uploadRootDirectory: {
|
|
28
|
+
type: String
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
handleUploadVideoSuccess (value) {
|
|
33
|
+
this.$emit('confirm', {
|
|
34
|
+
data: value
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style>
|
|
42
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="bi-chat-editor-func-voice">
|
|
3
|
+
<chat-editor-func-button text="录音" icon="mic-line" @click="handleHandleClick"></chat-editor-func-button>
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import ChatEditorFuncButton from '../chat-editor-func-button/chat-editor-func-button.vue'
|
|
9
|
+
import { error } from '@aochuang/common/uni-components/message/message.js'
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: 'BiChatEditorFuncVoice',
|
|
13
|
+
components: {
|
|
14
|
+
ChatEditorFuncButton
|
|
15
|
+
},
|
|
16
|
+
methods: {
|
|
17
|
+
handleHandleClick () {
|
|
18
|
+
error('暂不支持')
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style>
|
|
25
|
+
</style>
|