UNPKG

@tencentcloud/roomkit-electron-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,

63 lines (62 loc) 2.66 kB
import { defineComponent, ref, createElementBlock, openBlock, Fragment, renderList, createElementVNode, toDisplayString, unref, normalizeClass } from "vue"; import { storeToRefs } from "pinia"; import { useBasicStore } from "../../../../stores/basic.mjs"; const _hoisted_1 = { class: "beauty-property-group" }; const _hoisted_2 = { class: "beauty-title" }; const _hoisted_3 = { class: "beauty-panel-container" }; const _hoisted_4 = ["title", "onClick"]; const _hoisted_5 = ["src"]; const _hoisted_6 = { class: "beauty-label" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "MultiBeauty", props: { beautyType: {}, beautyItems: {} }, emits: ["beauty-property-click"], setup(__props, { emit: __emit }) { const basicStore = useBasicStore(); const { lang } = storeToRefs(basicStore); const selectedItem = ref(""); const props = __props; const emit = __emit; function handleBeautyPropertyClick(key, item) { selectedItem.value = item.key; emit("beauty-property-click", props.beautyType, key, item); } return (_ctx, _cache) => { var _a; return openBlock(), createElementBlock("div", _hoisted_1, [ (openBlock(true), createElementBlock(Fragment, null, renderList((_a = props.beautyItems.get(props.beautyType)) == null ? void 0 : _a.items, ([key, items]) => { return openBlock(), createElementBlock("div", { key, class: "beauty-property-group" }, [ createElementVNode("div", _hoisted_2, toDisplayString(unref(lang) === "zh-CN" ? items.name : items.nameEn), 1), createElementVNode("div", _hoisted_3, [ (openBlock(true), createElementBlock(Fragment, null, renderList(items.items, (item, index) => { return openBlock(), createElementBlock("li", { key: index, class: normalizeClass(["beauty-property-item", { "is-active": selectedItem.value === item.key }]), title: unref(lang) === "zh-CN" ? item.name : item.nameEn, onClick: ($event) => handleBeautyPropertyClick(key, item) }, [ createElementVNode("img", { src: item.icon, class: "beauty-property-image" }, null, 8, _hoisted_5), createElementVNode("div", _hoisted_6, toDisplayString(unref(lang) === "zh-CN" ? item.name : item.nameEn), 1) ], 10, _hoisted_4); }), 128)) ]) ]); }), 128)) ]); }; } }); export { _sfc_main as default };