@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,
51 lines (50 loc) • 1.99 kB
JavaScript
import { defineComponent, ref, createElementBlock, openBlock, Fragment, renderList, normalizeClass, unref, createElementVNode, toDisplayString } from "vue";
import { storeToRefs } from "pinia";
import { useBasicStore } from "../../../../stores/basic.mjs";
const _hoisted_1 = { class: "beauty-panel-container" };
const _hoisted_2 = ["title", "onClick"];
const _hoisted_3 = ["src"];
const _hoisted_4 = { class: "beauty-label" };
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "Beauty",
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(item) {
selectedItem.value = item.key;
emit("beauty-property-click", props.beautyType, props.beautyType, 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, (item) => {
return openBlock(), createElementBlock("li", {
key: item.name,
class: normalizeClass(["beauty-property-item", {
"is-active": selectedItem.value === item.key
}]),
title: unref(lang) === "zh-CN" ? item.name : item.nameEn,
onClick: ($event) => handleBeautyPropertyClick(item)
}, [
createElementVNode("img", {
src: item.icon,
class: "beauty-property-image"
}, null, 8, _hoisted_3),
createElementVNode("div", _hoisted_4, toDisplayString(unref(lang) === "zh-CN" ? item.name : item.nameEn), 1)
], 10, _hoisted_2);
}), 128))
]);
};
}
});
export {
_sfc_main as default
};