@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,396 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sdk-contacts-group-select">
|
|
3
|
+
<template v-if="loading">
|
|
4
|
+
<div class="sdk-contacts-group-select__skeleton">
|
|
5
|
+
<contacts-group-select-skeleton></contacts-group-select-skeleton>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
<div class="sdk-contacts-group-select__group is-friend-group" :class="{'is-show-filter-panel': showFriendFilterPanel, 'is-has-filter': hasFriendGroupFilter}" v-if="friendGroupData && friendGroupData.length">
|
|
9
|
+
<div class="sdk-contacts-group-select__group-head">
|
|
10
|
+
<div class="sdk-contacts-group-select__group-head-row">
|
|
11
|
+
<div class="sdk-contacts-group-select__group-head-col is-full">
|
|
12
|
+
<div class="sdk-contacts-group-select__group-title">好友分组({{ friendGroupData ? friendGroupData.length : 0 }})</div>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="sdk-contacts-group-select__group-head-col">
|
|
15
|
+
<ui-tooltip :content="showFriendFilterPanel ? '关闭筛选' : '展开筛选'">
|
|
16
|
+
<div class="sdk-contacts-group-select__group-addon" @click="handleFriendAddonClick">
|
|
17
|
+
<ui-icon :name="showFriendFilterPanel ? 'up-down-line' : 'filter-line'"></ui-icon>
|
|
18
|
+
</div>
|
|
19
|
+
</ui-tooltip>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="sdk-contacts-group-select__group-head-row is-filter-panel">
|
|
23
|
+
<div class="sdk-contacts-group-select__group-head-col">
|
|
24
|
+
<span class="sdk-contacts-group-select__toggle" @click="handleFriendToggleEmptyClick">
|
|
25
|
+
<span class="sdk-contacts-group-select__toggle-icon">
|
|
26
|
+
<ui-icon :name="filters.friendGroupEmpty ? 'eye-close-line' : 'eye-line'"></ui-icon>
|
|
27
|
+
</span>
|
|
28
|
+
<span class="sdk-contacts-group-select__toggle-icon">{{ filters.friendGroupEmpty ? '隐藏' : '显示' }}空分组</span>
|
|
29
|
+
</span>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="sdk-contacts-group-select__group-head-col is-full">
|
|
32
|
+
<div class="sdk-contacts-group-select__group-search">
|
|
33
|
+
<ui-searchbox
|
|
34
|
+
ref="friendGroupSearchbox"
|
|
35
|
+
:value="filters.friendGroupKeyword"
|
|
36
|
+
size="mini"
|
|
37
|
+
:immediate="true"
|
|
38
|
+
placeholder="搜索分组"
|
|
39
|
+
@search="handleFriendGroupSearch"
|
|
40
|
+
></ui-searchbox>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="sdk-contacts-group-select__group-body" ref="friendGroupBody">
|
|
46
|
+
<template v-if="showFriendGroupData && showFriendGroupData.length">
|
|
47
|
+
<div
|
|
48
|
+
class="sdk-contacts-group-select__group-item"
|
|
49
|
+
v-for="group in showFriendGroupData"
|
|
50
|
+
:key="group.id"
|
|
51
|
+
>
|
|
52
|
+
<contacts-group-select-item
|
|
53
|
+
type="friend"
|
|
54
|
+
:data="group"
|
|
55
|
+
:loading="handleCheckGroupLoading(group)"
|
|
56
|
+
@click="handleFriendGroupClick(group)"
|
|
57
|
+
>
|
|
58
|
+
</contacts-group-select-item>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
<template v-else>
|
|
62
|
+
<div class="sdk-contacts-group-select__empty">
|
|
63
|
+
<ui-empty text="暂无相关数据"></ui-empty>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="sdk-contacts-group-select__group is-room-group" :class="{'is-show-filter-panel': showRoomFilterPanel, 'is-has-filter': hasRoomGroupFilter}" v-if="roomGroupData && roomGroupData.length">
|
|
69
|
+
<div class="sdk-contacts-group-select__group-head">
|
|
70
|
+
<div class="sdk-contacts-group-select__group-head-row">
|
|
71
|
+
<div class="sdk-contacts-group-select__group-head-col is-full">
|
|
72
|
+
<div class="sdk-contacts-group-select__group-title">群聊分组({{ roomGroupData ? roomGroupData.length : 0 }})</div>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="sdk-contacts-group-select__group-head-col">
|
|
75
|
+
<ui-tooltip :content="showRoomFilterPanel ? '关闭筛选' : '展开筛选'">
|
|
76
|
+
<div class="sdk-contacts-group-select__group-addon" @click="handleRoomAddonClick">
|
|
77
|
+
<ui-icon :name="showRoomFilterPanel ? 'up-down-line' : 'filter-line'"></ui-icon>
|
|
78
|
+
</div>
|
|
79
|
+
</ui-tooltip>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="sdk-contacts-group-select__group-head-row is-filter-panel">
|
|
83
|
+
<div class="sdk-contacts-group-select__group-head-col">
|
|
84
|
+
<span class="sdk-contacts-group-select__toggle" @click="handleRoomToggleEmptyClick">
|
|
85
|
+
<span class="sdk-contacts-group-select__toggle-icon">
|
|
86
|
+
<ui-icon :name="filters.roomGroupEmpty ? 'eye-close-line' : 'eye-line'"></ui-icon>
|
|
87
|
+
</span>
|
|
88
|
+
<span class="sdk-contacts-group-select__toggle-icon">{{ filters.roomGroupEmpty ? '隐藏' : '显示' }}空分组</span>
|
|
89
|
+
</span>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="sdk-contacts-group-select__group-head-col is-full">
|
|
92
|
+
<div class="sdk-contacts-group-select__group-search">
|
|
93
|
+
<ui-searchbox
|
|
94
|
+
ref="roomGroupSearchbox"
|
|
95
|
+
:value="filters.roomGroupKeyword"
|
|
96
|
+
size="mini"
|
|
97
|
+
:immediate="true"
|
|
98
|
+
placeholder="搜索分组"
|
|
99
|
+
@search="handleRoomGroupSearch"
|
|
100
|
+
></ui-searchbox>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="sdk-contacts-group-select__group-body" ref="roomGroupBody">
|
|
106
|
+
<template v-if="showRoomGroupData && showRoomGroupData.length">
|
|
107
|
+
<div
|
|
108
|
+
class="sdk-contacts-group-select__group-item"
|
|
109
|
+
v-for="group in showRoomGroupData"
|
|
110
|
+
:key="group.id"
|
|
111
|
+
>
|
|
112
|
+
<contacts-group-select-item
|
|
113
|
+
type="room"
|
|
114
|
+
:data="group"
|
|
115
|
+
:loading="handleCheckGroupLoading(group)"
|
|
116
|
+
@click="handleRoomGroupClick(group)"
|
|
117
|
+
>
|
|
118
|
+
</contacts-group-select-item>
|
|
119
|
+
</div>
|
|
120
|
+
</template>
|
|
121
|
+
<template v-else>
|
|
122
|
+
<div class="sdk-contacts-group-select__empty">
|
|
123
|
+
<ui-empty text="暂无相关数据"></ui-empty>
|
|
124
|
+
</div>
|
|
125
|
+
</template>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</template>
|
|
130
|
+
|
|
131
|
+
<script>
|
|
132
|
+
import { Icon as UiIcon, Searchbox as UiSearchbox, Empty as UiEmpty } from '@aochuang/common/components'
|
|
133
|
+
import ContactsGroupSelectItem from './contacts-group-select-item'
|
|
134
|
+
import ContactsGroupSelectSkeleton from './contacts-group-select-skeleton'
|
|
135
|
+
|
|
136
|
+
export default {
|
|
137
|
+
name: 'SdkContactsGroupSelect',
|
|
138
|
+
components: {
|
|
139
|
+
UiIcon,
|
|
140
|
+
UiEmpty,
|
|
141
|
+
UiSearchbox,
|
|
142
|
+
ContactsGroupSelectSkeleton,
|
|
143
|
+
ContactsGroupSelectItem
|
|
144
|
+
},
|
|
145
|
+
props: {
|
|
146
|
+
friendGroupData: {
|
|
147
|
+
type: Array
|
|
148
|
+
},
|
|
149
|
+
roomGroupData: {
|
|
150
|
+
type: Array
|
|
151
|
+
},
|
|
152
|
+
queryGroupDataMethod: {
|
|
153
|
+
type: Function
|
|
154
|
+
},
|
|
155
|
+
queryGroupCountMethod: {
|
|
156
|
+
type: Function
|
|
157
|
+
},
|
|
158
|
+
checkGroupLoadingMethod: {
|
|
159
|
+
type: Function
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
data() {
|
|
163
|
+
return {
|
|
164
|
+
filters: {
|
|
165
|
+
friendGroupKeyword: null,
|
|
166
|
+
friendGroupEmpty: null,
|
|
167
|
+
roomGroupKeyword: null,
|
|
168
|
+
roomGroupEmpty: null
|
|
169
|
+
},
|
|
170
|
+
loading: false,
|
|
171
|
+
showRoomFilterPanel: false,
|
|
172
|
+
showFriendFilterPanel: false
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
computed: {
|
|
176
|
+
hasFriendGroupFilter () {
|
|
177
|
+
return !!this.filters.friendGroupEmpty || !!this.filters.friendGroupKeyword
|
|
178
|
+
},
|
|
179
|
+
hasRoomGroupFilter () {
|
|
180
|
+
return !!this.filters.roomGroupEmpty || !!this.filters.roomGroupKeyword
|
|
181
|
+
},
|
|
182
|
+
showFriendGroupData () {
|
|
183
|
+
if (!this.filters.friendGroupKeyword && !this.filters.friendGroupEmpty) {
|
|
184
|
+
return this.friendGroupData
|
|
185
|
+
}
|
|
186
|
+
return this.friendGroupData.filter(v => {
|
|
187
|
+
if (this.filters.friendGroupEmpty && !v.num) {
|
|
188
|
+
return false
|
|
189
|
+
}
|
|
190
|
+
if ((v.groupName || '').indexOf(this.filters.friendGroupKeyword) >= 0) {
|
|
191
|
+
return true
|
|
192
|
+
}
|
|
193
|
+
return false
|
|
194
|
+
})
|
|
195
|
+
},
|
|
196
|
+
showRoomGroupData () {
|
|
197
|
+
if (!this.filters.roomGroupKeyword && !this.filters.roomGroupEmpty) {
|
|
198
|
+
return this.roomGroupData
|
|
199
|
+
}
|
|
200
|
+
return this.roomGroupData.filter(v => {
|
|
201
|
+
if (this.filters.roomGroupEmpty && !v.num) {
|
|
202
|
+
return false
|
|
203
|
+
}
|
|
204
|
+
if ((v.groupName || '').indexOf(this.filters.roomGroupKeyword) >= 0) {
|
|
205
|
+
return true
|
|
206
|
+
}
|
|
207
|
+
return false
|
|
208
|
+
})
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
created () {
|
|
212
|
+
this.loadData()
|
|
213
|
+
},
|
|
214
|
+
methods: {
|
|
215
|
+
loadData () {
|
|
216
|
+
this.loading = true
|
|
217
|
+
this.queryGroupDataMethod().finally(() => {
|
|
218
|
+
this.loading = false
|
|
219
|
+
})
|
|
220
|
+
},
|
|
221
|
+
handleFriendToggleEmptyClick () {
|
|
222
|
+
this.filters.friendGroupEmpty = !this.filters.friendGroupEmpty
|
|
223
|
+
},
|
|
224
|
+
handleFriendAddonClick () {
|
|
225
|
+
this.showFriendFilterPanel = !this.showFriendFilterPanel
|
|
226
|
+
this.$nextTick(() => {
|
|
227
|
+
this.$refs.friendGroupSearchbox && this.$refs.friendGroupSearchbox.focus()
|
|
228
|
+
})
|
|
229
|
+
},
|
|
230
|
+
handleRoomToggleEmptyClick () {
|
|
231
|
+
this.filters.roomGroupEmpty = !this.filters.roomGroupEmpty
|
|
232
|
+
},
|
|
233
|
+
handleRoomAddonClick () {
|
|
234
|
+
this.showRoomFilterPanel = !this.showRoomFilterPanel
|
|
235
|
+
this.$nextTick(() => {
|
|
236
|
+
this.$refs.roomGroupSearchbox && this.$refs.roomGroupSearchbox.focus()
|
|
237
|
+
})
|
|
238
|
+
},
|
|
239
|
+
handleFriendGroupSearch ({ keyword }) {
|
|
240
|
+
this.filters.friendGroupKeyword = keyword
|
|
241
|
+
},
|
|
242
|
+
handleRoomGroupSearch ({ keyword }) {
|
|
243
|
+
this.filters.roomGroupKeyword = keyword
|
|
244
|
+
},
|
|
245
|
+
handleRoomGroupClick (group) {
|
|
246
|
+
this.$emit('select', {
|
|
247
|
+
roomGroup: group
|
|
248
|
+
})
|
|
249
|
+
},
|
|
250
|
+
handleCheckGroupLoading (group) {
|
|
251
|
+
if (this.checkGroupLoadingMethod) {
|
|
252
|
+
return this.checkGroupLoadingMethod({
|
|
253
|
+
item: group
|
|
254
|
+
})
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
handleFriendGroupClick (group) {
|
|
258
|
+
this.$emit('select', {
|
|
259
|
+
friendGroup: group
|
|
260
|
+
})
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
</script>
|
|
265
|
+
<style lang="less">
|
|
266
|
+
.sdk-contacts-group-select{
|
|
267
|
+
position: relative;
|
|
268
|
+
height: 100%;
|
|
269
|
+
overflow: auto;
|
|
270
|
+
}
|
|
271
|
+
.sdk-contacts-group-select__group{
|
|
272
|
+
&.is-friend-group {
|
|
273
|
+
.sdk-contacts-group-select__group-head{
|
|
274
|
+
position: sticky;
|
|
275
|
+
top: 0;
|
|
276
|
+
background-color: #fff;
|
|
277
|
+
z-index: 10;
|
|
278
|
+
&:hover {
|
|
279
|
+
background-color: #f8f8f8;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
&.is-room-group {
|
|
284
|
+
.sdk-contacts-group-select__group-head{
|
|
285
|
+
position: sticky;
|
|
286
|
+
top: 0;
|
|
287
|
+
background-color: #fff;
|
|
288
|
+
z-index: 10;
|
|
289
|
+
&:hover {
|
|
290
|
+
background-color: #f8f8f8;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
&.is-show-filter-panel{
|
|
295
|
+
.sdk-contacts-group-select__group-head{
|
|
296
|
+
color: #333;
|
|
297
|
+
background-color: #f8f8f8;
|
|
298
|
+
}
|
|
299
|
+
.sdk-contacts-group-select__group-head-row.is-filter-panel{
|
|
300
|
+
height: auto;
|
|
301
|
+
overflow: initial;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
&.is-has-filter{
|
|
305
|
+
.sdk-contacts-group-select__group-addon{
|
|
306
|
+
color: #4387ff;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
.sdk-contacts-group-select__group-head{
|
|
311
|
+
line-height: 24px;
|
|
312
|
+
padding: 6px;
|
|
313
|
+
margin: 0 6px 3px;
|
|
314
|
+
box-sizing: content-box;
|
|
315
|
+
align-items: center;
|
|
316
|
+
cursor: pointer;
|
|
317
|
+
position: relative;
|
|
318
|
+
border-radius: 3px;
|
|
319
|
+
&:hover {
|
|
320
|
+
color: #333;
|
|
321
|
+
background-color: #f8f8f8;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
.sdk-contacts-group-select__group-head-row {
|
|
325
|
+
display: flex;
|
|
326
|
+
flex-direction: row;
|
|
327
|
+
align-items: center;
|
|
328
|
+
justify-content: space-between;
|
|
329
|
+
&.is-filter-panel{
|
|
330
|
+
height: 0;
|
|
331
|
+
overflow: hidden;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
.sdk-contacts-group-select__group-head-col {
|
|
335
|
+
&.is-full {
|
|
336
|
+
flex: 1;
|
|
337
|
+
min-width: 0;
|
|
338
|
+
}
|
|
339
|
+
&:not(:last-child) {
|
|
340
|
+
margin-right: 12px;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
.sdk-contacts-group-select__group-title{
|
|
344
|
+
color: #999;
|
|
345
|
+
font-size: 12px;
|
|
346
|
+
transition: all .25s;
|
|
347
|
+
flex: 1;
|
|
348
|
+
min-width: 0;
|
|
349
|
+
}
|
|
350
|
+
.sdk-contacts-group-select__group-addon{
|
|
351
|
+
transition: all .25s;
|
|
352
|
+
width: 24px;
|
|
353
|
+
height: 24px;
|
|
354
|
+
text-align: center;
|
|
355
|
+
line-height: 24px;
|
|
356
|
+
border-radius: 3px;
|
|
357
|
+
cursor: pointer;
|
|
358
|
+
transition: all .25s;
|
|
359
|
+
color: #999;
|
|
360
|
+
&:hover {
|
|
361
|
+
color: #333;
|
|
362
|
+
background-color: rgba(0,0,0,.05);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
.sdk-contacts-group-select__group-item{
|
|
366
|
+
margin-left: 6px;
|
|
367
|
+
margin-right: 6px;
|
|
368
|
+
}
|
|
369
|
+
.sdk-contacts-group-select__skeleton{
|
|
370
|
+
position: absolute;
|
|
371
|
+
left: 0;
|
|
372
|
+
top: 0;
|
|
373
|
+
right: 0;
|
|
374
|
+
bottom: 0;
|
|
375
|
+
overflow: hidden;
|
|
376
|
+
background: #fff;
|
|
377
|
+
z-index: 10;
|
|
378
|
+
}
|
|
379
|
+
.sdk-contacts-group-select__empty{
|
|
380
|
+
padding: 24px 0;
|
|
381
|
+
}
|
|
382
|
+
.sdk-contacts-group-select__toggle{
|
|
383
|
+
font-size: 12px;
|
|
384
|
+
display: flex;
|
|
385
|
+
flex-direction: row;
|
|
386
|
+
align-items: center;
|
|
387
|
+
cursor: pointer;
|
|
388
|
+
transition: all .25s;
|
|
389
|
+
&:hover {
|
|
390
|
+
color: #4387ff;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
.sdk-contacts-group-select__toggle-icon {
|
|
394
|
+
margin-right: 4px;
|
|
395
|
+
}
|
|
396
|
+
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div clas="sdk-contacts-room-select-skeleton">
|
|
3
|
+
<div
|
|
4
|
+
class="sdk-contacts-room-select-skeleton__item"
|
|
5
|
+
v-for="index in 20"
|
|
6
|
+
:key="index"
|
|
7
|
+
>
|
|
8
|
+
<div class="sdk-contacts-room-select-skeleton__item-avatar">
|
|
9
|
+
<ui-skeleton width="32px" height="32px"></ui-skeleton>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="sdk-contacts-room-select-skeleton__item-main">
|
|
12
|
+
<ui-skeleton width="100%" height="18px"></ui-skeleton>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
<script>
|
|
18
|
+
import UiSkeleton from '@aochuang/common/components/skeleton'
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'SdkContactsRoomSelectSkeleton',
|
|
22
|
+
components: {
|
|
23
|
+
UiSkeleton
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
<style lang="less">
|
|
28
|
+
.sdk-contacts-room-select-skeleton__item{
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: row;
|
|
31
|
+
align-items: center;
|
|
32
|
+
margin: 12px;
|
|
33
|
+
}
|
|
34
|
+
.sdk-contacts-room-select-skeleton__item-avatar{
|
|
35
|
+
margin-right: 12px;
|
|
36
|
+
}
|
|
37
|
+
.sdk-contacts-room-select-skeleton__item-main {
|
|
38
|
+
flex: 1;
|
|
39
|
+
min-width: 0;
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sdk-contacts-room-select">
|
|
3
|
+
<sdk-scroll-load-more
|
|
4
|
+
ref="loadMore"
|
|
5
|
+
:data="data"
|
|
6
|
+
:query-method="handleQueryRoomData"
|
|
7
|
+
>
|
|
8
|
+
<template slot="loading">
|
|
9
|
+
<div class="sdk-contacts-room-select__skeleton">
|
|
10
|
+
<contacts-room-select-skeleton></contacts-room-select-skeleton>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
<div
|
|
14
|
+
class="sdk-contacts-room-select__list"
|
|
15
|
+
v-if="data && data.length"
|
|
16
|
+
>
|
|
17
|
+
<div
|
|
18
|
+
class="sdk-contacts-room-select__item"
|
|
19
|
+
v-for="room in data"
|
|
20
|
+
:key="room.id"
|
|
21
|
+
:class="{'is-active': valueMap[room.id], 'is-disabled': handleRenderDisabled(room)}"
|
|
22
|
+
@click="handleRoomClick(room)"
|
|
23
|
+
@contextmenu="handleRoomItemContext(room, $event)"
|
|
24
|
+
>
|
|
25
|
+
<div class="sdk-contacts-room-select__item-main">
|
|
26
|
+
<sdk-room-avatar class="sdk-contacts-room-select__item-avatar" :src="room[avatarField]" :name="room[nameField]"></sdk-room-avatar>
|
|
27
|
+
<span class="sdk-contacts-room-select__item-name" :title="room[nameField]">
|
|
28
|
+
<slot name="name" :item="room">
|
|
29
|
+
{{room[nameField]}}
|
|
30
|
+
</slot>
|
|
31
|
+
</span>
|
|
32
|
+
</div>
|
|
33
|
+
<template v-if="$scopedSlots.addon">
|
|
34
|
+
<slot name="addon" :data="room"></slot>
|
|
35
|
+
</template>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</sdk-scroll-load-more>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
<script>
|
|
42
|
+
import SdkScrollLoadMore from '../../common/scroll-load-more'
|
|
43
|
+
import SdkRoomAvatar from '../../common/room-avatar'
|
|
44
|
+
import ContactsRoomSelectSkeleton from './contacts-room-select-skeleton.vue'
|
|
45
|
+
|
|
46
|
+
export default {
|
|
47
|
+
name: 'SdkContactsRoomSelect',
|
|
48
|
+
components: {
|
|
49
|
+
SdkRoomAvatar,
|
|
50
|
+
SdkScrollLoadMore,
|
|
51
|
+
ContactsRoomSelectSkeleton
|
|
52
|
+
},
|
|
53
|
+
props: {
|
|
54
|
+
data: {
|
|
55
|
+
type: Array
|
|
56
|
+
},
|
|
57
|
+
multiple: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false
|
|
60
|
+
},
|
|
61
|
+
value: {
|
|
62
|
+
type: [String, Array]
|
|
63
|
+
},
|
|
64
|
+
nameField: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: 'nickname'
|
|
67
|
+
},
|
|
68
|
+
avatarField: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: 'avatar'
|
|
71
|
+
},
|
|
72
|
+
disabledMethod: {
|
|
73
|
+
type: Function
|
|
74
|
+
},
|
|
75
|
+
queryMethod: {
|
|
76
|
+
type: Function
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
data () {
|
|
80
|
+
return {
|
|
81
|
+
loading: false
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
computed: {
|
|
85
|
+
valueMap () {
|
|
86
|
+
if (!this.value) {
|
|
87
|
+
return {}
|
|
88
|
+
}
|
|
89
|
+
if (this.multiple) {
|
|
90
|
+
if (!Array.isArray(this.value)) {
|
|
91
|
+
return {}
|
|
92
|
+
} else {
|
|
93
|
+
return this.value.reduce((rs, v) => {
|
|
94
|
+
rs[v] = true
|
|
95
|
+
return rs
|
|
96
|
+
}, {})
|
|
97
|
+
}
|
|
98
|
+
} else {
|
|
99
|
+
return {
|
|
100
|
+
[this.value]: true
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
methods: {
|
|
106
|
+
handleRoomItemContext (item, evt) {
|
|
107
|
+
this.$emit('item-contextmenu', item, evt)
|
|
108
|
+
},
|
|
109
|
+
handleRoomClick (item) {
|
|
110
|
+
if (this.disabledMethod && this.disabledMethod({
|
|
111
|
+
item
|
|
112
|
+
})) {
|
|
113
|
+
return
|
|
114
|
+
}
|
|
115
|
+
this.$emit('select', {
|
|
116
|
+
item
|
|
117
|
+
})
|
|
118
|
+
},
|
|
119
|
+
handleQueryRoomData (evt) {
|
|
120
|
+
this.loading = true
|
|
121
|
+
return this.queryMethod(evt).finally(() => {
|
|
122
|
+
this.loading = false
|
|
123
|
+
})
|
|
124
|
+
},
|
|
125
|
+
handleRenderDisabled (item) {
|
|
126
|
+
if (!this.disabledMethod) {
|
|
127
|
+
return false
|
|
128
|
+
}
|
|
129
|
+
return this.disabledMethod({
|
|
130
|
+
item
|
|
131
|
+
})
|
|
132
|
+
},
|
|
133
|
+
reload () {
|
|
134
|
+
return this.$refs.loadMore && this.$refs.loadMore.reload()
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
</script>
|
|
139
|
+
<style lang="less">
|
|
140
|
+
.sdk-contacts-room-select{
|
|
141
|
+
height: 100%;
|
|
142
|
+
position: relative;
|
|
143
|
+
}
|
|
144
|
+
.sdk-contacts-room-select__item{
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: row;
|
|
147
|
+
align-items: center;
|
|
148
|
+
padding: 8px 16px;
|
|
149
|
+
position: relative;
|
|
150
|
+
line-height: 1.5em;
|
|
151
|
+
transition: all .25s;
|
|
152
|
+
cursor: pointer;
|
|
153
|
+
&.is-disabled {
|
|
154
|
+
cursor: not-allowed;
|
|
155
|
+
opacity: .5;
|
|
156
|
+
}
|
|
157
|
+
&:not(.is-disabled) {
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
&:hover {
|
|
160
|
+
background-color: rgba(0,0,0,.03);
|
|
161
|
+
}
|
|
162
|
+
&.is-active {
|
|
163
|
+
background-color: #e0eafe;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
.sdk-contacts-room-select__item-main{
|
|
168
|
+
flex: 1;
|
|
169
|
+
min-width: 0;
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-direction: row;
|
|
172
|
+
align-items: center;
|
|
173
|
+
}
|
|
174
|
+
.sdk-contacts-room-select__item:after {
|
|
175
|
+
content: '';
|
|
176
|
+
position: absolute;
|
|
177
|
+
bottom: 0;
|
|
178
|
+
left: 54px;
|
|
179
|
+
right: 12px;
|
|
180
|
+
border-bottom: 1px solid #f8f8f8;
|
|
181
|
+
}
|
|
182
|
+
.sdk-contacts-room-select__item-avatar {
|
|
183
|
+
margin-right: 8px;
|
|
184
|
+
border-radius: 3px;
|
|
185
|
+
min-width: 32px;
|
|
186
|
+
height: 32px;
|
|
187
|
+
background-color: #eee;
|
|
188
|
+
border-radius: 3px;
|
|
189
|
+
}
|
|
190
|
+
.sdk-contacts-room-select__item-name{
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
text-overflow: ellipsis;
|
|
193
|
+
display: -webkit-box;
|
|
194
|
+
-webkit-line-clamp: 2;
|
|
195
|
+
-webkit-box-orient: vertical;
|
|
196
|
+
word-break: break-all;
|
|
197
|
+
}
|
|
198
|
+
.sdk-contacts-room-select__skeleton{
|
|
199
|
+
position: absolute;
|
|
200
|
+
left: 0;
|
|
201
|
+
top: 0;
|
|
202
|
+
right: 0;
|
|
203
|
+
bottom: 0;
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
background: #fff;
|
|
206
|
+
z-index: 10;
|
|
207
|
+
}
|
|
208
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import AccountSelect from './account-select'
|
|
2
|
+
import ContactsGroupSelect from './contacts-group-select'
|
|
3
|
+
import ContactsRoomSelect from './contacts-room-select'
|
|
4
|
+
import ContactsFriendSelect from './contacts-friend-select'
|
|
5
|
+
import Layout from './layout'
|
|
6
|
+
import { SessionSelect, SessionSelectItem, SessionSelectItemSkeleton } from './session-select'
|
|
7
|
+
import ChatEditor, { ChatEditorButton, ChatEditorToolbar, ChatEditorToolbarItem } from './chat-editor'
|
|
8
|
+
import WechatChatPanel from './wechat-chat-panel'
|
|
9
|
+
import WeworkChatPanel from './wework-chat-panel'
|
|
10
|
+
import ChatLayout from './chat-layout'
|
|
11
|
+
import ChatFriendProfile from './chat-friend-profile'
|
|
12
|
+
import ChatRoomProfile from './chat-room-profile'
|
|
13
|
+
import { chatControls as WechatChatControls, WechatChatControlConfig, WechatChatControlConfigMsg, WechatChatControlConfigItem } from './wechat-chat-control'
|
|
14
|
+
import { MESSAGE_TYPE, formatShortMessage, formatShortSessionMessage } from './wechat-chat-control/util'
|
|
15
|
+
import { MESSAGE_TYPE as MESSAGE_TYPE_W } from './wework-chat-control/util'
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
formatShortMessage,
|
|
19
|
+
formatShortSessionMessage,
|
|
20
|
+
WechatChatControls,
|
|
21
|
+
WechatChatControlConfig,
|
|
22
|
+
WechatChatControlConfigMsg,
|
|
23
|
+
WechatChatControlConfigItem,
|
|
24
|
+
MESSAGE_TYPE,
|
|
25
|
+
MESSAGE_TYPE_W,
|
|
26
|
+
AccountSelect,
|
|
27
|
+
ContactsGroupSelect,
|
|
28
|
+
ContactsRoomSelect,
|
|
29
|
+
ContactsFriendSelect,
|
|
30
|
+
Layout,
|
|
31
|
+
SessionSelect,
|
|
32
|
+
SessionSelectItem,
|
|
33
|
+
SessionSelectItemSkeleton,
|
|
34
|
+
ChatEditor,
|
|
35
|
+
ChatEditorButton,
|
|
36
|
+
ChatEditorToolbar,
|
|
37
|
+
ChatEditorToolbarItem,
|
|
38
|
+
ChatLayout,
|
|
39
|
+
ChatFriendProfile,
|
|
40
|
+
ChatRoomProfile,
|
|
41
|
+
WechatChatPanel,
|
|
42
|
+
WeworkChatPanel
|
|
43
|
+
}
|