@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.
Files changed (366) hide show
  1. package/README.md +93 -0
  2. package/common/avatar/avatar.vue +86 -0
  3. package/common/avatar/index.js +3 -0
  4. package/common/badge/badge.vue +105 -0
  5. package/common/badge/index.js +3 -0
  6. package/common/context-menu/context-menu-box.vue +61 -0
  7. package/common/context-menu/context-menu-group.vue +162 -0
  8. package/common/context-menu/context-menu-item.vue +179 -0
  9. package/common/context-menu/context-menu.vue +201 -0
  10. package/common/context-menu/index.js +3 -0
  11. package/common/context-menu/utils.js +138 -0
  12. package/common/friend-avatar/default.svg +1 -0
  13. package/common/friend-avatar/friend-avatar.vue +29 -0
  14. package/common/friend-avatar/index.js +3 -0
  15. package/common/image/index.js +3 -0
  16. package/common/index.js +17 -0
  17. package/common/room-avatar/default.svg +6 -0
  18. package/common/room-avatar/index.js +3 -0
  19. package/common/room-avatar/room-avatar.vue +29 -0
  20. package/common/scroll-load-more/index.js +3 -0
  21. package/common/scroll-load-more/scroll-load-more.vue +195 -0
  22. package/common/user-avatar/default.svg +1 -0
  23. package/common/user-avatar/index.js +3 -0
  24. package/common/user-avatar/user-avatar.vue +29 -0
  25. package/components/account-select/account-select-skeleton.vue +56 -0
  26. package/components/account-select/account-select.vue +205 -0
  27. package/components/account-select/all.svg +1 -0
  28. package/components/account-select/index.js +3 -0
  29. package/components/chat-editor/MENTION_TOKEN_SUMMARY.md +74 -0
  30. package/components/chat-editor/chat-editor-button/chat-editor-button.vue +78 -0
  31. package/components/chat-editor/chat-editor-suggestions/chat-editor-suggestions.vue +329 -0
  32. package/components/chat-editor/chat-editor-toolbar/chat-editor-toolbar-item.vue +28 -0
  33. package/components/chat-editor/chat-editor-toolbar/chat-editor-toolbar.vue +17 -0
  34. package/components/chat-editor/chat-editor.vue +933 -0
  35. package/components/chat-editor/index.js +12 -0
  36. package/components/chat-editor/utils.js +189 -0
  37. package/components/chat-friend-profile/chat-friend-profile.vue +118 -0
  38. package/components/chat-friend-profile/index.js +3 -0
  39. package/components/chat-layout/chat-layout.vue +71 -0
  40. package/components/chat-layout/index.js +3 -0
  41. package/components/chat-panel/chat-panel-box.vue +350 -0
  42. package/components/chat-panel/chat-panel-chat.vue +121 -0
  43. package/components/chat-panel/chat-panel-chats.vue +674 -0
  44. package/components/chat-panel/chat-panel-empty.vue +32 -0
  45. package/components/chat-panel/chat-panel-increment.vue +80 -0
  46. package/components/chat-panel/chat-panel-inner-msg.vue +25 -0
  47. package/components/chat-panel/chat-panel-loading.vue +29 -0
  48. package/components/chat-panel/chat-panel-nearest.vue +136 -0
  49. package/components/chat-panel/chat-panel.vue +292 -0
  50. package/components/chat-panel/index.js +3 -0
  51. package/components/chat-panel/util.js +83 -0
  52. package/components/chat-room-profile/chat-room-profile.vue +103 -0
  53. package/components/chat-room-profile/index.js +3 -0
  54. package/components/contacts-friend-select/contacts-friend-select-skeleton.vue +41 -0
  55. package/components/contacts-friend-select/contacts-friend-select.vue +204 -0
  56. package/components/contacts-friend-select/index.js +3 -0
  57. package/components/contacts-group-select/contacts-group-select-item.vue +98 -0
  58. package/components/contacts-group-select/contacts-group-select-skeleton.vue +81 -0
  59. package/components/contacts-group-select/contacts-group-select.vue +396 -0
  60. package/components/contacts-group-select/index.js +3 -0
  61. package/components/contacts-room-select/contacts-room-select-skeleton.vue +41 -0
  62. package/components/contacts-room-select/contacts-room-select.vue +208 -0
  63. package/components/contacts-room-select/index.js +3 -0
  64. package/components/index.js +43 -0
  65. package/components/layout/index.js +3 -0
  66. package/components/layout/layout.vue +70 -0
  67. package/components/session-select/index.js +11 -0
  68. package/components/session-select/session-select-item-skeleton.vue +59 -0
  69. package/components/session-select/session-select-item.vue +190 -0
  70. package/components/session-select/session-select.vue +386 -0
  71. package/components/wechat-chat-control/calling/calling.vue +227 -0
  72. package/components/wechat-chat-control/calling/phone-fill.svg +1 -0
  73. package/components/wechat-chat-control/calling/vidicon-fill.svg +1 -0
  74. package/components/wechat-chat-control/channel-live/channel-live.vue +198 -0
  75. package/components/wechat-chat-control/channel-live/quote-icon.svg +1 -0
  76. package/components/wechat-chat-control/channel-video/channel-video.vue +180 -0
  77. package/components/wechat-chat-control/channel-video/quote-icon.svg +1 -0
  78. package/components/wechat-chat-control/channel-video-card/channel-video-card.vue +139 -0
  79. package/components/wechat-chat-control/channel-video-card/quote-icon.svg +1 -0
  80. package/components/wechat-chat-control/company-card/company-card.vue +136 -0
  81. package/components/wechat-chat-control/company-card/quote-icon.svg +1 -0
  82. package/components/wechat-chat-control/custom-expression/custom-expression.vue +45 -0
  83. package/components/wechat-chat-control/empty/empty.vue +27 -0
  84. package/components/wechat-chat-control/file-url/file-url.vue +307 -0
  85. package/components/wechat-chat-control/file-url/icons/file-excel-line.svg +1 -0
  86. package/components/wechat-chat-control/file-url/icons/file-info-line.svg +1 -0
  87. package/components/wechat-chat-control/file-url/icons/file-music-line.svg +1 -0
  88. package/components/wechat-chat-control/file-url/icons/file-pdf-line.svg +1 -0
  89. package/components/wechat-chat-control/file-url/icons/file-ppt-line.svg +1 -0
  90. package/components/wechat-chat-control/file-url/icons/file-settings-line.svg +1 -0
  91. package/components/wechat-chat-control/file-url/icons/file-text-line.svg +1 -0
  92. package/components/wechat-chat-control/file-url/icons/file-unknow-line.svg +1 -0
  93. package/components/wechat-chat-control/file-url/icons/file-word-line.svg +1 -0
  94. package/components/wechat-chat-control/file-url/icons/file-zip-line.svg +1 -0
  95. package/components/wechat-chat-control/file-url/icons/index.js +24 -0
  96. package/components/wechat-chat-control/image/image.vue +344 -0
  97. package/components/wechat-chat-control/image/index.js +1 -0
  98. package/components/wechat-chat-control/image/util.js +29 -0
  99. package/components/wechat-chat-control/index.js +104 -0
  100. package/components/wechat-chat-control/jx-sys-text/jx-sys-text.vue +28 -0
  101. package/components/wechat-chat-control/location/location.vue +179 -0
  102. package/components/wechat-chat-control/location/offline-bg.png +0 -0
  103. package/components/wechat-chat-control/member-change/member-change.vue +37 -0
  104. package/components/wechat-chat-control/music/icons/163.png +0 -0
  105. package/components/wechat-chat-control/music/icons/163.svg +12 -0
  106. package/components/wechat-chat-control/music/icons/default.png +0 -0
  107. package/components/wechat-chat-control/music/icons/default.svg +1 -0
  108. package/components/wechat-chat-control/music/icons/kuwo.png +0 -0
  109. package/components/wechat-chat-control/music/icons/qq.png +0 -0
  110. package/components/wechat-chat-control/music/icons/qq.svg +1 -0
  111. package/components/wechat-chat-control/music/music.vue +156 -0
  112. package/components/wechat-chat-control/music/utils.js +30 -0
  113. package/components/wechat-chat-control/quote-message/quote-message.vue +257 -0
  114. package/components/wechat-chat-control/real-time-position/icon.svg +1 -0
  115. package/components/wechat-chat-control/real-time-position/real-time-position.vue +57 -0
  116. package/components/wechat-chat-control/red-envelopes/quote-icon.svg +1 -0
  117. package/components/wechat-chat-control/red-envelopes/red-envelope.svg +1 -0
  118. package/components/wechat-chat-control/red-envelopes/red-envelopes.vue +168 -0
  119. package/components/wechat-chat-control/revoke-me-message/revoke-me-message.vue +41 -0
  120. package/components/wechat-chat-control/revoke-other-message/revoke-other-message.vue +41 -0
  121. package/components/wechat-chat-control/revoke-you-message/revoke-you-message.vue +41 -0
  122. package/components/wechat-chat-control/room-calling/phone-fill.svg +1 -0
  123. package/components/wechat-chat-control/room-calling/room-calling.vue +52 -0
  124. package/components/wechat-chat-control/room-calling/vidicon-fill.svg +1 -0
  125. package/components/wechat-chat-control/share-card/quote-icon.svg +1 -0
  126. package/components/wechat-chat-control/share-card/share-card.vue +140 -0
  127. package/components/wechat-chat-control/system/system.vue +122 -0
  128. package/components/wechat-chat-control/system-batch-message/system-batch-message.vue +28 -0
  129. package/components/wechat-chat-control/system-money/system-money.vue +39 -0
  130. package/components/wechat-chat-control/text/icons/icon.svg +6 -0
  131. package/components/wechat-chat-control/text/text.vue +164 -0
  132. package/components/wechat-chat-control/text-with-at/text-with-at.vue +88 -0
  133. package/components/wechat-chat-control/transfer/collection.svg +1 -0
  134. package/components/wechat-chat-control/transfer/quote-icon.svg +1 -0
  135. package/components/wechat-chat-control/transfer/red-transfer.svg +1 -0
  136. package/components/wechat-chat-control/transfer/refund.svg +1 -0
  137. package/components/wechat-chat-control/transfer/transfer.svg +1 -0
  138. package/components/wechat-chat-control/transfer/transfer.vue +263 -0
  139. package/components/wechat-chat-control/unknow/unknow.vue +21 -0
  140. package/components/wechat-chat-control/url/icons/link.svg +1 -0
  141. package/components/wechat-chat-control/url/icons/video.svg +6 -0
  142. package/components/wechat-chat-control/url/miniprogram.svg +1 -0
  143. package/components/wechat-chat-control/url/url-file.vue +47 -0
  144. package/components/wechat-chat-control/url/url-link.vue +169 -0
  145. package/components/wechat-chat-control/url/url-merge.vue +164 -0
  146. package/components/wechat-chat-control/url/url-miniprogram.vue +259 -0
  147. package/components/wechat-chat-control/url/url.vue +116 -0
  148. package/components/wechat-chat-control/util.js +234 -0
  149. package/components/wechat-chat-control/video/icons/video.svg +1 -0
  150. package/components/wechat-chat-control/video/video.vue +304 -0
  151. package/components/wechat-chat-control/voice/icons/voice.svg +1 -0
  152. package/components/wechat-chat-control/voice/voice.vue +464 -0
  153. package/components/wechat-chat-control/wechat-chat-control-config-item.vue +24 -0
  154. package/components/wechat-chat-control/wechat-chat-control-config-msg.vue +21 -0
  155. package/components/wechat-chat-control/wechat-chat-control-config.vue +57 -0
  156. package/components/wechat-chat-panel/chat-panel-chat-status/chat-panel-chat-status.vue +69 -0
  157. package/components/wechat-chat-panel/chat-panel-item.vue +695 -0
  158. package/components/wechat-chat-panel/chat-panel.vue +257 -0
  159. package/components/wechat-chat-panel/index.js +3 -0
  160. package/components/wework-chat-control/calling/calling.vue +223 -0
  161. package/components/wework-chat-control/calling/phone-fill.svg +1 -0
  162. package/components/wework-chat-control/calling/vidicon-fill.svg +1 -0
  163. package/components/wework-chat-control/channel-live/channel-live.vue +198 -0
  164. package/components/wework-chat-control/channel-live/quote-icon.svg +1 -0
  165. package/components/wework-chat-control/channel-video/channel-video.vue +180 -0
  166. package/components/wework-chat-control/channel-video/quote-icon.svg +1 -0
  167. package/components/wework-chat-control/company-card/company-card.vue +136 -0
  168. package/components/wework-chat-control/company-card/quote-icon.svg +1 -0
  169. package/components/wework-chat-control/custom-expression/custom-expression.vue +34 -0
  170. package/components/wework-chat-control/empty/empty.vue +27 -0
  171. package/components/wework-chat-control/expression/expression.vue +53 -0
  172. package/components/wework-chat-control/file-url/file-url.vue +247 -0
  173. package/components/wework-chat-control/file-url/icons/file-excel-line.svg +1 -0
  174. package/components/wework-chat-control/file-url/icons/file-info-line.svg +1 -0
  175. package/components/wework-chat-control/file-url/icons/file-music-line.svg +1 -0
  176. package/components/wework-chat-control/file-url/icons/file-pdf-line.svg +1 -0
  177. package/components/wework-chat-control/file-url/icons/file-ppt-line.svg +1 -0
  178. package/components/wework-chat-control/file-url/icons/file-settings-line.svg +1 -0
  179. package/components/wework-chat-control/file-url/icons/file-text-line.svg +1 -0
  180. package/components/wework-chat-control/file-url/icons/file-unknow-line.svg +1 -0
  181. package/components/wework-chat-control/file-url/icons/file-word-line.svg +1 -0
  182. package/components/wework-chat-control/file-url/icons/file-zip-line.svg +1 -0
  183. package/components/wework-chat-control/file-url/icons/index.js +24 -0
  184. package/components/wework-chat-control/image/image.vue +296 -0
  185. package/components/wework-chat-control/image/index.js +1 -0
  186. package/components/wework-chat-control/image/util.js +21 -0
  187. package/components/wework-chat-control/index.js +105 -0
  188. package/components/wework-chat-control/jx-sys-text/jx-sys-text.vue +28 -0
  189. package/components/wework-chat-control/link/link.vue +100 -0
  190. package/components/wework-chat-control/location/location.vue +181 -0
  191. package/components/wework-chat-control/location/offline-bg.png +0 -0
  192. package/components/wework-chat-control/red-envelopes/quote-icon.svg +1 -0
  193. package/components/wework-chat-control/red-envelopes/red-envelope.svg +1 -0
  194. package/components/wework-chat-control/red-envelopes/red-envelopes.vue +168 -0
  195. package/components/wework-chat-control/share-card/quote-icon.svg +1 -0
  196. package/components/wework-chat-control/share-card/share-card.vue +140 -0
  197. package/components/wework-chat-control/text/icons/icon.svg +6 -0
  198. package/components/wework-chat-control/text/text.vue +157 -0
  199. package/components/wework-chat-control/unknow/unknow.vue +21 -0
  200. package/components/wework-chat-control/url/icons/link.svg +1 -0
  201. package/components/wework-chat-control/url/icons/video.svg +6 -0
  202. package/components/wework-chat-control/url/miniprogram.svg +1 -0
  203. package/components/wework-chat-control/url/url-file.vue +37 -0
  204. package/components/wework-chat-control/url/url-link.vue +169 -0
  205. package/components/wework-chat-control/url/url-merge.vue +164 -0
  206. package/components/wework-chat-control/url/url-miniprogram.vue +248 -0
  207. package/components/wework-chat-control/url/url.vue +103 -0
  208. package/components/wework-chat-control/util.js +223 -0
  209. package/components/wework-chat-control/video/icons/video.svg +1 -0
  210. package/components/wework-chat-control/video/video.vue +304 -0
  211. package/components/wework-chat-control/voice/icons/voice.svg +1 -0
  212. package/components/wework-chat-control/voice/voice.vue +464 -0
  213. package/components/wework-chat-panel/chat-panel-controls/company-card/company-card.vue +35 -0
  214. package/components/wework-chat-panel/chat-panel-controls/expression/expression.vue +36 -0
  215. package/components/wework-chat-panel/chat-panel-controls/file-url/file-url.vue +35 -0
  216. package/components/wework-chat-panel/chat-panel-controls/image/image.vue +36 -0
  217. package/components/wework-chat-panel/chat-panel-controls/index.js +35 -0
  218. package/components/wework-chat-panel/chat-panel-controls/jx-sys-text/jx-sys-text.vue +28 -0
  219. package/components/wework-chat-panel/chat-panel-controls/link/link.vue +35 -0
  220. package/components/wework-chat-panel/chat-panel-controls/location/location.vue +35 -0
  221. package/components/wework-chat-panel/chat-panel-controls/text/text.vue +43 -0
  222. package/components/wework-chat-panel/chat-panel-controls/unkonw/unkonw.vue +39 -0
  223. package/components/wework-chat-panel/chat-panel-controls/video/video.vue +37 -0
  224. package/components/wework-chat-panel/chat-panel-controls/voice/voice.vue +35 -0
  225. package/components/wework-chat-panel/chat-panel-item.vue +650 -0
  226. package/components/wework-chat-panel/chat-panel.vue +163 -0
  227. package/components/wework-chat-panel/index.js +3 -0
  228. package/package.json +23 -0
  229. package/services/client-chat/client-chat-wechat/client-chat-account.js +426 -0
  230. package/services/client-chat/client-chat-wechat/client-chat-concats.js +1029 -0
  231. package/services/client-chat/client-chat-wechat/client-chat-draft.js +92 -0
  232. package/services/client-chat/client-chat-wechat/client-chat-message.js +588 -0
  233. package/services/client-chat/client-chat-wechat/client-chat-session-manage.js +67 -0
  234. package/services/client-chat/client-chat-wechat/client-chat-session.js +1048 -0
  235. package/services/client-chat/client-chat-wechat/client-chat-socket.js +215 -0
  236. package/services/client-chat/client-chat-wechat/client-chat.js +1065 -0
  237. package/services/client-chat/client-chat-wechat/index.js +3 -0
  238. package/services/client-chat/client-chat-wechat/utils.js +82 -0
  239. package/services/client-chat/client-chat-wework/client-chat-account.js +310 -0
  240. package/services/client-chat/client-chat-wework/client-chat-concats.js +772 -0
  241. package/services/client-chat/client-chat-wework/client-chat-message.js +278 -0
  242. package/services/client-chat/client-chat-wework/client-chat-session.js +929 -0
  243. package/services/client-chat/client-chat-wework/client-chat-socket.js +64 -0
  244. package/services/client-chat/client-chat-wework/client-chat.js +330 -0
  245. package/services/client-chat/client-chat-wework/index.js +3 -0
  246. package/services/client-chat/client-chat-wework/utils.js +82 -0
  247. package/services/index.js +10 -0
  248. package/services/socket/index.js +5 -0
  249. package/services/socket/socket.js +797 -0
  250. package/services/socket/utils.js +7 -0
  251. package/uni-common/account-portray/account-portray.vue +51 -0
  252. package/uni-common/account-select/account-select-item.vue +172 -0
  253. package/uni-common/account-select/account-select.vue +252 -0
  254. package/uni-common/all-friend-avatar/all-friend-avatar.vue +49 -0
  255. package/uni-common/friend-avatar/default.svg +1 -0
  256. package/uni-common/friend-avatar/friend-avatar.vue +27 -0
  257. package/uni-common/friend-avatar/index.js +3 -0
  258. package/uni-common/friend-loader/friend-loader.vue +53 -0
  259. package/uni-common/friend-portray/friend-portray.vue +56 -0
  260. package/uni-common/group-avatar/default.svg +1 -0
  261. package/uni-common/group-avatar/group-avatar.vue +18 -0
  262. package/uni-common/group-avatar/index.js +3 -0
  263. package/uni-common/room-avatar/default.svg +6 -0
  264. package/uni-common/room-avatar/index.js +3 -0
  265. package/uni-common/room-avatar/room-avatar.vue +27 -0
  266. package/uni-common/room-loader/room-loader.vue +53 -0
  267. package/uni-common/room-portray/room-portray.vue +56 -0
  268. package/uni-components/chat-control/calling/calling.vue +91 -0
  269. package/uni-components/chat-control/calling/phone-fill.svg +1 -0
  270. package/uni-components/chat-control/calling/vidicon-fill.svg +1 -0
  271. package/uni-components/chat-control/channel-video/channel-video.vue +89 -0
  272. package/uni-components/chat-control/channel-video-card/channel-video-card.vue +105 -0
  273. package/uni-components/chat-control/channel-video-live/channel-video-live.vue +92 -0
  274. package/uni-components/chat-control/chat-control-config-item/chat-control-config-item.vue +20 -0
  275. package/uni-components/chat-control/chat-control-config-item/index.js +3 -0
  276. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-app.vue +25 -0
  277. package/uni-components/chat-control/chat-control-config-msg/chat-control-config-msg-h5.vue +21 -0
  278. package/uni-components/chat-control/chat-control-config.vue +59 -0
  279. package/uni-components/chat-control/chat-control.vue +218 -0
  280. package/uni-components/chat-control/company-card/company-card.vue +123 -0
  281. package/uni-components/chat-control/const.js +28 -0
  282. package/uni-components/chat-control/expression/expression.vue +41 -0
  283. package/uni-components/chat-control/image/image.vue +68 -0
  284. package/uni-components/chat-control/index.js +89 -0
  285. package/uni-components/chat-control/location/location.vue +110 -0
  286. package/uni-components/chat-control/member-change/member-change.vue +32 -0
  287. package/uni-components/chat-control/quote-message/quote-message.vue +216 -0
  288. package/uni-components/chat-control/real-time-position/real-time-position.vue +62 -0
  289. package/uni-components/chat-control/redpacket/red-envelope.svg +1 -0
  290. package/uni-components/chat-control/redpacket/redpacket.vue +75 -0
  291. package/uni-components/chat-control/share-card/share-card.vue +101 -0
  292. package/uni-components/chat-control/system/system.vue +69 -0
  293. package/uni-components/chat-control/system-batch-message/system-batch-message.vue +30 -0
  294. package/uni-components/chat-control/system-text/system-text.vue +32 -0
  295. package/uni-components/chat-control/text/text.vue +67 -0
  296. package/uni-components/chat-control/text-with-at/text-with-at.vue +51 -0
  297. package/uni-components/chat-control/transfer/red-transfer.svg +1 -0
  298. package/uni-components/chat-control/transfer/transfer.vue +80 -0
  299. package/uni-components/chat-control/unkonw/unkonw.vue +37 -0
  300. package/uni-components/chat-control/url/icons/file-excel-line.svg +1 -0
  301. package/uni-components/chat-control/url/icons/file-info-line.svg +1 -0
  302. package/uni-components/chat-control/url/icons/file-music-line.svg +1 -0
  303. package/uni-components/chat-control/url/icons/file-pdf-line.svg +1 -0
  304. package/uni-components/chat-control/url/icons/file-ppt-line.svg +1 -0
  305. package/uni-components/chat-control/url/icons/file-settings-line.svg +1 -0
  306. package/uni-components/chat-control/url/icons/file-text-line.svg +1 -0
  307. package/uni-components/chat-control/url/icons/file-unknow-line.svg +1 -0
  308. package/uni-components/chat-control/url/icons/file-word-line.svg +1 -0
  309. package/uni-components/chat-control/url/icons/file-zip-line.svg +1 -0
  310. package/uni-components/chat-control/url/icons/index.js +24 -0
  311. package/uni-components/chat-control/url/miniprogram.svg +1 -0
  312. package/uni-components/chat-control/url/url-miniprogram.vue +116 -0
  313. package/uni-components/chat-control/url/url.vue +306 -0
  314. package/uni-components/chat-control/url-new/icons/file-excel-line.svg +1 -0
  315. package/uni-components/chat-control/url-new/icons/file-info-line.svg +1 -0
  316. package/uni-components/chat-control/url-new/icons/file-music-line.svg +1 -0
  317. package/uni-components/chat-control/url-new/icons/file-pdf-line.svg +1 -0
  318. package/uni-components/chat-control/url-new/icons/file-ppt-line.svg +1 -0
  319. package/uni-components/chat-control/url-new/icons/file-settings-line.svg +1 -0
  320. package/uni-components/chat-control/url-new/icons/file-text-line.svg +1 -0
  321. package/uni-components/chat-control/url-new/icons/file-unknow-line.svg +1 -0
  322. package/uni-components/chat-control/url-new/icons/file-word-line.svg +1 -0
  323. package/uni-components/chat-control/url-new/icons/file-zip-line.svg +1 -0
  324. package/uni-components/chat-control/url-new/icons/index.js +24 -0
  325. package/uni-components/chat-control/url-new/url-new.vue +110 -0
  326. package/uni-components/chat-control/utils.js +12 -0
  327. package/uni-components/chat-control/video/video.vue +156 -0
  328. package/uni-components/chat-control/voice/voice.vue +166 -0
  329. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-collect.vue +84 -0
  330. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet-system.vue +28 -0
  331. package/uni-components/chat-editor/chat-editor-chartlet/chat-editor-chartlet.vue +85 -0
  332. package/uni-components/chat-editor/chat-editor-func/chat-editor-func.vue +157 -0
  333. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at-panel.vue +158 -0
  334. package/uni-components/chat-editor/chat-editor-func-at/chat-editor-func-at.vue +61 -0
  335. package/uni-components/chat-editor/chat-editor-func-button/chat-editor-func-button.vue +58 -0
  336. package/uni-components/chat-editor/chat-editor-func-file/chat-editor-func-file.vue +54 -0
  337. package/uni-components/chat-editor/chat-editor-func-image/chat-editor-func-image.vue +42 -0
  338. package/uni-components/chat-editor/chat-editor-func-video/chat-editor-func-video.vue +42 -0
  339. package/uni-components/chat-editor/chat-editor-func-voice/chat-editor-func-voice.vue +25 -0
  340. package/uni-components/chat-editor/chat-editor-message-send/chat-editor-message-send.vue +158 -0
  341. package/uni-components/chat-editor/chat-editor-quote/chat-editor-quote.vue +75 -0
  342. package/uni-components/chat-editor/chat-editor.vue +257 -0
  343. package/uni-components/chat-editor/index.js +10 -0
  344. package/uni-components/chat-editor/util.js +65 -0
  345. package/uni-components/chat-panel/chat-panel-chats-box.vue +238 -0
  346. package/uni-components/chat-panel/chat-panel-chats-forward/chat-panel-chats-forward.vue +273 -0
  347. package/uni-components/chat-panel/chat-panel-chats-item.vue +578 -0
  348. package/uni-components/chat-panel/chat-panel-chats-status/chat-panel-chats-status.vue +71 -0
  349. package/uni-components/chat-panel/chat-panel-chats.vue +368 -0
  350. package/uni-components/chat-panel/chat-panel.vue +227 -0
  351. package/uni-components/contacts-group-select/contacts-group-select-item.vue +85 -0
  352. package/uni-components/contacts-group-select/contacts-group-select-panel.vue +119 -0
  353. package/uni-components/contacts-group-select/contacts-group-select.vue +150 -0
  354. package/utils/color.js +178 -0
  355. package/utils/data.js +11 -0
  356. package/utils/date.js +107 -0
  357. package/utils/event.js +3 -0
  358. package/utils/file.js +26 -0
  359. package/utils/index.js +5 -0
  360. package/utils/json.js +40 -0
  361. package/utils/log.js +243 -0
  362. package/utils/queue.js +97 -0
  363. package/utils/regexp.js +9 -0
  364. package/utils/string.js +66 -0
  365. package/utils/url.js +48 -0
  366. package/utils/util.js +130 -0
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <div class="sdk-layout">
3
+ <div class="sdk-layout__sidebar" v-if="$slots.sidebar">
4
+ <slot name="sidebar"></slot>
5
+ </div>
6
+ <div class="sdk-layout__wrap">
7
+ <bi-resizable
8
+ direction="horizontal"
9
+ :initialSize="270"
10
+ :minSize="270"
11
+ :maxSize="480"
12
+ >
13
+ <template slot="content">
14
+ <slot></slot>
15
+ </template>
16
+ <template slot="panel">
17
+ <template v-if="$slots.addon">
18
+ <slot name="addon"></slot>
19
+ </template>
20
+ </template>
21
+ </bi-resizable>
22
+ </div>
23
+ <div class="sdk-layout__extend" v-if="$slots.extend">
24
+ <slot name="extend"></slot>
25
+ </div>
26
+ </div>
27
+ </template>
28
+ <script>
29
+ import BiResizable from '@aochuang/common/common/resizable'
30
+
31
+ export default {
32
+ name: 'SdkLayout',
33
+ components: {
34
+ BiResizable
35
+ }
36
+ }
37
+ </script>
38
+ <style>
39
+ .sdk-layout{
40
+ height: 100%;
41
+ display: flex;
42
+ flex-direction: row;
43
+ }
44
+ .sdk-layout__sidebar{
45
+ width: 160px;
46
+ overflow: auto;
47
+ background-color: #e5e4d9;
48
+ min-width: 160px;
49
+ }
50
+ .sdk-layout__addon{
51
+ width: 270px;
52
+ min-width: 270px;
53
+ background-color: #fff;
54
+ overflow: auto;
55
+ border-right: 1px solid #efeff0;
56
+ }
57
+ .sdk-layout__wrap{
58
+ flex: 1;
59
+ min-width: 0;
60
+ position: relative;
61
+ z-index: 10;
62
+ }
63
+ .sdk-layout__extend{
64
+ width: 300px;
65
+ min-width: 300px;
66
+ background-color: #fff;
67
+ overflow: auto;
68
+ border-left: 1px solid #efeff0;
69
+ }
70
+ </style>
@@ -0,0 +1,11 @@
1
+ import SessionSelect from './session-select.vue'
2
+ import SessionSelectItem from './session-select-item.vue'
3
+ import SessionSelectItemSkeleton from './session-select-item-skeleton.vue'
4
+
5
+ export {
6
+ SessionSelect,
7
+ SessionSelectItem,
8
+ SessionSelectItemSkeleton
9
+ }
10
+
11
+ export default SessionSelect
@@ -0,0 +1,59 @@
1
+ <template>
2
+ <div class="sdk-session-select-item-skeleton">
3
+ <div class="sdk-session-select-item-skeleton__avatar">
4
+ <ui-skeleton width="32px" height="32px" radius="3px"></ui-skeleton>
5
+ </div>
6
+ <div class="sdk-session-select-item-skeleton__main">
7
+ <div class="sdk-session-select-item-skeleton__row">
8
+ <div class="sdk-session-select-item-skeleton__col is-full">
9
+ <ui-skeleton width="90%" height="18px"></ui-skeleton>
10
+ </div>
11
+ <div class="sdk-session-select-item-skeleton__col">
12
+ <ui-skeleton width="60px" height="18px"></ui-skeleton>
13
+ </div>
14
+ </div>
15
+ <div class="sdk-session-select-item-skeleton__row">
16
+ <div class="sdk-session-select-item-skeleton__col is-full">
17
+ <ui-skeleton width="90%" height="18px"></ui-skeleton>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ </template>
23
+ <script>
24
+ import UiSkeleton from '@aochuang/common/components/skeleton'
25
+
26
+ export default {
27
+ name: 'SdkSessionSelectItemSkeleton',
28
+ components: {
29
+ UiSkeleton
30
+ }
31
+ }
32
+ </script>
33
+ <style>
34
+ .sdk-session-select-item-skeleton{
35
+ display: flex;
36
+ flex-direction: row;
37
+ align-items: center;
38
+ padding: 6px 12px;
39
+ }
40
+ .sdk-session-select-item-skeleton__avatar{
41
+ margin-right: 12px;
42
+ }
43
+ .sdk-session-select-item-skeleton__main{
44
+ flex: 1;
45
+ min-width: 0;
46
+ }
47
+ .sdk-session-select-item-skeleton__row{
48
+ display: flex;
49
+ flex-direction: row;
50
+ align-items: center;
51
+ }
52
+ .sdk-session-select-item-skeleton__row:not(:last-child) {
53
+ margin-bottom: 6px;
54
+ }
55
+ .sdk-session-select-item-skeleton__col.is-full{
56
+ flex: 1;
57
+ min-width: 0;
58
+ }
59
+ </style>
@@ -0,0 +1,190 @@
1
+ <template>
2
+ <div :class="['sdk-session-item', {'is-toper': data[stickyOnTopField], 'is-selected': selected}]" @contextmenu="handleContextMenu">
3
+ <div class="sdk-session-item__wrap" @click="handleClick">
4
+ <div class="sdk-session-item__avatar">
5
+ <div class="sdk-session-item__avatar-image">
6
+ <slot name="avatar"></slot>
7
+ </div>
8
+ <sdk-badge
9
+ class="sdk-session-item__avatar-badge"
10
+ :class="{'is-mute': data[muteField]}"
11
+ v-if="data[unreadMsgCountField]"
12
+ :is-dot="data[muteField]"
13
+ :value="data[unreadMsgCountField]"
14
+ :max="99"
15
+ ></sdk-badge>
16
+ </div>
17
+ <div class="sdk-session-item__main">
18
+ <div class="sdk-session-item__row">
19
+ <div class="sdk-session-item__name">
20
+ <slot name="name"></slot>
21
+ </div>
22
+ <div class="sdk-session-item__date">
23
+ {{ lastMessageTime }}
24
+ </div>
25
+ </div>
26
+ <div class="sdk-session-item__row">
27
+ <div class="sdk-session-item__message">
28
+ <slot name="message"></slot>
29
+ </div>
30
+ <div class="sdk-session-item__mask" v-if="data[muteField]" title="开启免打扰">
31
+ <ui-icon name="notification-off-line" color="#999"></ui-icon>
32
+ </div>
33
+ <slot name="addon"></slot>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </template>
39
+ <script>
40
+ import SdkBadge from '../../common/badge'
41
+ import { formatFriendlyTime } from '../../utils/date.js'
42
+
43
+ export default {
44
+ name: 'SdkSessionItem',
45
+ components: {
46
+ SdkBadge
47
+ },
48
+ props: {
49
+ data: {
50
+ type: Object
51
+ },
52
+ selected: {
53
+ type: Boolean
54
+ },
55
+ avatarField: {
56
+ type: String,
57
+ default: 'avatar'
58
+ },
59
+ nameField: {
60
+ type: String,
61
+ defautl: 'nickname'
62
+ },
63
+ timeField: {
64
+ type: String,
65
+ default: 'lastMsgTime'
66
+ },
67
+ // 未读消息字段
68
+ unreadMsgCountField: {
69
+ type: String,
70
+ default: 'unreadMsgCount'
71
+ },
72
+ // 置顶字段
73
+ stickyOnTopField: {
74
+ type: String,
75
+ default: 'stickyOnTop'
76
+ },
77
+ // 免打扰字段
78
+ muteField: {
79
+ type: String,
80
+ default: 'mute'
81
+ }
82
+ },
83
+ computed: {
84
+ muteNotificationIcon () {
85
+ return `<svg t="1748397568623" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7966" width="200" height="200"><path d="M469.418667 149.482667A42.197333 42.197333 0 0 1 469.333333 146.666667v-21.333334a42.666667 42.666667 0 1 1 85.333334 0v21.333334c0 0.938667-0.021333 1.877333-0.085334 2.816C711.168 170.304 832 304.362667 832 466.666667v272.661333h64a42.666667 42.666667 0 0 1 0 85.333333h-96.64l-85.333333-85.333333H746.666667V466.666667c0-129.6-105.066667-234.666667-234.666667-234.666667-82.88 0-155.733333 42.965333-197.482667 107.84l-61.354666-61.376a319.829333 319.829333 0 0 1 216.256-128.981333zM405.333333 914.453333a42.666667 42.666667 0 0 1 42.666667-42.666666h128a42.666667 42.666667 0 0 1 0 85.333333h-128a42.666667 42.666667 0 0 1-42.666667-42.666667zM192.085333 458.773333c-0.042667 2.624-0.085333 5.248-0.085333 7.893334v272.661333H128a42.666667 42.666667 0 0 0 0 85.333333h429.994667l-85.333334-85.333333H277.333333V544l-85.248-85.226667zM204.928 290.069333a42.666667 42.666667 0 1 0-60.352 60.330667l543.061333 543.061333a42.666667 42.666667 0 0 0 60.352-60.352L204.928 290.069333z" p-id="7967"></path></svg>`
86
+ },
87
+ lastMessageTime () {
88
+ return formatFriendlyTime(this.data[this.timeField])
89
+ }
90
+ },
91
+ methods: {
92
+ handleContextMenu (evt) {
93
+ this.$emit('contextmenu', evt)
94
+ },
95
+ handleClick () {
96
+ this.$emit('click')
97
+ }
98
+ }
99
+ }
100
+ </script>
101
+
102
+ <style lang="less">
103
+ .sdk-session-item{
104
+ transition: all .25s;
105
+ cursor: pointer;
106
+ &:hover {
107
+ background-color: #f3f3f3;
108
+ }
109
+ &.is-toper {
110
+ background-color: #eaeaea;
111
+ }
112
+ &.is-selected {
113
+ position: relative;
114
+ background-color: #d5e1f5;
115
+ &:after {
116
+ content: '';
117
+ position: absolute;
118
+ left: 0;
119
+ top: 0;
120
+ right: 0;
121
+ bottom: 0;
122
+ border: 2px solid #4387ff;
123
+ pointer-events: none;
124
+ border-radius: 3px;
125
+ }
126
+ }
127
+ }
128
+ .sdk-session-item__wrap{
129
+ padding: 5px 12px;
130
+ line-height: 1.25em;
131
+ display: flex;
132
+ flex-direction: row;
133
+ align-items: center;
134
+ }
135
+ .sdk-session-item__avatar{
136
+ margin-right: 12px;
137
+ position: relative;
138
+ min-width: 32px;
139
+ width: 32px;
140
+ height: 32px;
141
+ background-color: #eee;
142
+ border-radius: 3px;
143
+ }
144
+ .sdk-session-item__avatar-badge{
145
+ position: absolute;
146
+ &.is-mute {
147
+ left: calc(~'100% - 7px');
148
+ top: -6px;
149
+ }
150
+ &:not(.is-mute) {
151
+ left: calc(~'100% - 12px');
152
+ top: -10px;
153
+ }
154
+ }
155
+ .sdk-session-item__main{
156
+ flex: 1;
157
+ min-width: 0;
158
+ }
159
+ .sdk-session-item__row{
160
+ display: flex;
161
+ flex-direction: row;
162
+ align-items: center;
163
+ justify-content: space-between;
164
+ }
165
+ .sdk-session-item__name{
166
+ min-width: 0;
167
+ white-space: nowrap;
168
+ text-overflow: ellipsis;
169
+ overflow: hidden;
170
+ }
171
+ .sdk-session-item__message{
172
+ color: #999;
173
+ min-height: 22px;
174
+ line-height: 22px;
175
+ white-space: nowrap;
176
+ overflow: hidden;
177
+ text-overflow: ellipsis;
178
+ flex: 1;
179
+ min-width: 0;
180
+ }
181
+ .sdk-session-item__date{
182
+ color: #999;
183
+ font-size: 12px;
184
+ white-space: nowrap;
185
+ margin-left: 6px;
186
+ }
187
+ .sdk-session-item__mask {
188
+ margin-left: 6px;
189
+ }
190
+ </style>
@@ -0,0 +1,386 @@
1
+ <template>
2
+ <bi-scroll-load-more
3
+ class="sdk-session-select"
4
+ ref="loadMore"
5
+ :auto-load="false"
6
+ :page-size="pageSize"
7
+ :data="sessionListData"
8
+ :query-method="handleQuerySessionData"
9
+ @scroll="handleScroll"
10
+ >
11
+ <template slot-scope="scope">
12
+ <template v-if="!isEmpty">
13
+ <template
14
+ v-for="tGroup in sessionData"
15
+ >
16
+ <template
17
+ v-for="dGroup in tGroup"
18
+ >
19
+ <template
20
+ v-for="sGroup in dGroup"
21
+ >
22
+ <template
23
+ v-for="item in sGroup"
24
+ >
25
+ <div
26
+ class="session__item"
27
+ :ref="`item-` + item[idField]"
28
+ :key="item[idField]"
29
+ v-show="!allowTuck || !tuckable || !item.stickyOnTop || !tucked || (stickyOnTopSessionMap[item[idField]] ? stickyOnTopSessionMap[item[idField]].index < 2 : true)"
30
+ @click="handleItemClick(item)"
31
+ @contextmenu="handleItemContextMenu(item, $event)"
32
+ >
33
+ <slot
34
+ name="item"
35
+ :selected="item[idField] === value"
36
+ :item="item"
37
+ ></slot>
38
+ </div>
39
+ <template v-if="allowTuck && tuckable && stickyOnTopSessionData.length > 2 && lastStickyOnTopSession && item.stickyOnTop && item[idField] === lastStickyOnTopSession[idField]">
40
+ <div class="sdk-session-select__tuck" :class="{'is-tucked': tucked, 'is-loading': loading}" @click="handleTuckedTopClick">
41
+ <span class="sdk-session-select__tuck-icon">
42
+ <template v-if="loading">
43
+ <ui-loading size="mini"></ui-loading>
44
+ </template>
45
+ <template v-else>
46
+ <svg t="1756119682899" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11974" width="200" height="200"><path d="M896 810.667a42.667 42.667 0 0 1-42.667 42.666H170.667a42.667 42.667 0 0 1 0-85.333h682.666A42.667 42.667 0 0 1 896 810.667zM296.533 202.965v319.403a21.333 21.333 0 0 1-36.437 15.061L115.499 392.832a42.667 42.667 0 0 1 0-60.33l144.64-144.64a21.333 21.333 0 0 1 36.394 15.103zM896 512a42.667 42.667 0 0 1-42.667 42.667H554.667a42.667 42.667 0 0 1 0-85.334h298.666A42.667 42.667 0 0 1 896 512z m0-298.667A42.667 42.667 0 0 1 853.333 256H554.667a42.667 42.667 0 0 1 0-85.333h298.666A42.667 42.667 0 0 1 896 213.333z" fill="currentColor" p-id="11975"></path></svg>
47
+ </template>
48
+ </span>
49
+ <span class="sdk-session-select__tuck-text">{{ tucked ? (stickyOnTopSessionData.length - 2) + '个' : '折叠' }}置顶聊天</span>
50
+ <span class="sdk-session-select__tuck-arrow"></span>
51
+ </div>
52
+ </template>
53
+ </template>
54
+ </template>
55
+ </template>
56
+ </template>
57
+ <template v-if="tuckable && tucked && notStickyOnTopSessionOnePageData.length < pageSize && !scope.loading && !scope.notMore">
58
+ <div class="sdk-session-select__loadmore" @click="handleLoadMoreClick">点击加载更多~</div>
59
+ </template>
60
+ </template>
61
+ </template>
62
+ </bi-scroll-load-more>
63
+ </template>
64
+
65
+ <script>
66
+ import UiLoading from '@aochuang/common/components/loading'
67
+ import BiScrollLoadMore from '../../common/scroll-load-more'
68
+
69
+ export default {
70
+ name: 'SdkSessionSelect',
71
+ components: {
72
+ UiLoading,
73
+ BiScrollLoadMore
74
+ },
75
+ props: {
76
+ value: {
77
+ type: String
78
+ },
79
+ data: {
80
+ type: Object
81
+ },
82
+ // 能否折叠置顶会话
83
+ tuckable: {
84
+ type: Boolean,
85
+ default: false
86
+ },
87
+ // 会话是否折叠
88
+ tucked: {
89
+ type: Boolean,
90
+ default: false
91
+ },
92
+ idField: {
93
+ type: String,
94
+ default: 'conversationId'
95
+ },
96
+ autoLoad: {
97
+ type: Boolean,
98
+ default: true
99
+ },
100
+ queryMethod: {
101
+ type: Function
102
+ }
103
+ },
104
+ data () {
105
+ return {
106
+ pageSize: 40,
107
+ tuckReady: false,
108
+ allowTuck: false,
109
+ loading: false
110
+ }
111
+ },
112
+ computed: {
113
+ sessionData () {
114
+ return this.data || {}
115
+ },
116
+ sessionListData () {
117
+ // 只取30条有效的会话数据,主要是给scrollLoadMore组件检查空用
118
+ const results = []
119
+ if (this.sessionData) {
120
+ Object.keys(this.sessionData).some(i => {
121
+ return Object.keys(this.sessionData[i]).some(j => {
122
+ return Object.keys(this.sessionData[i][j]).some(k => {
123
+ return this.sessionData[i][j][k].some(item => {
124
+ if (results.length >= 30) {
125
+ return true
126
+ }
127
+ results.push(item)
128
+ })
129
+ })
130
+ })
131
+ })
132
+ }
133
+ return results
134
+ },
135
+ stickyOnTopSessionData () {
136
+ let result = []
137
+ if (this.sessionData) {
138
+ Object.keys(this.sessionData).some(i => {
139
+ return Object.keys(this.sessionData[i]).some(j => {
140
+ return Object.keys(this.sessionData[i][j]).some(k => {
141
+ return this.sessionData[i][j][k].some(item => {
142
+ if (item.stickyOnTop) {
143
+ result.push(item)
144
+ }
145
+ if (!item.stickyOnTop) {
146
+ return true
147
+ }
148
+ })
149
+ })
150
+ })
151
+ })
152
+ }
153
+ return result
154
+ },
155
+ stickyOnTopSessionMap () {
156
+ return this.stickyOnTopSessionData.reduce((rs, v, index) => {
157
+ rs[v[this.idField]] = {
158
+ index: index,
159
+ data: v
160
+ }
161
+ return rs
162
+ }, {})
163
+ },
164
+ notStickyOnTopSessionOnePageData () {
165
+ let result = []
166
+ if (this.sessionData) {
167
+ Object.keys(this.sessionData).some(i => {
168
+ return Object.keys(this.sessionData[i]).some(j => {
169
+ return Object.keys(this.sessionData[i][j]).some(k => {
170
+ return this.sessionData[i][j][k].some(item => {
171
+ if (!item.stickyOnTop) {
172
+ result.push(item)
173
+ }
174
+ if (!result.length > this.pageSize) {
175
+ return true
176
+ }
177
+ })
178
+ })
179
+ })
180
+ })
181
+ }
182
+ return result
183
+ },
184
+ lastStickyOnTopSession () {
185
+ return this.stickyOnTopSessionData[this.stickyOnTopSessionData.length - 1]
186
+ },
187
+ isEmpty () {
188
+ return !this.sessionListData || !this.sessionListData.length
189
+ }
190
+ },
191
+ watch: {
192
+ lastStickyOnTopSession () {
193
+ this.delayCheckAllowTuck()
194
+ }
195
+ },
196
+ mounted () {
197
+ this.resizeObserver = new ResizeObserver(entries => {
198
+ this.delayCheckAllowTuck()
199
+ })
200
+ this.resizeObserver.observe(this.$el)
201
+ if (this.autoLoad) {
202
+ this.$refs.loadMore.reload()
203
+ }
204
+ },
205
+ methods: {
206
+ reload () {
207
+ if (!this.$refs.loadMore) {
208
+ return
209
+ }
210
+ return this.$refs.loadMore.reload().then(() => {
211
+ this.tuckReady = true
212
+ this.delayCheckAllowTuck()
213
+ })
214
+ },
215
+ loadMoreData () {
216
+ if (!this.$refs.loadMore) {
217
+ return
218
+ }
219
+ return this.$refs.loadMore.loadMoreData()
220
+ },
221
+ scrollTop (top) {
222
+ this.$refs.loadMore.scrollTop(top)
223
+ },
224
+ delayCheckAllowTuck () {
225
+ if (!this.tuckReady) {
226
+ return
227
+ }
228
+ clearTimeout(this._checkTimer)
229
+ this._checkTimer = setTimeout(() => {
230
+ if (!this.tuckable) {
231
+ return
232
+ }
233
+ if (this.tucked) {
234
+ if (this.stickyOnTopSessionData.length > 2) {
235
+ this.allowTuck = true
236
+ } else {
237
+ this.allowTuck = false
238
+ }
239
+ } else {
240
+ if (this.lastStickyOnTopSession) {
241
+ const $lastStickyOnTopEls = this.$refs['item-' + this.lastStickyOnTopSession[this.idField]]
242
+ if ($lastStickyOnTopEls && $lastStickyOnTopEls.length) {
243
+ if ($lastStickyOnTopEls[0].offsetTop > this.$el.clientHeight) {
244
+ this.allowTuck = true
245
+ } else {
246
+ this.allowTuck = false
247
+ }
248
+ } else {
249
+ this.allowTuck = false
250
+ }
251
+ } else {
252
+ this.allowTuck = false
253
+ }
254
+ }
255
+ }, 20)
256
+ },
257
+ handleLoadMoreClick () {
258
+ this.loading = true
259
+ Promise.all([this.$refs.loadMore.loadMoreData()]).finally(() => {
260
+ this.loading = false
261
+ })
262
+ },
263
+ handleTuckedTopClick () {
264
+ if (this.loading) {
265
+ return
266
+ }
267
+ this.$emit('tucked-change', {
268
+ value: !this.tucked
269
+ })
270
+ this.$nextTick(() => {
271
+ if (this.tucked && this.notStickyOnTopSessionOnePageData.length < this.pageSize) {
272
+ this.loading = true
273
+ Promise.all([this.$refs.loadMore.loadMoreData()]).finally(() => {
274
+ this.loading = false
275
+ })
276
+ }
277
+ })
278
+ },
279
+ handleItemContextMenu (item, evt) {
280
+ this.$emit('item-contextmenu', item, evt)
281
+ },
282
+ handleQuerySessionData ({ isReload, pageSize }) {
283
+ if (!this.queryMethod) {
284
+ return
285
+ }
286
+ return this.queryMethod({
287
+ isReload,
288
+ pageSize
289
+ })
290
+ },
291
+ handleScroll (evt) {
292
+ this.$emit('scroll', evt)
293
+ },
294
+ handleItemClick (item) {
295
+ this.$emit('select', {
296
+ session: item
297
+ })
298
+ }
299
+ },
300
+ beforeDestroy () {
301
+ this.resizeObserver && this.resizeObserver.unobserve(this.$el)
302
+ }
303
+ }
304
+ </script>
305
+
306
+ <style lang="less">
307
+ .sdk-session-select{
308
+ position: relative;
309
+ }
310
+ .sdk-session-select__tuck{
311
+ height: 32px;
312
+ line-height: 32px;
313
+ background-color: #eaeaea;
314
+ padding: 6px 12px;
315
+ border-top: 1px solid rgba(0,0,0,.05);
316
+ box-sizing: content-box;
317
+ position: sticky;
318
+ bottom: 0;
319
+ display: flex;
320
+ flex-direction: row;
321
+ align-items: center;
322
+ transition: background-color .25s;
323
+ cursor: pointer;
324
+ &:hover {
325
+ &:not(.is-loading) {
326
+ background-color: #ddd;
327
+ }
328
+ }
329
+ &.is-tucked {
330
+ .sdk-session-select__tuck-arrow{
331
+ transform: rotate(180deg);
332
+ }
333
+ }
334
+ &.is-loading{
335
+ color: #999;
336
+ cursor: not-allowed;
337
+ }
338
+ }
339
+ .sdk-session-select__tuck-arrow{
340
+ position: absolute;
341
+ right: 10px;
342
+ top: 14px;
343
+ width: 16px;
344
+ height: 16px;
345
+ transition: transform .25s;
346
+ transform: rotate(0deg);
347
+ &:after {
348
+ content: '';
349
+ position: absolute;
350
+ left: 4px;
351
+ top: 6px;
352
+ width: 6px;
353
+ height: 6px;
354
+ border: 1px solid rgba(0,0,0,.4);
355
+ border-left: 0;
356
+ border-top: 0;
357
+ transform: rotate(-135deg);
358
+ }
359
+ }
360
+ .sdk-session-select__tuck-icon{
361
+ display: flex;
362
+ flex-direction: column;
363
+ align-items: center;
364
+ justify-content: center;
365
+ width: 16px;
366
+ height: 16px;
367
+ margin-right: 6px;
368
+ svg {
369
+ width: 100%;
370
+ height: 100%;
371
+ vertical-align: top;
372
+ }
373
+ }
374
+ .sdk-session-select__loadmore{
375
+ height: 24px;
376
+ line-height: 24px;
377
+ color: #999;
378
+ text-align: center;
379
+ cursor: pointer;
380
+ padding: 8px 4px;
381
+ transition: color .25s;
382
+ &:hover {
383
+ color: #4387ff;
384
+ }
385
+ }
386
+ </style>