tuikit-atomicx-vue3 3.3.0-beta.3 → 3.3.1
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/dist/AttachmentPicker.module-BesmtGyl.js +11 -0
- package/dist/FilePicker.vue_vue_type_script_setup_true_lang-CdJ4DUzE.js +76 -0
- package/dist/ImagePicker.vue_vue_type_script_setup_true_lang-CbNUofpK.js +76 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-XRL7A5Gj.js → MessageInput.vue_vue_type_script_setup_true_lang-wUJPjWbx.js} +23 -18
- package/dist/VideoPicker.vue_vue_type_script_setup_true_lang-CmxjbNDJ.js +76 -0
- package/dist/chat/index.d.ts +3747 -2386
- package/dist/chat/index.js +12 -11
- package/dist/components/BarrageInput/BarrageInputH5.js +32 -8
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +9 -5
- package/dist/components/BarrageInput/TextEditor/index.js +14 -6
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +4 -4
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +12 -4
- package/dist/components/BarrageList/i18n/en-US/index.d.ts +1 -0
- package/dist/components/BarrageList/i18n/en-US/index.js +2 -1
- package/dist/components/BarrageList/i18n/zh-CN/index.d.ts +1 -0
- package/dist/components/BarrageList/i18n/zh-CN/index.js +2 -1
- package/dist/components/ChatSetting/GroupChatSetting/GroupActions/GroupActions.js +5 -3
- package/dist/components/ChatSetting/GroupChatSetting/GroupChatSetting.js +3 -3
- package/dist/components/ChatSetting/GroupChatSetting/GroupInfo/GroupInfo.js +3 -3
- package/dist/components/ChatSetting/GroupChatSetting/GroupManagement/GroupManagement.js +3 -3
- package/dist/components/ChatSetting/GroupChatSetting/GroupMembers/GroupMembers.js +3 -3
- package/dist/components/ChatSetting/SettingItem/SettingItem.js +21 -21
- package/dist/components/ChatSetting/i18n/en-US.js +3 -3
- package/dist/components/ChatSetting/i18n/zh-CN.js +3 -3
- package/dist/components/ChatSetting/index.d.ts +1 -4
- package/dist/components/ChatSetting/index.js +3 -6
- package/dist/components/CoGuestPanel/CoGuestPanel.js +1 -1
- package/dist/components/ContactList/ContactInfo/ContactInfo.js +17 -17
- package/dist/components/ContactList/ContactInfo/ContactInfo.vue.d.ts +26 -2
- package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +2 -1
- package/dist/components/ContactList/ContactList.js +19 -10
- package/dist/components/ContactList/ContactList.vue.d.ts +109 -1
- package/dist/components/ContactList/index.d.ts +158 -26
- package/dist/components/ConversationList/ConversationActions/ConversationActions.js +8 -9
- package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +2 -1
- package/dist/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.js +8 -8
- package/dist/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.js +1 -2
- package/dist/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.js +8 -8
- package/dist/components/ConversationList/ConversationList.js +18 -44
- package/dist/components/ConversationList/ConversationList.vue.d.ts +197 -1535
- package/dist/components/ConversationList/ConversationListContent/ConversationListContent.js +8 -11
- package/dist/components/ConversationList/ConversationListContent/ConversationListContent.vue.d.ts +22 -340
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +80 -134
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +14 -14
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +14 -14
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +19 -30
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue.d.ts +0 -2
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +14 -15
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +12 -24
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +14 -14
- package/dist/components/ConversationList/ConversationPreview/index.d.ts +1 -1
- package/dist/components/ConversationList/ConversationPreview/index.js +17 -21
- package/dist/components/ConversationList/ConversationSearch/ConversationSearch.js +1 -0
- package/dist/components/ConversationList/index.d.ts +468 -2400
- package/dist/components/ConversationList/index.js +1 -1
- package/dist/components/LiveAudienceList/LiveAudienceListH5.js +1 -1
- package/dist/components/LiveCoreView/index.js +113 -58
- package/dist/components/LiveCoreView/index.vue.d.ts +9 -0
- package/dist/components/LiveList/LiveList.js +7 -5
- package/dist/components/LiveList/LiveListH5.js +77 -71
- package/dist/components/LiveList/i18n/en-US/index.d.ts +5 -0
- package/dist/components/LiveList/i18n/en-US/index.js +6 -1
- package/dist/components/LiveList/i18n/zh-CN/index.d.ts +5 -0
- package/dist/components/LiveList/i18n/zh-CN/index.js +6 -1
- package/dist/components/LiveList/pullToRefresh.js +204 -0
- package/dist/components/LiveList/pullToRefresh.vue.d.ts +86 -0
- package/dist/components/LiveScenePanel/CameraSettingDialog.js +6 -5
- package/dist/components/LiveScenePanel/index.js +3 -3
- package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.vue.d.ts +0 -4
- package/dist/components/MessageInput/AttachmentPicker/FilePicker.js +1 -1
- package/dist/components/MessageInput/AttachmentPicker/ImagePicker.js +1 -1
- package/dist/components/MessageInput/AttachmentPicker/VideoPicker.js +1 -1
- package/dist/components/MessageInput/AttachmentPicker/index.js +14 -19
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +3 -3
- package/dist/components/MessageInput/MessageInput.js +1 -1
- package/dist/components/MessageInput/MessageInput.vue.d.ts +6 -9
- package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +2 -2
- package/dist/components/MessageInput/TextEditor/index.js +18 -9
- package/dist/components/MessageInput/index.d.ts +5 -41
- package/dist/components/MessageInput/index.js +4 -4
- package/dist/components/MessageList/Message/CustomMessage/index.js +2 -2
- package/dist/components/MessageList/Message/FaceMessage/FaceMessage.js +7 -5
- package/dist/components/MessageList/Message/FaceMessage/FaceMessage.vue.d.ts +8 -8
- package/dist/components/MessageList/Message/LocationMessage/LocationMessage.js +2 -1
- package/dist/components/MessageList/Message/MergerMessage/MergerMessage.js +2 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +12 -4
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue.d.ts +3 -3
- package/dist/components/MessageList/MessageForward/MessageForward.js +2 -3
- package/dist/components/MessageList/MessageList.js +14 -7
- package/dist/components/MessageList/MessageList.vue.d.ts +1 -1
- package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.js +5 -5
- package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.vue.d.ts +10 -10
- package/dist/components/MessageList/index.d.ts +143 -5
- package/dist/components/MessageList/index.js +5 -5
- package/dist/components/Search/Search.js +1 -3
- package/dist/components/Search/SearchResults/EmptyResult/EmptyResult.js +4 -6
- package/dist/components/Search/SearchResults/Loading/Loading.js +2 -4
- package/dist/components/Search/SearchResults/SearchResults.js +20 -22
- package/dist/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.js +6 -8
- package/dist/components/Search/SearchResults/SearchResultsItem/Group/Group.js +5 -7
- package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.js +19 -21
- package/dist/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.js +1 -3
- package/dist/components/Search/SearchResults/SearchResultsItem/User/User.js +5 -7
- package/dist/components/StreamMixer/LocalMixer/index.js +11 -5
- package/dist/components/StreamView/manager/mediaManager.js +1 -1
- package/dist/components/UserPicker/UserPicker.js +2 -2
- package/dist/components/UserPicker/UserPicker.vue.d.ts +7 -8
- package/dist/components/UserPicker/components/ListMode/ListMode.js +14 -17
- package/dist/components/UserPicker/components/ListMode/ListMode.vue.d.ts +2 -2
- package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.vue.d.ts +2 -2
- package/dist/components/UserPicker/components/TreeMode/TreeMode.vue.d.ts +3 -3
- package/dist/components/UserPicker/components/TreeMode/TreeNode.vue.d.ts +4 -4
- package/dist/components/UserPicker/hooks/useSearchFilter.d.ts +3 -3
- package/dist/components/UserPicker/hooks/useSelection.d.ts +8 -8
- package/dist/components/UserPicker/hooks/useTreeState.d.ts +3 -3
- package/dist/components/UserPicker/index.d.ts +134 -3
- package/dist/components/UserPicker/index.js +3 -2
- package/dist/components/UserPicker/type.d.ts +18 -18
- package/dist/index.js +6 -3
- package/dist/rtc/index.d.ts +9 -0
- package/dist/states/GroupSettingState/GroupSettingState.js +3 -3
- package/dist/states/LiveSeatState/usePlayStream/MixStreamPlayer.js +3 -0
- package/dist/states/LoginState.js +1 -0
- package/dist/states/MessageInputState/MessageInputState.js +25 -5
- package/dist/styles/index.css +1294 -3578
- package/dist/types/contact.d.ts +13 -12
- package/dist/types/conversation.d.ts +12 -14
- package/dist/types/engine.d.ts +12 -0
- package/dist/types/engine.js +15 -0
- package/dist/types/index.js +2 -1
- package/dist/utils/json.js +0 -1
- package/package.json +7 -3
- package/src/chat/index.ts +12 -4
- package/src/components/BarrageInput/BarrageInputH5.vue +50 -4
- package/src/components/BarrageInput/EmojiPicker/EmojiPicker.module.scss +1 -0
- package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
- package/src/components/BarrageInput/TextEditor/Editor.scss +1 -1
- package/src/components/BarrageInput/TextEditor/TextEditor.module.scss +2 -0
- package/src/components/BarrageInput/TextEditor/TextEditor.vue +6 -0
- package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +8 -8
- package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +10 -0
- package/src/components/BarrageList/i18n/en-US/index.ts +1 -0
- package/src/components/BarrageList/i18n/zh-CN/index.ts +1 -0
- package/src/components/ChatSetting/GroupChatSetting/GroupActions/GroupActions.vue +5 -2
- package/src/components/ChatSetting/GroupChatSetting/GroupChatSetting.vue +5 -4
- package/src/components/ChatSetting/GroupChatSetting/GroupInfo/GroupInfo.vue +2 -2
- package/src/components/ChatSetting/GroupChatSetting/GroupManagement/GroupManagement.vue +3 -2
- package/src/components/ChatSetting/GroupChatSetting/GroupMembers/GroupMembers.vue +3 -3
- package/src/components/ChatSetting/SettingItem/SettingItem.vue +10 -7
- package/src/components/ChatSetting/i18n/en-US.ts +3 -3
- package/src/components/ChatSetting/i18n/zh-CN.ts +3 -3
- package/src/components/ChatSetting/index.ts +3 -3
- package/src/components/CoGuestPanel/CoGuestPanel.vue +9 -0
- package/src/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.scss +2 -0
- package/src/components/ContactList/ContactInfo/ContactInfo.vue +17 -9
- package/src/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.scss +2 -0
- package/src/components/ContactList/ContactInfo/FriendInfo/FriendInfo.scss +4 -3
- package/src/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.scss +2 -0
- package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.scss +2 -0
- package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -0
- package/src/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.scss +2 -2
- package/src/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.scss +3 -2
- package/src/components/ContactList/ContactList.scss +2 -1
- package/src/components/ContactList/ContactList.vue +18 -3
- package/src/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.scss +3 -3
- package/src/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.scss +5 -6
- package/src/components/ContactList/ContactListItem/FriendItem/FriendItem.scss +3 -3
- package/src/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.scss +5 -6
- package/src/components/ContactList/ContactListItem/GroupItem/GroupItem.scss +3 -3
- package/src/components/ConversationList/ConversationActions/ConversationActions.scss +2 -12
- package/src/components/ConversationList/ConversationActions/ConversationActions.vue +2 -2
- package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +1 -0
- package/src/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.scss +2 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.vue +2 -2
- package/src/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.scss +2 -1
- package/src/components/ConversationList/ConversationList.scss +0 -5
- package/src/components/ConversationList/ConversationList.vue +15 -41
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.scss +1 -0
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.vue +13 -18
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +11 -9
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.vue +14 -16
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +2 -14
- package/src/components/ConversationList/ConversationPreview/index.ts +1 -1
- package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -0
- package/src/components/LiveAudienceList/LiveAudienceListH5.vue +2 -2
- package/src/components/LiveCoreView/index.vue +145 -79
- package/src/components/LiveList/LiveList.vue +3 -0
- package/src/components/LiveList/LiveListH5.vue +60 -85
- package/src/components/LiveList/i18n/en-US/index.ts +5 -0
- package/src/components/LiveList/i18n/zh-CN/index.ts +5 -0
- package/src/components/LiveList/pullToRefresh.vue +364 -0
- package/src/components/LiveScenePanel/CameraSettingDialog.vue +6 -5
- package/src/components/LiveScenePanel/index.vue +2 -2
- package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.module.scss +4 -0
- package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.vue +12 -17
- package/src/components/MessageInput/AttachmentPicker/FilePicker.vue +3 -2
- package/src/components/MessageInput/AttachmentPicker/ImagePicker.vue +3 -2
- package/src/components/MessageInput/AttachmentPicker/VideoPicker.vue +3 -2
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.module.scss +1 -0
- package/src/components/MessageInput/MessageInput.vue +21 -15
- package/src/components/MessageInput/TextEditor/Editor.scss +1 -0
- package/src/components/MessageInput/TextEditor/TextEditor.vue +16 -6
- package/src/components/MessageInput/types.d.ts +3 -4
- package/src/components/MessageList/Message/CustomMessage/CustomMessage.vue +1 -1
- package/src/components/MessageList/Message/FaceMessage/FaceMessage.vue +10 -7
- package/src/components/MessageList/Message/LocationMessage/LocationMessage.vue +3 -1
- package/src/components/MessageList/Message/MergerMessage/MergerMessage.vue +1 -1
- package/src/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue +2 -2
- package/src/components/MessageList/MessageForward/MessageForward.vue +3 -3
- package/src/components/MessageList/MessageList.vue +17 -5
- package/src/components/MessageList/MessageTimeDivider/MessageTimeDivider.vue +9 -9
- package/src/components/MessageList/index.ts +5 -4
- package/src/components/Search/Search.scss +0 -3
- package/src/components/Search/SearchResults/EmptyResult/EmptyResult.scss +0 -3
- package/src/components/Search/SearchResults/Loading/Loading.scss +0 -3
- package/src/components/Search/SearchResults/SearchResults.scss +7 -16
- package/src/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.scss +5 -11
- package/src/components/Search/SearchResults/SearchResultsItem/Group/Group.scss +5 -11
- package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.scss +5 -11
- package/src/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.scss +0 -3
- package/src/components/Search/SearchResults/SearchResultsItem/User/User.scss +5 -6
- package/src/components/StreamMixer/LocalMixer/index.vue +9 -4
- package/src/components/StreamView/manager/mediaManager.ts +1 -1
- package/src/components/UserPicker/UserPicker.vue +6 -9
- package/src/components/UserPicker/components/ListMode/ListMode.vue +3 -7
- package/src/components/UserPicker/components/SelectedPanel/SelectedPanel.vue +2 -2
- package/src/components/UserPicker/components/TreeMode/TreeMode.vue +3 -3
- package/src/components/UserPicker/components/TreeMode/TreeNode.vue +3 -3
- package/src/components/UserPicker/hooks/useSearchFilter.ts +15 -14
- package/src/components/UserPicker/hooks/useSelection.ts +32 -32
- package/src/components/UserPicker/hooks/useTreeState.ts +4 -4
- package/src/components/UserPicker/index.ts +16 -14
- package/src/components/UserPicker/type.ts +18 -18
- package/src/types/contact.ts +13 -12
- package/src/types/conversation.ts +12 -14
- package/src/types/engine.ts +15 -0
- package/src/utils/json.ts +0 -4
- package/dist/AttachmentPicker.module-0_DWsAtr.js +0 -11
- package/dist/FilePicker.vue_vue_type_script_setup_true_lang-CaSj3Gh_.js +0 -72
- package/dist/ImagePicker.vue_vue_type_script_setup_true_lang-CrzGMmrh.js +0 -72
- package/dist/VideoPicker.vue_vue_type_script_setup_true_lang-DTv6TJKr.js +0 -72
- package/dist/states/UIOpenControlState/UIOpenControlState.d.ts +0 -15
- package/dist/states/UIOpenControlState/UIOpenControlState.js +0 -28
- package/dist/states/UIOpenControlState/index.d.ts +0 -1
- package/dist/states/UIOpenControlState/index.js +0 -4
|
@@ -7,9 +7,9 @@ import ConversationActionsComponent from "./ConversationActions/ConversationActi
|
|
|
7
7
|
import ConversationListHeaderComponent from "./ConversationListHeader/ConversationListHeader.js";
|
|
8
8
|
import ConversationListContentComponent from "./ConversationListContent/ConversationListContent.js";
|
|
9
9
|
import { ConversationPreview as _sfc_main } from "./ConversationPreview/index.js";
|
|
10
|
-
import ConversationCreateComponent from "./ConversationCreate/ConversationCreate.js";
|
|
11
10
|
import ConversationPreviewUIComponent from "./ConversationPreview/ConversationPreviewUI.js";
|
|
12
11
|
import ConversationSearchComponent from "./ConversationSearch/ConversationSearch.js";
|
|
12
|
+
import ConversationCreateComponent from "./ConversationCreate/ConversationCreate.js";
|
|
13
13
|
addI18n("en-US", { translation: enResource });
|
|
14
14
|
addI18n("zh-CN", { translation: zhResource });
|
|
15
15
|
const ConversationList = ConversationListComponent;
|
|
@@ -82,7 +82,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
-
const LiveAudienceListH5 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
85
|
+
const LiveAudienceListH5 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-68b59301"]]);
|
|
86
86
|
export {
|
|
87
87
|
LiveAudienceListH5 as default
|
|
88
88
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { addI18n } from "../../i18n/index.js";
|
|
2
2
|
import DefaultStreamViewUI from "./DefaultStreamViewUI.js";
|
|
3
|
-
import { defineComponent, useSlots, computed, ref, onMounted, onBeforeUnmount, watch, createElementBlock, openBlock,
|
|
3
|
+
import { defineComponent, useSlots, computed, ref, onMounted, onBeforeUnmount, watch, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString, unref, normalizeStyle, renderSlot, Fragment, renderList, createBlock, mergeProps, normalizeProps } from "vue";
|
|
4
4
|
import { useUIKit } from "@tencentcloud/uikit-base-component-vue3";
|
|
5
5
|
import { useLiveSeatState } from "../../states/LiveSeatState/index.js";
|
|
6
6
|
import { useLiveState } from "../../states/LiveState/index.js";
|
|
@@ -15,7 +15,7 @@ const _hoisted_1 = {
|
|
|
15
15
|
};
|
|
16
16
|
const _hoisted_2 = { class: "placeholder-text" };
|
|
17
17
|
const _hoisted_3 = {
|
|
18
|
-
key:
|
|
18
|
+
key: 0,
|
|
19
19
|
class: "live-core-ui"
|
|
20
20
|
};
|
|
21
21
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -25,19 +25,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
const { seatList, canvas, startPlayStream, stopPlayStream } = useLiveSeatState();
|
|
26
26
|
const { currentLive } = useLiveState();
|
|
27
27
|
const slots = useSlots();
|
|
28
|
-
const
|
|
28
|
+
const isInStreamMixerComp = computed(() => slots.localVideo);
|
|
29
29
|
const { loginUserInfo } = useLoginState();
|
|
30
|
+
const isPlayedVideo = ref(false);
|
|
30
31
|
const isMounted = ref(false);
|
|
31
|
-
|
|
32
|
+
const isAlignCenter = computed(() => {
|
|
33
|
+
if (!isInStreamMixerComp.value && isPortraitContainer.value && widthRatio.value < heightRatio.value) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return true;
|
|
37
|
+
});
|
|
38
|
+
onMounted(async () => {
|
|
32
39
|
isMounted.value = true;
|
|
33
|
-
startPlayStream({ view: "atomicx-live-stream-content" });
|
|
40
|
+
await startPlayStream({ view: "atomicx-live-stream-content" });
|
|
41
|
+
isPlayedVideo.value = true;
|
|
34
42
|
});
|
|
35
|
-
onBeforeUnmount(() => {
|
|
43
|
+
onBeforeUnmount(async () => {
|
|
36
44
|
isMounted.value = false;
|
|
37
|
-
stopPlayStream();
|
|
45
|
+
await stopPlayStream();
|
|
46
|
+
isPlayedVideo.value = false;
|
|
38
47
|
});
|
|
39
48
|
const isPortraitContainer = ref(true);
|
|
40
49
|
const liveCoreViewContainerRef = ref();
|
|
50
|
+
const liveCoreViewContainerSize = ref({
|
|
51
|
+
width: 0,
|
|
52
|
+
height: 0
|
|
53
|
+
});
|
|
41
54
|
const originStreamViewStyle = ref({
|
|
42
55
|
width: 0,
|
|
43
56
|
height: 0,
|
|
@@ -65,19 +78,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
78
|
}));
|
|
66
79
|
});
|
|
67
80
|
const streamViewSize = computed(() => {
|
|
68
|
-
if (isPortraitContainer.value) {
|
|
69
|
-
return {
|
|
70
|
-
width: originStreamViewStyle.value.width,
|
|
71
|
-
height: originStreamViewStyle.value.height
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
81
|
return {
|
|
75
82
|
width: originStreamViewStyle.value.width * originStreamViewStyle.value.scale,
|
|
76
83
|
height: originStreamViewStyle.value.height * originStreamViewStyle.value.scale
|
|
77
84
|
};
|
|
78
85
|
});
|
|
79
86
|
const seatListWithRealSize = computed(() => seatList.value.map((item, index) => {
|
|
87
|
+
var _a, _b;
|
|
80
88
|
const ratioLayout = ratioLayoutList.value[index];
|
|
89
|
+
const isPortraitAndFill = isPortraitContainer.value && fillMode.value === "fill";
|
|
90
|
+
const isSampleWithCanvas = seatList.value.length === 1 || ((_a = item.region) == null ? void 0 : _a.w) === canvas.value.width && ((_b = item.region) == null ? void 0 : _b.h) === canvas.value.height;
|
|
91
|
+
if (!isInStreamMixerComp.value && isPortraitAndFill && isSampleWithCanvas) {
|
|
92
|
+
return {
|
|
93
|
+
userInfo: item.userInfo,
|
|
94
|
+
region: {
|
|
95
|
+
position: "absolute",
|
|
96
|
+
left: "50%",
|
|
97
|
+
top: "50%",
|
|
98
|
+
width: `${liveCoreViewContainerSize.value.width}px`,
|
|
99
|
+
height: `${liveCoreViewContainerSize.value.height}px`,
|
|
100
|
+
transform: `translate(-50%, -50%)`,
|
|
101
|
+
zIndex: Number(ratioLayout.zOrder) || 0
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
81
105
|
return {
|
|
82
106
|
userInfo: item.userInfo,
|
|
83
107
|
region: {
|
|
@@ -95,7 +119,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
95
119
|
return ((_a = item == null ? void 0 : item.userInfo) == null ? void 0 : _a.userId) === ((_b = loginUserInfo.value) == null ? void 0 : _b.userId);
|
|
96
120
|
}));
|
|
97
121
|
const needPlayStreamViewInfo = computed(() => {
|
|
98
|
-
if (
|
|
122
|
+
if (isInStreamMixerComp.value) {
|
|
99
123
|
return seatListWithRealSize.value.filter((item) => {
|
|
100
124
|
var _a, _b;
|
|
101
125
|
return ((_a = item.userInfo) == null ? void 0 : _a.userId) !== ((_b = loginUserInfo.value) == null ? void 0 : _b.userId);
|
|
@@ -104,31 +128,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
104
128
|
return seatListWithRealSize.value;
|
|
105
129
|
});
|
|
106
130
|
const visualStreamSize = computed(() => {
|
|
107
|
-
if (ratioLayoutList.value.length
|
|
131
|
+
if (!isPortraitContainer.value && widthRatio.value < heightRatio.value && ratioLayoutList.value.length > 0) {
|
|
132
|
+
const absoluteLayoutList = ratioLayoutList.value.map((item) => ({
|
|
133
|
+
userId: item.userId,
|
|
134
|
+
left: originStreamViewStyle.value.width * item.x,
|
|
135
|
+
top: originStreamViewStyle.value.width * item.y,
|
|
136
|
+
width: originStreamViewStyle.value.width * item.width,
|
|
137
|
+
height: item.height === -1 ? originStreamViewStyle.value.height : originStreamViewStyle.value.width * item.height,
|
|
138
|
+
zIndex: item.zOrder
|
|
139
|
+
}));
|
|
140
|
+
const minX = Math.min(...absoluteLayoutList.map((item) => item.left));
|
|
141
|
+
const minY = Math.min(...absoluteLayoutList.map((item) => item.top));
|
|
142
|
+
const maxX = Math.max(...absoluteLayoutList.map((item) => item.left + item.width));
|
|
143
|
+
const maxY = Math.max(...absoluteLayoutList.map((item) => item.top + item.height));
|
|
108
144
|
return {
|
|
109
|
-
width:
|
|
110
|
-
height:
|
|
111
|
-
centerX:
|
|
112
|
-
centerY:
|
|
145
|
+
width: maxX - minX,
|
|
146
|
+
height: maxY - minY,
|
|
147
|
+
centerX: (minX + maxX) / 2,
|
|
148
|
+
centerY: (minY + maxY) / 2
|
|
113
149
|
};
|
|
114
150
|
}
|
|
115
|
-
const absoluteLayoutList = ratioLayoutList.value.map((item) => ({
|
|
116
|
-
userId: item.userId,
|
|
117
|
-
left: originStreamViewStyle.value.width * item.x,
|
|
118
|
-
top: originStreamViewStyle.value.width * item.y,
|
|
119
|
-
width: originStreamViewStyle.value.width * item.width,
|
|
120
|
-
height: item.height === -1 ? originStreamViewStyle.value.height : originStreamViewStyle.value.width * item.height,
|
|
121
|
-
zIndex: item.zOrder
|
|
122
|
-
}));
|
|
123
|
-
const minX = Math.min(...absoluteLayoutList.map((item) => item.left));
|
|
124
|
-
const minY = Math.min(...absoluteLayoutList.map((item) => item.top));
|
|
125
|
-
const maxX = Math.max(...absoluteLayoutList.map((item) => item.left + item.width));
|
|
126
|
-
const maxY = Math.max(...absoluteLayoutList.map((item) => item.top + item.height));
|
|
127
151
|
return {
|
|
128
|
-
width:
|
|
129
|
-
height:
|
|
130
|
-
centerX:
|
|
131
|
-
centerY:
|
|
152
|
+
width: 0,
|
|
153
|
+
height: 0,
|
|
154
|
+
centerX: 0,
|
|
155
|
+
centerY: 0
|
|
132
156
|
};
|
|
133
157
|
});
|
|
134
158
|
watch(visualStreamSize, () => {
|
|
@@ -138,10 +162,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
138
162
|
if (!liveCoreViewContainerRef.value) {
|
|
139
163
|
return;
|
|
140
164
|
}
|
|
141
|
-
const containerRect = liveCoreViewContainerRef.value.getBoundingClientRect();
|
|
142
|
-
const containerWidth = Math.floor(containerRect.width);
|
|
143
|
-
const containerHeight = Math.floor(containerRect.height);
|
|
144
165
|
if (visualStreamSize.value.width && visualStreamSize.value.height) {
|
|
166
|
+
const containerRect = liveCoreViewContainerRef.value.getBoundingClientRect();
|
|
167
|
+
const containerWidth = Math.floor(containerRect.width);
|
|
168
|
+
const containerHeight = Math.floor(containerRect.height);
|
|
145
169
|
const scaleWidth = containerWidth / visualStreamSize.value.width;
|
|
146
170
|
const scaleHeight = containerHeight / visualStreamSize.value.height;
|
|
147
171
|
originStreamViewStyle.value.scale = Math.min(scaleWidth, scaleHeight);
|
|
@@ -155,12 +179,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
155
179
|
}
|
|
156
180
|
}
|
|
157
181
|
const streamViewStyle = computed(() => {
|
|
158
|
-
if (isPortraitContainer.value) {
|
|
159
|
-
return {
|
|
160
|
-
width: `${Math.floor(originStreamViewStyle.value.width)}px`,
|
|
161
|
-
height: `${Math.floor(originStreamViewStyle.value.height)}px`
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
182
|
return {
|
|
165
183
|
width: `${Math.floor(originStreamViewStyle.value.width) * originStreamViewStyle.value.scale}px`,
|
|
166
184
|
height: `${Math.floor(originStreamViewStyle.value.height) * originStreamViewStyle.value.scale}px`,
|
|
@@ -189,6 +207,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
189
207
|
}
|
|
190
208
|
return Number(aspectRatio.value.split(":")[1]);
|
|
191
209
|
});
|
|
210
|
+
const fillMode = ref(
|
|
211
|
+
"fit"
|
|
212
|
+
/* Fit */
|
|
213
|
+
);
|
|
214
|
+
watch(() => [canvas.value, seatList.value], () => {
|
|
215
|
+
if (canvas.value.width > canvas.value.height) {
|
|
216
|
+
fillMode.value = "fit";
|
|
217
|
+
handleStreamRegionSize();
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
const onlyOneSeat = seatList.value.length === 1;
|
|
221
|
+
const hasOneFullScreenUser = seatList.value.find((item) => {
|
|
222
|
+
var _a, _b;
|
|
223
|
+
return ((_a = item.region) == null ? void 0 : _a.w) === canvas.value.width && ((_b = item.region) == null ? void 0 : _b.h) === canvas.value.height;
|
|
224
|
+
});
|
|
225
|
+
if (!isInStreamMixerComp.value && (onlyOneSeat || hasOneFullScreenUser)) {
|
|
226
|
+
fillMode.value = "fill";
|
|
227
|
+
} else {
|
|
228
|
+
fillMode.value = "fit";
|
|
229
|
+
}
|
|
230
|
+
handleStreamRegionSize();
|
|
231
|
+
});
|
|
192
232
|
function handleStreamRegionSize() {
|
|
193
233
|
if (!liveCoreViewContainerRef.value) {
|
|
194
234
|
return;
|
|
@@ -200,13 +240,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
200
240
|
if (widthRatio.value && heightRatio.value) {
|
|
201
241
|
const scaleWidth = containerWidth / widthRatio.value;
|
|
202
242
|
const scaleHeight = containerHeight / heightRatio.value;
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
243
|
+
if (fillMode.value === "fit") {
|
|
244
|
+
if (scaleWidth > scaleHeight) {
|
|
245
|
+
width = containerHeight / heightRatio.value * widthRatio.value;
|
|
246
|
+
height = containerHeight;
|
|
247
|
+
}
|
|
248
|
+
if (scaleWidth <= scaleHeight) {
|
|
249
|
+
width = containerWidth;
|
|
250
|
+
height = containerWidth / widthRatio.value * heightRatio.value;
|
|
251
|
+
}
|
|
252
|
+
} else {
|
|
253
|
+
if (scaleWidth > scaleHeight) {
|
|
254
|
+
width = containerWidth;
|
|
255
|
+
height = containerWidth / widthRatio.value * heightRatio.value;
|
|
256
|
+
}
|
|
257
|
+
if (scaleWidth <= scaleHeight) {
|
|
258
|
+
width = containerHeight / heightRatio.value * widthRatio.value;
|
|
259
|
+
height = containerHeight;
|
|
260
|
+
}
|
|
210
261
|
}
|
|
211
262
|
}
|
|
212
263
|
originStreamViewStyle.value.width = width;
|
|
@@ -224,6 +275,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
224
275
|
}
|
|
225
276
|
const containerRect = liveCoreViewContainerRef.value.getBoundingClientRect();
|
|
226
277
|
isPortraitContainer.value = containerRect.width < containerRect.height;
|
|
278
|
+
liveCoreViewContainerSize.value = {
|
|
279
|
+
width: containerRect.width,
|
|
280
|
+
height: containerRect.height
|
|
281
|
+
};
|
|
227
282
|
};
|
|
228
283
|
const ro = new ResizeObserver(() => {
|
|
229
284
|
getContainerOrientation();
|
|
@@ -242,15 +297,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
242
297
|
return openBlock(), createElementBlock("div", {
|
|
243
298
|
ref_key: "liveCoreViewContainerRef",
|
|
244
299
|
ref: liveCoreViewContainerRef,
|
|
245
|
-
class: "live-core-view-container"
|
|
300
|
+
class: normalizeClass(["live-core-view-container", { "align-center": isAlignCenter.value }])
|
|
246
301
|
}, [
|
|
302
|
+
!_ctx.$slots.localVideo && !isPlayedVideo.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
303
|
+
createElementVNode("span", _hoisted_2, toDisplayString(unref(t)("No video")), 1)
|
|
304
|
+
])) : createCommentVNode("", true),
|
|
247
305
|
createElementVNode("div", {
|
|
248
306
|
class: "live-core-view",
|
|
249
307
|
style: normalizeStyle(streamViewStyle.value)
|
|
250
308
|
}, [
|
|
251
|
-
!_ctx.$slots.localVideo && unref(seatList).length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
252
|
-
createElementVNode("span", _hoisted_2, toDisplayString(unref(t)("No video")), 1)
|
|
253
|
-
])) : createCommentVNode("", true),
|
|
254
309
|
_cache[0] || (_cache[0] = createElementVNode("div", {
|
|
255
310
|
id: "atomicx-live-stream-content",
|
|
256
311
|
class: "stream-content"
|
|
@@ -270,13 +325,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
270
325
|
], 4);
|
|
271
326
|
}), 128))
|
|
272
327
|
])) : createCommentVNode("", true),
|
|
273
|
-
_ctx.$slots.localVideo && isMounted.value ? renderSlot(_ctx.$slots, "localVideo", normalizeProps(mergeProps({ key:
|
|
328
|
+
_ctx.$slots.localVideo && isMounted.value ? renderSlot(_ctx.$slots, "localVideo", normalizeProps(mergeProps({ key: 1 }, { style: (_a = localStreamViewInfo.value) == null ? void 0 : _a.region })), void 0, true) : createCommentVNode("", true)
|
|
274
329
|
], 4)
|
|
275
|
-
],
|
|
330
|
+
], 2);
|
|
276
331
|
};
|
|
277
332
|
}
|
|
278
333
|
});
|
|
279
|
-
const LiveCoreViewComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
334
|
+
const LiveCoreViewComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-466946d8"]]);
|
|
280
335
|
addI18n("en-US", { translation: resource });
|
|
281
336
|
addI18n("zh-CN", { translation: resource$1 });
|
|
282
337
|
export {
|
|
@@ -11,7 +11,16 @@ declare function __VLS_template(): {
|
|
|
11
11
|
top: string;
|
|
12
12
|
width: string;
|
|
13
13
|
height: string;
|
|
14
|
+
transform: string;
|
|
14
15
|
zIndex: number;
|
|
16
|
+
} | {
|
|
17
|
+
position: "absolute";
|
|
18
|
+
left: string;
|
|
19
|
+
top: string;
|
|
20
|
+
width: string;
|
|
21
|
+
height: string;
|
|
22
|
+
zIndex: number;
|
|
23
|
+
transform?: undefined;
|
|
15
24
|
} | undefined;
|
|
16
25
|
}): any;
|
|
17
26
|
};
|
|
@@ -44,10 +44,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
emits: ["live-room-click"],
|
|
45
45
|
setup(__props, { emit: __emit }) {
|
|
46
46
|
useCssVars((_ctx) => ({
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
47
|
+
"ffe37efa": liveItemWidth.value,
|
|
48
|
+
"67ead60a": liveItemHeight.value,
|
|
49
|
+
"8528cf9a": coverWidth.value,
|
|
50
|
+
"538f174c": coverHeight.value
|
|
51
51
|
}));
|
|
52
52
|
const { liveList, currentCursor, fetchLiveList } = useLiveState();
|
|
53
53
|
const { loginUserInfo } = useLoginState();
|
|
@@ -67,6 +67,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
async (user) => {
|
|
68
68
|
if (user && user.userId) {
|
|
69
69
|
isLoadingMore.value = true;
|
|
70
|
+
currentCursor.value = "";
|
|
71
|
+
liveList.value.length = 0;
|
|
70
72
|
await fetchLiveList({});
|
|
71
73
|
isLoadingMore.value = false;
|
|
72
74
|
}
|
|
@@ -185,7 +187,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
185
187
|
};
|
|
186
188
|
}
|
|
187
189
|
});
|
|
188
|
-
const LiveListPC = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
190
|
+
const LiveListPC = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7d3dee6f"]]);
|
|
189
191
|
export {
|
|
190
192
|
LiveListPC as default
|
|
191
193
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, ref, computed, watch, onMounted, onUnmounted, createElementBlock, createCommentVNode, unref, openBlock, createElementVNode, Fragment, renderList,
|
|
1
|
+
import { defineComponent, useCssVars, ref, computed, watch, onMounted, onUnmounted, createElementBlock, createCommentVNode, unref, openBlock, createVNode, withCtx, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
|
|
2
2
|
import { useUIKit, IconLiveCoverHeader, IconNoLiveRoom } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
3
|
import { useLiveState } from "../../states/LiveState/index.js";
|
|
4
4
|
import { useLoginState } from "../../states/LoginState.js";
|
|
5
5
|
import Avatar from "../Avatar/Avatar.js";
|
|
6
|
+
import PullToRefresh from "./pullToRefresh.js";
|
|
6
7
|
import { _ as _export_sfc } from "../../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
7
8
|
const _hoisted_1 = {
|
|
8
9
|
key: 0,
|
|
@@ -30,33 +31,34 @@ const _hoisted_13 = {
|
|
|
30
31
|
class: "bottom-text"
|
|
31
32
|
};
|
|
32
33
|
const _hoisted_14 = { key: 0 };
|
|
33
|
-
const _hoisted_15 = { key: 1 };
|
|
34
34
|
const DEFAULT_COVER = "https://liteav-test-1252463788.cos.ap-guangzhou.myqcloud.com/voice_room/voice_room_cover1.png";
|
|
35
35
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
36
36
|
__name: "LiveListH5",
|
|
37
37
|
emits: ["live-room-click"],
|
|
38
38
|
setup(__props, { emit: __emit }) {
|
|
39
39
|
useCssVars((_ctx) => ({
|
|
40
|
-
"
|
|
41
|
-
"
|
|
40
|
+
"0a6e1f16": liveItemWidth.value,
|
|
41
|
+
"44862458": liveItemHeight.value
|
|
42
42
|
}));
|
|
43
43
|
const { liveList, currentCursor, fetchLiveList } = useLiveState();
|
|
44
44
|
const { loginUserInfo } = useLoginState();
|
|
45
45
|
const { t } = useUIKit();
|
|
46
|
+
const showLiveList = ref([]);
|
|
46
47
|
const scrollContainerRef = ref(null);
|
|
47
48
|
const isLoadingMore = ref(false);
|
|
48
49
|
const hasMoreLive = computed(() => currentCursor.value !== "");
|
|
49
50
|
const liveItemWidth = ref("168px");
|
|
50
51
|
const liveItemHeight = ref("262px");
|
|
51
|
-
const shouldFetchMoreLiveList = computed(() => hasMoreLive.value && !isLoadingMore.value);
|
|
52
|
-
const isShowMoreVisible = computed(() => shouldFetchMoreLiveList.value && !scrollContainerRef.value);
|
|
53
52
|
const emit = __emit;
|
|
54
53
|
watch(
|
|
55
54
|
loginUserInfo,
|
|
56
55
|
async (user) => {
|
|
57
56
|
if (user && user.userId) {
|
|
58
57
|
isLoadingMore.value = true;
|
|
58
|
+
currentCursor.value = "";
|
|
59
|
+
liveList.value.length = 0;
|
|
59
60
|
await fetchLiveList({});
|
|
61
|
+
showLiveList.value = liveList.value.slice();
|
|
60
62
|
isLoadingMore.value = false;
|
|
61
63
|
}
|
|
62
64
|
},
|
|
@@ -72,32 +74,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
74
|
liveItemHeight.value = `${newItemHeight}px`;
|
|
73
75
|
}
|
|
74
76
|
});
|
|
77
|
+
async function handleRefresh(completeRefresh) {
|
|
78
|
+
try {
|
|
79
|
+
isLoadingMore.value = true;
|
|
80
|
+
currentCursor.value = "";
|
|
81
|
+
liveList.value.length = 0;
|
|
82
|
+
await fetchLiveList({});
|
|
83
|
+
showLiveList.value = liveList.value.slice();
|
|
84
|
+
isLoadingMore.value = false;
|
|
85
|
+
completeRefresh(true);
|
|
86
|
+
} catch (error) {
|
|
87
|
+
completeRefresh(false);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
75
90
|
function liveRoomClick(liveInfo) {
|
|
76
91
|
console.log("liveRoomClick,liveInfo:", liveInfo);
|
|
77
92
|
emit("live-room-click", liveInfo);
|
|
78
93
|
}
|
|
79
|
-
function isScrollAtBottom(threshold = 50) {
|
|
80
|
-
if (!scrollContainerRef.value) {
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
return scrollContainerRef.value.scrollTop + scrollContainerRef.value.clientHeight >= scrollContainerRef.value.scrollHeight - threshold;
|
|
84
|
-
}
|
|
85
|
-
function handleWheel(event) {
|
|
86
|
-
if (!scrollContainerRef.value) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if (event.deltaY > 0 && isScrollAtBottom() && shouldFetchMoreLiveList.value) {
|
|
90
|
-
fetchMoreLives();
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
function handleScroll() {
|
|
94
|
-
if (!scrollContainerRef.value) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
if (isScrollAtBottom() && shouldFetchMoreLiveList.value) {
|
|
98
|
-
fetchMoreLives();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
94
|
async function fetchMoreLives() {
|
|
102
95
|
if (!hasMoreLive.value || isLoadingMore.value) {
|
|
103
96
|
return;
|
|
@@ -105,6 +98,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
105
98
|
try {
|
|
106
99
|
isLoadingMore.value = true;
|
|
107
100
|
await fetchLiveList({ cursor: currentCursor.value });
|
|
101
|
+
showLiveList.value = liveList.value.slice();
|
|
108
102
|
} finally {
|
|
109
103
|
isLoadingMore.value = false;
|
|
110
104
|
}
|
|
@@ -127,61 +121,73 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
127
121
|
});
|
|
128
122
|
return (_ctx, _cache) => {
|
|
129
123
|
return unref(loginUserInfo) ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
130
|
-
|
|
124
|
+
showLiveList.value.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
131
125
|
key: 0,
|
|
132
126
|
ref_key: "scrollContainerRef",
|
|
133
127
|
ref: scrollContainerRef,
|
|
134
|
-
class: "live-list"
|
|
135
|
-
onScroll: handleScroll,
|
|
136
|
-
onWheel: handleWheel
|
|
128
|
+
class: "live-list"
|
|
137
129
|
}, [
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
130
|
+
createVNode(PullToRefresh, {
|
|
131
|
+
text: {
|
|
132
|
+
pull: unref(t)("Pull to refresh"),
|
|
133
|
+
release: unref(t)("Release to refresh"),
|
|
134
|
+
loading: unref(t)("Loading"),
|
|
135
|
+
success: unref(t)("Refresh success"),
|
|
136
|
+
error: unref(t)("Refresh failed")
|
|
137
|
+
},
|
|
138
|
+
onRefresh: handleRefresh,
|
|
139
|
+
onLoadMore: fetchMoreLives
|
|
140
|
+
}, {
|
|
141
|
+
default: withCtx(() => [
|
|
142
|
+
createElementVNode("div", _hoisted_2, [
|
|
143
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(showLiveList.value, (item) => {
|
|
144
|
+
return openBlock(), createElementBlock("div", {
|
|
145
|
+
key: item.liveId,
|
|
146
|
+
class: "live-item",
|
|
147
|
+
onClick: ($event) => liveRoomClick(item)
|
|
148
|
+
}, [
|
|
149
|
+
createElementVNode("div", _hoisted_4, [
|
|
150
|
+
createElementVNode("div", _hoisted_5, [
|
|
151
|
+
createVNode(unref(IconLiveCoverHeader), { size: 10 }),
|
|
152
|
+
createElementVNode("span", _hoisted_6, toDisplayString(item.currentViewerCount || 0), 1),
|
|
153
|
+
createElementVNode("span", null, toDisplayString(unref(t)("people have watched the live")), 1)
|
|
154
|
+
]),
|
|
155
|
+
createElementVNode("img", {
|
|
156
|
+
src: item.coverUrl || DEFAULT_COVER,
|
|
157
|
+
alt: "",
|
|
158
|
+
onError: handleCoverImageError
|
|
159
|
+
}, null, 40, _hoisted_7)
|
|
160
|
+
]),
|
|
161
|
+
createElementVNode("span", _hoisted_8, toDisplayString(item.liveName), 1),
|
|
162
|
+
createElementVNode("div", _hoisted_9, [
|
|
163
|
+
createVNode(unref(Avatar), {
|
|
164
|
+
src: item.liveOwner.avatarUrl,
|
|
165
|
+
size: 16,
|
|
166
|
+
style: { border: "1px solid var(--uikit-color-white-7)" }
|
|
167
|
+
}, null, 8, ["src"]),
|
|
168
|
+
createElementVNode("span", _hoisted_10, toDisplayString(item.liveOwner.userName || item.liveOwner.userId), 1)
|
|
169
|
+
])
|
|
170
|
+
], 8, _hoisted_3);
|
|
171
|
+
}), 128))
|
|
172
|
+
]),
|
|
173
|
+
!hasMoreLive.value ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
174
|
+
createElementVNode("span", null, toDisplayString(unref(t)("No More")), 1)
|
|
175
|
+
])) : createCommentVNode("", true)
|
|
176
|
+
]),
|
|
177
|
+
_: 1
|
|
178
|
+
}, 8, ["text"])
|
|
179
|
+
], 512)) : !isLoadingMore.value ? (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
173
180
|
createVNode(unref(IconNoLiveRoom), { size: 60 }),
|
|
174
181
|
createElementVNode("span", null, toDisplayString(unref(t)("No Live")), 1)
|
|
175
182
|
])) : createCommentVNode("", true),
|
|
176
|
-
unref(liveList).length > 0 &&
|
|
177
|
-
|
|
178
|
-
isLoadingMore.value ? (openBlock(), createElementBlock("span", _hoisted_15, toDisplayString(unref(t)("Loading...")), 1)) : createCommentVNode("", true)
|
|
183
|
+
unref(liveList).length > 0 && isLoadingMore.value ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
184
|
+
isLoadingMore.value ? (openBlock(), createElementBlock("span", _hoisted_14, toDisplayString(unref(t)("Loading...")), 1)) : createCommentVNode("", true)
|
|
179
185
|
])) : createCommentVNode("", true)
|
|
180
186
|
])) : createCommentVNode("", true);
|
|
181
187
|
};
|
|
182
188
|
}
|
|
183
189
|
});
|
|
184
|
-
const LiveListH5 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
190
|
+
const LiveListH5 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-96626ee9"]]);
|
|
185
191
|
export {
|
|
186
192
|
LiveListH5 as default
|
|
187
193
|
};
|
|
@@ -3,6 +3,11 @@ export declare const resource: {
|
|
|
3
3
|
'people have watched the live': string;
|
|
4
4
|
'Load More': string;
|
|
5
5
|
'Loading...': string;
|
|
6
|
+
Loading: string;
|
|
6
7
|
'No More': string;
|
|
7
8
|
'No Live': string;
|
|
9
|
+
'Pull down to refresh': string;
|
|
10
|
+
'Release to refresh': string;
|
|
11
|
+
'Refresh success': string;
|
|
12
|
+
'Refresh failed': string;
|
|
8
13
|
};
|
|
@@ -3,8 +3,13 @@ const resource = {
|
|
|
3
3
|
"people have watched the live": "people have watched the live",
|
|
4
4
|
"Load More": "Load More",
|
|
5
5
|
"Loading...": "Loading...",
|
|
6
|
+
"Loading": "Loading",
|
|
6
7
|
"No More": "No More",
|
|
7
|
-
"No Live": "No Live"
|
|
8
|
+
"No Live": "No Live",
|
|
9
|
+
"Pull down to refresh": "Pull down to refresh",
|
|
10
|
+
"Release to refresh": "Release to refresh",
|
|
11
|
+
"Refresh success": "Refresh success",
|
|
12
|
+
"Refresh failed": "Refresh failed"
|
|
8
13
|
};
|
|
9
14
|
export {
|
|
10
15
|
resource
|
|
@@ -3,6 +3,11 @@ export declare const resource: {
|
|
|
3
3
|
'people have watched the live': string;
|
|
4
4
|
'Load More': string;
|
|
5
5
|
'Loading...': string;
|
|
6
|
+
Loading: string;
|
|
6
7
|
'No More': string;
|
|
7
8
|
'No Live': string;
|
|
9
|
+
'Pull to refresh': string;
|
|
10
|
+
'Release to refresh': string;
|
|
11
|
+
'Refresh success': string;
|
|
12
|
+
'Refresh failed': string;
|
|
8
13
|
};
|
|
@@ -3,8 +3,13 @@ const resource = {
|
|
|
3
3
|
"people have watched the live": "人看过",
|
|
4
4
|
"Load More": "加载更多",
|
|
5
5
|
"Loading...": "加载中...",
|
|
6
|
+
"Loading": "正在加载...",
|
|
6
7
|
"No More": "没有更多",
|
|
7
|
-
"No Live": "暂无直播间"
|
|
8
|
+
"No Live": "暂无直播间",
|
|
9
|
+
"Pull to refresh": "下拉刷新",
|
|
10
|
+
"Release to refresh": "松开刷新",
|
|
11
|
+
"Refresh success": "刷新成功",
|
|
12
|
+
"Refresh failed": "刷新失败"
|
|
8
13
|
};
|
|
9
14
|
export {
|
|
10
15
|
resource
|