@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,139 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sdk-chat-control-channel-card" :class="['sdk-chat-control-channel-card--' + type]">
|
|
3
|
+
<template v-if="type === 'default'">
|
|
4
|
+
<div class="sdk-chat-control-channel-card__main">
|
|
5
|
+
<div class="sdk-chat-control-channel-card__avatar">
|
|
6
|
+
<sdk-avatar :src="avatar" :radius="false" size="medium"></sdk-avatar>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="sdk-chat-control-channel-card__fields">
|
|
9
|
+
<div class="sdk-chat-control-channel-card__title">{{name}}</div>
|
|
10
|
+
<div class="sdk-chat-control-channel-card__summary">{{description}}</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="sdk-chat-control-channel-card__foot">
|
|
14
|
+
<span class="sdk-chat-control-channel-card__category">{{category}}</span>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
<template v-else-if="type === 'quote'">
|
|
18
|
+
<div class="sdk-chat-control-channel-card__icon"></div>
|
|
19
|
+
<div class="sdk-chat-control-channel-card__title">{{name}}</div>
|
|
20
|
+
<sdk-avatar :src="avatar" :radius="false" size="medium"></sdk-avatar>
|
|
21
|
+
</template>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
<script>
|
|
25
|
+
import SdkAvatar from '../../../common/avatar'
|
|
26
|
+
import { parse, parseXml } from '../../../utils/json'
|
|
27
|
+
import { formatOssPath } from '@aochuang/common/utils/oss'
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
name: 'SdkChatControlChannelCard',
|
|
31
|
+
components: {
|
|
32
|
+
SdkAvatar
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
id: {
|
|
36
|
+
type: String
|
|
37
|
+
},
|
|
38
|
+
content: {
|
|
39
|
+
type: [String, Object]
|
|
40
|
+
},
|
|
41
|
+
type: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: 'default',
|
|
44
|
+
validator (value) {
|
|
45
|
+
return ['quote', 'default'].includes(value)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
computed: {
|
|
50
|
+
nextContent () {
|
|
51
|
+
let content = parse(this.content) || {}
|
|
52
|
+
if (typeof content === 'string') {
|
|
53
|
+
const xmlData = parseXml(content)
|
|
54
|
+
if (xmlData && xmlData.msg && xmlData.msg.appmsg && xmlData.msg.appmsg.findernamecard) {
|
|
55
|
+
content = {
|
|
56
|
+
nickname: xmlData.msg.appmsg.findernamecard.nickname,
|
|
57
|
+
openimdesc: xmlData.msg.appmsg.des,
|
|
58
|
+
thumbOssUrl: xmlData.msg.appmsg.findernamecard.avatar
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return content
|
|
63
|
+
},
|
|
64
|
+
description () {
|
|
65
|
+
return this.nextContent.openimdesc
|
|
66
|
+
},
|
|
67
|
+
name () {
|
|
68
|
+
return this.nextContent.nickname
|
|
69
|
+
},
|
|
70
|
+
avatar () {
|
|
71
|
+
return formatOssPath(this.nextContent.thumbOssUrl)
|
|
72
|
+
},
|
|
73
|
+
category () {
|
|
74
|
+
return '视频号名片'
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
</script>
|
|
79
|
+
<style lang="less">
|
|
80
|
+
.sdk-chat-control-channel-card--default{
|
|
81
|
+
width: 248px;
|
|
82
|
+
max-width: 100%;
|
|
83
|
+
line-height: 1.5em;
|
|
84
|
+
.sdk-chat-control-channel-card__main{
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: row;
|
|
87
|
+
padding: 10px;
|
|
88
|
+
}
|
|
89
|
+
.sdk-chat-control-channel-card__fields{
|
|
90
|
+
flex: 1;
|
|
91
|
+
min-width: 0;
|
|
92
|
+
padding-left: 10px;
|
|
93
|
+
}
|
|
94
|
+
.sdk-chat-control-channel-card__title{
|
|
95
|
+
font-size: 14px;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
text-overflow: ellipsis;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
}
|
|
100
|
+
.sdk-chat-control-channel-card__summary{
|
|
101
|
+
color: #888;
|
|
102
|
+
font-size: 12px;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
text-overflow: ellipsis;
|
|
105
|
+
white-space: nowrap;
|
|
106
|
+
margin-top: 6px;
|
|
107
|
+
}
|
|
108
|
+
.sdk-chat-control-channel-card__foot{
|
|
109
|
+
border-top: 1px solid #eee;
|
|
110
|
+
height: 24px;
|
|
111
|
+
line-height: 24px;
|
|
112
|
+
padding: 0 10px;
|
|
113
|
+
box-sizing: content-box;
|
|
114
|
+
}
|
|
115
|
+
.sdk-chat-control-channel-card__category{
|
|
116
|
+
color: #999;
|
|
117
|
+
font-size: 12px;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
.sdk-chat-control-channel-card--quote {
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: row;
|
|
123
|
+
.sdk-chat-control-channel-card__icon {
|
|
124
|
+
display: inline-block;
|
|
125
|
+
width: 18px;
|
|
126
|
+
height: 18px;
|
|
127
|
+
margin-right: 4px;
|
|
128
|
+
min-width: 18px;
|
|
129
|
+
vertical-align: top;
|
|
130
|
+
margin-top: 2px;
|
|
131
|
+
color: #999;
|
|
132
|
+
background: url('./quote-icon.svg') no-repeat 50% 50%;
|
|
133
|
+
background-size: cover;
|
|
134
|
+
}
|
|
135
|
+
.sdk-chat-control-channel-card__title{
|
|
136
|
+
margin-right: 6px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1752135845209" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3194" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M814.90202166 816.16168757c-13.90455388-120.36129661-143.30381112-217.25865863-302.90202166-217.25865863s-288.95401598 96.89736202-302.90202166 217.25865863H814.85856987zM512 555.45129721c185.71270135 0 337.402697 118.31906538 347.13588485 267.22815012a43.40827994 43.40827994 0 0 1-43.01721455 36.93397197H207.8813297a43.19102101 43.19102101 0 0 1-43.01721455-36.89052018C174.55385122 673.77036259 326.28729865 555.45129721 512 555.45129721z m0-86.90346346a130.35519518 130.35519518 0 1 0 0-260.71039036 130.35519518 130.35519518 0 0 0 0 260.71039036z m0 43.45173174a173.80692691 173.80692691 0 1 1 0-347.61385382 173.80692691 173.80692691 0 0 1 0 347.61385382z" fill="#999" p-id="3195"></path></svg>
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sdk-chat-control-company-card" :class="['sdk-chat-control-company-card--' + type]">
|
|
3
|
+
<template v-if="type === 'default' || type === 'thumb'">
|
|
4
|
+
<div class="sdk-chat-control-company-card__main">
|
|
5
|
+
<div class="sdk-chat-control-company-card__avatar">
|
|
6
|
+
<sdk-avatar :src="avatar" :radius="false" size="medium"></sdk-avatar>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="sdk-chat-control-company-card__fields">
|
|
9
|
+
<div class="sdk-chat-control-company-card__title">{{name}}</div>
|
|
10
|
+
<div class="sdk-chat-control-company-card__summary">{{description}}</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="sdk-chat-control-company-card__foot">
|
|
14
|
+
<span class="sdk-chat-control-company-card__category">{{category}}</span>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
<template v-else>
|
|
18
|
+
<div class="sdk-chat-control-company-card__icon"></div>
|
|
19
|
+
<div class="sdk-chat-control-company-card__title">{{name}}</div>
|
|
20
|
+
<div class="sdk-chat-control-company-card__avatar">
|
|
21
|
+
<sdk-avatar :src="avatar" :radius="false" size="medium"></sdk-avatar>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
<script>
|
|
27
|
+
import { parse } from '../../../utils/json'
|
|
28
|
+
import SdkAvatar from '../../../common/avatar'
|
|
29
|
+
import { formatOssPath } from '@aochuang/common/utils/oss'
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
name: 'SdkChatControlCompanyCard',
|
|
33
|
+
components: {
|
|
34
|
+
SdkAvatar
|
|
35
|
+
},
|
|
36
|
+
props: {
|
|
37
|
+
id: {
|
|
38
|
+
type: String
|
|
39
|
+
},
|
|
40
|
+
content: {
|
|
41
|
+
type: [String, Object]
|
|
42
|
+
},
|
|
43
|
+
type: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: 'default',
|
|
46
|
+
validator (value) {
|
|
47
|
+
return ['quote', 'default', 'thumb'].includes(value)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
computed: {
|
|
52
|
+
nextContent () {
|
|
53
|
+
return parse(this.content) || {}
|
|
54
|
+
},
|
|
55
|
+
description () {
|
|
56
|
+
return this.nextContent.openimdesc
|
|
57
|
+
},
|
|
58
|
+
name () {
|
|
59
|
+
return this.nextContent.nickname
|
|
60
|
+
},
|
|
61
|
+
avatar () {
|
|
62
|
+
return formatOssPath(this.nextContent.bigheadimgurl)
|
|
63
|
+
},
|
|
64
|
+
category () {
|
|
65
|
+
return '企业微名片'
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
70
|
+
<style lang="less">
|
|
71
|
+
.sdk-chat-control-company-card--default,
|
|
72
|
+
.sdk-chat-control-company-card--thumb{
|
|
73
|
+
width: 248px;
|
|
74
|
+
max-width: 100%;
|
|
75
|
+
line-height: 1.5em;
|
|
76
|
+
.sdk-chat-control-company-card__main{
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: row;
|
|
79
|
+
padding: 10px;
|
|
80
|
+
}
|
|
81
|
+
.sdk-chat-control-company-card__fields{
|
|
82
|
+
flex: 1;
|
|
83
|
+
min-width: 0;
|
|
84
|
+
padding-left: 10px;
|
|
85
|
+
}
|
|
86
|
+
.sdk-chat-control-company-card__title{
|
|
87
|
+
font-size: 14px;
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
text-overflow: ellipsis;
|
|
90
|
+
white-space: nowrap;
|
|
91
|
+
}
|
|
92
|
+
.sdk-chat-control-company-card__summary{
|
|
93
|
+
color: #888;
|
|
94
|
+
font-size: 12px;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
text-overflow: ellipsis;
|
|
97
|
+
white-space: nowrap;
|
|
98
|
+
margin-top: 6px;
|
|
99
|
+
}
|
|
100
|
+
.sdk-chat-control-company-card__foot{
|
|
101
|
+
border-top: 1px solid #eee;
|
|
102
|
+
height: 24px;
|
|
103
|
+
line-height: 24px;
|
|
104
|
+
padding: 0 10px;
|
|
105
|
+
box-sizing: content-box;
|
|
106
|
+
}
|
|
107
|
+
.sdk-chat-control-company-card__category{
|
|
108
|
+
color: #999;
|
|
109
|
+
font-size: 12px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
.sdk-chat-control-company-card--thumb{
|
|
113
|
+
border: 1px solid #eee;
|
|
114
|
+
background-color: #fff;
|
|
115
|
+
border-radius: 4px;
|
|
116
|
+
}
|
|
117
|
+
.sdk-chat-control-company-card--quote {
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-direction: row;
|
|
120
|
+
.sdk-chat-control-company-card__icon {
|
|
121
|
+
display: inline-block;
|
|
122
|
+
width: 18px;
|
|
123
|
+
height: 18px;
|
|
124
|
+
margin-right: 4px;
|
|
125
|
+
min-width: 18px;
|
|
126
|
+
vertical-align: top;
|
|
127
|
+
margin-top: 2px;
|
|
128
|
+
color: #999;
|
|
129
|
+
background: url('./quote-icon.svg') no-repeat 50% 50%;
|
|
130
|
+
background-size: cover;
|
|
131
|
+
}
|
|
132
|
+
.sdk-chat-control-company-card__title{
|
|
133
|
+
margin-right: 6px;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1752135845209" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3194" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M814.90202166 816.16168757c-13.90455388-120.36129661-143.30381112-217.25865863-302.90202166-217.25865863s-288.95401598 96.89736202-302.90202166 217.25865863H814.85856987zM512 555.45129721c185.71270135 0 337.402697 118.31906538 347.13588485 267.22815012a43.40827994 43.40827994 0 0 1-43.01721455 36.93397197H207.8813297a43.19102101 43.19102101 0 0 1-43.01721455-36.89052018C174.55385122 673.77036259 326.28729865 555.45129721 512 555.45129721z m0-86.90346346a130.35519518 130.35519518 0 1 0 0-260.71039036 130.35519518 130.35519518 0 0 0 0 260.71039036z m0 43.45173174a173.80692691 173.80692691 0 1 1 0-347.61385382 173.80692691 173.80692691 0 0 1 0 347.61385382z" fill="#999" p-id="3195"></path></svg>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { Image } from '@aochuang/common/components'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
name: 'SdkChatControlCustomExpression',
|
|
6
|
+
functional: true,
|
|
7
|
+
props: {
|
|
8
|
+
id: {
|
|
9
|
+
type: String
|
|
10
|
+
},
|
|
11
|
+
content: {
|
|
12
|
+
type: String
|
|
13
|
+
},
|
|
14
|
+
/**
|
|
15
|
+
* 格式化图片地址方法
|
|
16
|
+
*/
|
|
17
|
+
formatterSrcMethod: {
|
|
18
|
+
type: Function
|
|
19
|
+
},
|
|
20
|
+
type: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: 'default',
|
|
23
|
+
validator (value) {
|
|
24
|
+
return ['quote', 'default'].includes(value)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
render (h, c) {
|
|
29
|
+
let nextSrc = c.props.content
|
|
30
|
+
if (c.props.formatterSrcMethod) {
|
|
31
|
+
nextSrc = c.props.formatterSrcMethod({
|
|
32
|
+
content: c.props.content
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
return h(Image, {
|
|
36
|
+
props: {
|
|
37
|
+
src: nextSrc,
|
|
38
|
+
width: c.props.type === 'quote' ? '60px' : null,
|
|
39
|
+
height: c.props.type === 'quote' ? '60px' : '120px',
|
|
40
|
+
fit: 'contain'
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sdk-chat-control-empty">
|
|
3
|
+
{{ content }}
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
<script>
|
|
7
|
+
export default {
|
|
8
|
+
name: 'SdkChatControlEmpty',
|
|
9
|
+
props: {
|
|
10
|
+
id: {
|
|
11
|
+
type: [String, Number]
|
|
12
|
+
},
|
|
13
|
+
content: {
|
|
14
|
+
type: String
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
<style lang="less">
|
|
20
|
+
.sdk-chat-control-empty{
|
|
21
|
+
text-align: center;
|
|
22
|
+
color: #999;
|
|
23
|
+
font-size: 12px;
|
|
24
|
+
width: 100%;
|
|
25
|
+
padding: 12px;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sdk-chat-control-file-url" :class="['sdk-chat-control-file-url--' + type, {'is-border': border}]">
|
|
3
|
+
<template v-if="type === 'default' || type === 'thumb'">
|
|
4
|
+
<span class="sdk-chat-control-file-url__info">
|
|
5
|
+
<div class="sdk-chat-control-file-url__main">
|
|
6
|
+
<span class="sdk-chat-control-file-url__name" :title="name">{{name}}</span>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="sdk-chat-control-file-url__toolbar">
|
|
9
|
+
<span class="sdk-chat-control-file-url__size" v-if="fileSize">{{fileSize}}</span>
|
|
10
|
+
<span class="sdk-chat-control-file-url__download" v-if="innerAllowDownload" @click.stop.prevent>
|
|
11
|
+
<template v-if="downloadTips">
|
|
12
|
+
<bi-tooltip :text="downloadTips" inline>
|
|
13
|
+
<ui-button size="mini" type="primary" icon="download-line" link :click="handleDownloadClick">下载</ui-button>
|
|
14
|
+
</bi-tooltip>
|
|
15
|
+
</template>
|
|
16
|
+
<template v-else>
|
|
17
|
+
<ui-button size="mini" type="primary" icon="download-line" link :click="handleDownloadClick">下载</ui-button>
|
|
18
|
+
</template>
|
|
19
|
+
</span>
|
|
20
|
+
<span class="sdk-chat-control-file-url__preview" v-if="innerAllowPreview" @click.stop.prevent>
|
|
21
|
+
<ui-button size="mini" type="primary" icon="eye-line" link :click="handlePreviewClick">预览</ui-button>
|
|
22
|
+
</span>
|
|
23
|
+
</div>
|
|
24
|
+
</span>
|
|
25
|
+
<span v-if="fileIcon" class="sdk-chat-control-file-url__icon">
|
|
26
|
+
<img width="48px" :src="fileIcon" />
|
|
27
|
+
</span>
|
|
28
|
+
</template>
|
|
29
|
+
<template v-else-if="type === 'quote'">
|
|
30
|
+
<span v-if="fileIcon" class="sdk-chat-control-file-url__icon">
|
|
31
|
+
<img width="18px" :src="fileIcon" />
|
|
32
|
+
</span>
|
|
33
|
+
<span class="sdk-chat-control-file-url__name" :title="name">{{name}}</span>
|
|
34
|
+
</template>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
<script>
|
|
38
|
+
import FileIcon from './icons'
|
|
39
|
+
import { parse } from '../../../utils/json'
|
|
40
|
+
import { formatFileSize } from '../../../utils/file'
|
|
41
|
+
import BiTooltip from '@aochuang/common/common/tooltip'
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
name: 'SdkChatControlFileUrl',
|
|
45
|
+
components: {
|
|
46
|
+
BiTooltip
|
|
47
|
+
},
|
|
48
|
+
props: {
|
|
49
|
+
id: {
|
|
50
|
+
type: String
|
|
51
|
+
},
|
|
52
|
+
content: {
|
|
53
|
+
type: [String, Object]
|
|
54
|
+
},
|
|
55
|
+
type: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: 'default',
|
|
58
|
+
validator (value) {
|
|
59
|
+
return ['quote', 'default', 'thumb'].includes(value)
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
allowDownload: {
|
|
63
|
+
type: [Boolean, Function],
|
|
64
|
+
default: false
|
|
65
|
+
},
|
|
66
|
+
downloadMethod: {
|
|
67
|
+
type: Function
|
|
68
|
+
},
|
|
69
|
+
allowPreview: {
|
|
70
|
+
type: [Boolean, Function],
|
|
71
|
+
default: false
|
|
72
|
+
},
|
|
73
|
+
previewMethod: {
|
|
74
|
+
type: Function
|
|
75
|
+
},
|
|
76
|
+
updateChatBoxProp: {
|
|
77
|
+
type: Function
|
|
78
|
+
},
|
|
79
|
+
getDownloadTipsMethod: {
|
|
80
|
+
type: Function
|
|
81
|
+
},
|
|
82
|
+
cancelDownloadMethod: {
|
|
83
|
+
type: Function
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
inject: {
|
|
87
|
+
SdkChatPanelBox: {
|
|
88
|
+
default: null
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
data () {
|
|
92
|
+
return {
|
|
93
|
+
nextContent: {}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
computed: {
|
|
97
|
+
url () {
|
|
98
|
+
return this.nextContent.url || this.nextContent.resUrl
|
|
99
|
+
},
|
|
100
|
+
name () {
|
|
101
|
+
if (!this.nextContent.title) {
|
|
102
|
+
return this.url
|
|
103
|
+
}
|
|
104
|
+
return this.nextContent.title
|
|
105
|
+
},
|
|
106
|
+
size () {
|
|
107
|
+
return this.nextContent.totalLen
|
|
108
|
+
},
|
|
109
|
+
fileIcon () {
|
|
110
|
+
return FileIcon[this.fileExt] || FileIcon.unknow
|
|
111
|
+
},
|
|
112
|
+
fileExt () {
|
|
113
|
+
let ext
|
|
114
|
+
if (this.name) {
|
|
115
|
+
ext = this.name.substr(this.name.lastIndexOf('.') + 1)
|
|
116
|
+
}
|
|
117
|
+
return ext
|
|
118
|
+
},
|
|
119
|
+
fileSize () {
|
|
120
|
+
if (typeof this.size === 'number') {
|
|
121
|
+
return formatFileSize(this.size)
|
|
122
|
+
}
|
|
123
|
+
return this.size
|
|
124
|
+
},
|
|
125
|
+
innerAllowDownload () {
|
|
126
|
+
if (typeof this.allowDownload === 'function') {
|
|
127
|
+
return this.allowDownload({
|
|
128
|
+
content: this.nextContent
|
|
129
|
+
})
|
|
130
|
+
}
|
|
131
|
+
return this.allowDownload
|
|
132
|
+
},
|
|
133
|
+
innerAllowPreview () {
|
|
134
|
+
if (typeof this.allowPreview === 'function') {
|
|
135
|
+
return this.allowPreview({
|
|
136
|
+
content: this.nextContent
|
|
137
|
+
})
|
|
138
|
+
}
|
|
139
|
+
return this.allowPreview
|
|
140
|
+
},
|
|
141
|
+
downloadTips () {
|
|
142
|
+
let tips = null
|
|
143
|
+
if (typeof this.getDownloadTipsMethod === 'function') {
|
|
144
|
+
tips = this.getDownloadTipsMethod({
|
|
145
|
+
content: this.nextContent
|
|
146
|
+
})
|
|
147
|
+
}
|
|
148
|
+
return tips
|
|
149
|
+
},
|
|
150
|
+
border () {
|
|
151
|
+
if (this.type === 'quote') {
|
|
152
|
+
return false
|
|
153
|
+
}
|
|
154
|
+
return !this.SdkChatPanelBox
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
created () {
|
|
158
|
+
this.nextContent = parse(this.content) || {}
|
|
159
|
+
if (this.url && this.updateChatBoxProp) {
|
|
160
|
+
this.updateChatBoxProp('href', this.url)
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
methods: {
|
|
164
|
+
handleDownloadClick () {
|
|
165
|
+
if (!this.downloadMethod) {
|
|
166
|
+
return
|
|
167
|
+
}
|
|
168
|
+
return this.downloadMethod({
|
|
169
|
+
content: this.nextContent,
|
|
170
|
+
updateContentProp: (prop, value) => {
|
|
171
|
+
if (!['url'].includes(prop)) {
|
|
172
|
+
throw new Error('不支持的更新属性' + prop)
|
|
173
|
+
}
|
|
174
|
+
this.$set(this.nextContent, prop, value)
|
|
175
|
+
}
|
|
176
|
+
})
|
|
177
|
+
},
|
|
178
|
+
handlePreviewClick () {
|
|
179
|
+
if (!this.previewMethod) {
|
|
180
|
+
return
|
|
181
|
+
}
|
|
182
|
+
return this.previewMethod({
|
|
183
|
+
content: this.nextContent,
|
|
184
|
+
updateContentProp: (prop, value) => {
|
|
185
|
+
if (!['url'].includes(prop)) {
|
|
186
|
+
throw new Error('不支持的更新属性' + prop)
|
|
187
|
+
}
|
|
188
|
+
this.$set(this.nextContent, prop, value)
|
|
189
|
+
}
|
|
190
|
+
})
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
beforeDestroy () {
|
|
194
|
+
this.cancelDownloadMethod && this.cancelDownloadMethod()
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
</script>
|
|
198
|
+
<style lang="less">
|
|
199
|
+
.sdk-chat-control-file-url{
|
|
200
|
+
display: inline-block;
|
|
201
|
+
max-width: 100%;
|
|
202
|
+
&.is-border {
|
|
203
|
+
border: 1px solid #eee;
|
|
204
|
+
border-radius: 4px;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
.sdk-chat-control-file-url--default,
|
|
208
|
+
.sdk-chat-control-file-url--thumb{
|
|
209
|
+
width: 226px;
|
|
210
|
+
max-width: 100%;
|
|
211
|
+
display: flex;
|
|
212
|
+
flex-direction: row;
|
|
213
|
+
min-height: 24px;
|
|
214
|
+
position: relative;
|
|
215
|
+
padding: 8px;
|
|
216
|
+
line-height: 1.4em;
|
|
217
|
+
background-color: #fff;
|
|
218
|
+
border-radius: 3px;
|
|
219
|
+
.sdk-chat-control-file-url__info{
|
|
220
|
+
flex: 1;
|
|
221
|
+
min-width: 0;
|
|
222
|
+
}
|
|
223
|
+
.ac-chatl-control-file__file-foot{
|
|
224
|
+
border-top: 1px solid #eee;
|
|
225
|
+
font-size: 12px;
|
|
226
|
+
height: 24px;
|
|
227
|
+
line-height: 24px;
|
|
228
|
+
padding: 0 10px;
|
|
229
|
+
color: #666;
|
|
230
|
+
margin-left: -12px;
|
|
231
|
+
margin-right: -12px;
|
|
232
|
+
margin-bottom: -10px;
|
|
233
|
+
}
|
|
234
|
+
.sdk-chat-control-file-url__download,
|
|
235
|
+
.sdk-chat-control-file-url__preview{
|
|
236
|
+
display: inline-block;
|
|
237
|
+
vertical-align: top;
|
|
238
|
+
padding-top: 2px;
|
|
239
|
+
}
|
|
240
|
+
.sdk-chat-control-file-url__preview {
|
|
241
|
+
margin-left: 6px;
|
|
242
|
+
}
|
|
243
|
+
.sdk-chat-control-file-url__icon{
|
|
244
|
+
margin-left: 12px;
|
|
245
|
+
position: relative;
|
|
246
|
+
img {
|
|
247
|
+
vertical-align: top;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
.sdk-chat-control-file-url__name{
|
|
251
|
+
color: #404040;
|
|
252
|
+
overflow : hidden;
|
|
253
|
+
text-overflow: ellipsis;
|
|
254
|
+
display: -webkit-box;
|
|
255
|
+
-webkit-line-clamp: 2;
|
|
256
|
+
-webkit-box-orient: vertical;
|
|
257
|
+
word-break: break-all;
|
|
258
|
+
}
|
|
259
|
+
.sdk-chat-control-file-url__toolbar{
|
|
260
|
+
line-height: 24px;
|
|
261
|
+
display: flex;
|
|
262
|
+
flex-direction: row;
|
|
263
|
+
align-items: center;
|
|
264
|
+
padding-top: 8px;
|
|
265
|
+
}
|
|
266
|
+
.sdk-chat-control-file-url__size{
|
|
267
|
+
color: #888;
|
|
268
|
+
+ .sdk-chat-control-file-url__download{
|
|
269
|
+
margin-left: 12px;
|
|
270
|
+
padding-left: 10px;
|
|
271
|
+
position: relative;
|
|
272
|
+
&::before {
|
|
273
|
+
content: '';
|
|
274
|
+
position: absolute;
|
|
275
|
+
left: 0;
|
|
276
|
+
top: 50%;
|
|
277
|
+
transform: translateY(-50%);
|
|
278
|
+
width: 1px;
|
|
279
|
+
height: 14px;
|
|
280
|
+
background-color: #eee;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
.sdk-chat-control-file-url--thumb{
|
|
286
|
+
width: auto;
|
|
287
|
+
max-width: 226px;
|
|
288
|
+
&:hover {
|
|
289
|
+
background-color: #fff;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
.sdk-chat-control-file-url--quote {
|
|
293
|
+
display: flex;
|
|
294
|
+
flex-direction: row;
|
|
295
|
+
align-items: center;
|
|
296
|
+
.sdk-chat-control-file-url__icon{
|
|
297
|
+
height: 18px;
|
|
298
|
+
line-height: 18px;
|
|
299
|
+
margin-right: 4px;
|
|
300
|
+
margin-top: 1px;
|
|
301
|
+
vertical-align: top;
|
|
302
|
+
display: inline-block;
|
|
303
|
+
filter: grayscale(100%);
|
|
304
|
+
opacity: .5;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#226a41" d="M563.2 512l119.466667 170.666667h-102.4L512 585.130667 443.733333 682.666667H341.333333l119.466667-170.666667L341.333333 341.333333h102.4l68.266667 97.536L580.266667 341.333333H640V170.666667H213.333333v682.666666h597.333334V341.333333h-128l-119.466667 170.666667zM128 127.658667C128 104.277333 147.072 85.333333 170.624 85.333333H682.666667l213.333333 213.333334v597.034666A42.666667 42.666667 0 0 1 853.632 938.666667H170.368A42.666667 42.666667 0 0 1 128 896.341333V127.658667z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#c7b5a0" d="M640 170.666667H213.333333v682.666666h597.333334V341.333333h-170.666667V170.666667zM128 127.658667C128 104.277333 147.072 85.333333 170.624 85.333333H682.666667l213.333333 213.333334v597.034666A42.666667 42.666667 0 0 1 853.632 938.666667H170.368A42.666667 42.666667 0 0 1 128 896.341333V127.658667zM469.333333 469.333333h85.333334v256h-85.333334v-256z m0-170.666666h85.333334v85.333333h-85.333334V298.666667z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M682.666667 341.333333v85.333334h-128v192a106.666667 106.666667 0 1 1-85.333334-104.533334V341.333333h170.666667V170.666667H213.333333v682.666666h597.333334V341.333333h-128zM128 127.658667C128 104.277333 147.072 85.333333 170.624 85.333333H682.666667l213.333333 213.333334v597.034666A42.666667 42.666667 0 0 1 853.632 938.666667H170.368A42.666667 42.666667 0 0 1 128 896.341333V127.658667z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ca282c" d="M512 682.666667H341.333333V341.333333h170.666667a170.666667 170.666667 0 1 1 0 341.333334z m-85.333333-256v170.666666h85.333333a85.333333 85.333333 0 1 0 0-170.666666h-85.333333z m213.333333-256H213.333333v682.666666h597.333334V341.333333h-170.666667V170.666667zM128 127.658667C128 104.277333 147.072 85.333333 170.624 85.333333H682.666667l213.333333 213.333334v597.034666A42.666667 42.666667 0 0 1 853.632 938.666667H170.368A42.666667 42.666667 0 0 1 128 896.341333V127.658667z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#fc974d" d="M128 127.658667C128 104.277333 147.072 85.333333 170.624 85.333333H682.666667l213.333333 213.333334v597.034666A42.666667 42.666667 0 0 1 853.632 938.666667H170.368A42.666667 42.666667 0 0 1 128 896.341333V127.658667zM213.333333 170.666667v682.666666h597.333334V341.333333h-128v256h-256v85.333334H341.333333V341.333333h298.666667V170.666667H213.333333z m213.333334 256v85.333333h170.666666v-85.333333h-170.666666z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M366.72 546.645333a149.76 149.76 0 0 1 0-69.248l-42.325333-24.448 42.666666-73.898666 42.325334 24.448A149.162667 149.162667 0 0 1 469.333333 368.853333V320h85.333334v48.853333c22.698667 6.741333 43.178667 18.773333 59.946666 34.645334l42.325334-24.448 42.666666 73.898666-42.325333 24.448a149.76 149.76 0 0 1 0 69.205334l42.325333 24.448-42.666666 73.898666-42.325334-24.448a149.162667 149.162667 0 0 1-59.946666 34.645334V704h-85.333334v-48.853333a149.162667 149.162667 0 0 1-59.946666-34.645334l-42.325334 24.448-42.666666-73.898666 42.325333-24.405334zM512 576a64 64 0 1 0 0-128 64 64 0 0 0 0 128zM640 170.666667H213.333333v682.666666h597.333334V341.333333h-170.666667V170.666667zM128 127.658667C128 104.277333 147.072 85.333333 170.624 85.333333H682.666667l213.333333 213.333334v597.034666A42.666667 42.666667 0 0 1 853.632 938.666667H170.368A42.666667 42.666667 0 0 1 128 896.341333V127.658667z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#a9adb1" d="M896 341.333333v554.368A42.666667 42.666667 0 0 1 853.632 938.666667H170.368A42.368 42.368 0 0 1 128 896.341333V127.658667C128 104.746667 147.157333 85.333333 170.752 85.333333h469.12L896 341.333333z m-85.333333 42.666667h-213.333334V170.666667H213.333333v682.666666h597.333334V384zM341.333333 298.666667h128v85.333333H341.333333V298.666667z m0 170.666666h341.333334v85.333334H341.333333v-85.333334z m0 170.666667h341.333334v85.333333H341.333333v-85.333333z" /></svg>
|