UNPKG

@tencentcloud/roomkit-web-vue3

Version:

<h1 align="center"> TUIRoomKit</h1> Conference (TUIRoomKit) is a product suitable for multi-person audio and video conversation scenarios such as business meetings, webinars, and online education. By integrating this product, you can add room management,

66 lines (65 loc) 2.41 kB
import { defineComponent, computed, createElementBlock, openBlock, Fragment, renderList, renderSlot, createBlock, unref } from "vue"; import index from "../UserItem/index.mjs"; import "../../hooks/useAudioDeviceState/index.mjs"; import "../../hooks/useVideoDeviceState/index.mjs"; import useUserState from "../../hooks/useUserState/index.mjs"; import "@tencentcloud/tuiroom-engine-js"; import "../../../locales/index.mjs"; import "../../../stores/room.mjs"; import "@tencentcloud/uikit-base-component-vue3"; import "../../../utils/environment.mjs"; import "../../../hooks/useZIndex.mjs"; /* empty css */ import "../../../hooks/useRoomEngine.mjs"; import "../../hooks/useFreeBeautyState/index.mjs"; const _hoisted_1 = { id: "memberListContainer", class: "user-list-content" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "index", props: { searchFn: { type: Function, default: (userInfo, searchText) => { var _a, _b; return ((_a = userInfo.nameCard) == null ? void 0 : _a.includes(searchText)) || ((_b = userInfo.userName) == null ? void 0 : _b.includes(searchText)) || userInfo.userId.includes(searchText); } }, sortFn: {}, filterFn: {} }, setup(__props) { const props = __props; const { userList, userSearchText } = useUserState(); const showUserList = computed(() => { let tempUserList = userList.value; if (props.filterFn) { tempUserList = tempUserList.filter(props.filterFn); } if (userSearchText) { tempUserList = tempUserList.filter( (item) => props.searchFn(item, userSearchText.value) ); } return tempUserList; }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", _hoisted_1, [ (openBlock(true), createElementBlock(Fragment, null, renderList(showUserList.value, (userInfo) => { return openBlock(), createElementBlock(Fragment, { key: userInfo.userId }, [ _ctx.$slots.userItem ? renderSlot(_ctx.$slots, "userItem", { key: 0, userInfo }, void 0, true) : (openBlock(), createBlock(unref(index), { key: 1, "user-info": userInfo }, null, 8, ["user-info"])) ], 64); }), 128)) ]); }; } }); export { _sfc_main as default };