@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,
83 lines (82 loc) • 3.65 kB
JavaScript
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const uikitBaseComponentVue3 = require("@tencentcloud/uikit-base-component-vue3");
const room = require("../../../constants/room.js");
const environment = require("../../../utils/environment.js");
const vTap = require("../../../directives/vTap.js");
const _hoisted_1 = { class: "icon-button-container" };
const _hoisted_2 = { class: "title" };
const _hoisted_3 = { class: "title" };
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
__name: "IconButton",
props: {
title: { default: "" },
hasMore: { type: Boolean, default: false },
hideHoverEffect: { type: Boolean, default: false },
disabled: { type: Boolean, default: false },
isActive: { type: Boolean, default: false },
layout: { default: room.IconButtonLayout.VERTICAl },
icon: { default: null },
isNotSupport: { type: Boolean, default: false }
},
emits: ["click-icon", "click-more"],
setup(__props, { emit: __emit }) {
const props = __props;
const emit = __emit;
const iconContentClass = Vue.computed(() => {
if (props.layout === room.IconButtonLayout.HORIZONTAL) {
return "icon-content-horizontal";
}
return "icon-content-vertical";
});
const handleClickEvent = () => {
emit("click-icon");
};
return (_ctx, _cache) => {
return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
Vue.unref(environment.isMobile) ? Vue.withDirectives((Vue.openBlock(), Vue.createElementBlock("div", {
key: 0,
class: Vue.normalizeClass(["icon-content", iconContentClass.value, `${_ctx.disabled && "disabled"}`])
}, [
Vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
_ctx.icon ? (Vue.openBlock(), Vue.createBlock(Vue.unref(uikitBaseComponentVue3.TUIIcon), {
key: 0,
icon: _ctx.icon
}, null, 8, ["icon"])) : Vue.createCommentVNode("", true),
Vue.createElementVNode("span", _hoisted_2, Vue.toDisplayString(_ctx.title), 1)
], 2)), [
[Vue.unref(vTap.default), handleClickEvent]
]) : (Vue.openBlock(), Vue.createElementBlock("div", {
key: 1,
class: Vue.normalizeClass(["icon-content", iconContentClass.value, `${_ctx.disabled && "disabled"}`]),
onClick: handleClickEvent
}, [
Vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
_ctx.icon ? (Vue.openBlock(), Vue.createBlock(Vue.unref(uikitBaseComponentVue3.TUIIcon), {
key: 0,
icon: _ctx.icon
}, null, 8, ["icon"])) : Vue.createCommentVNode("", true),
_ctx.isNotSupport ? (Vue.openBlock(), Vue.createBlock(Vue.unref(uikitBaseComponentVue3.IconUnSupport), {
key: 1,
class: "unsupport-icon",
size: "14"
})) : Vue.createCommentVNode("", true),
Vue.createElementVNode("span", _hoisted_3, [
Vue.createTextVNode(Vue.toDisplayString(_ctx.title) + " ", 1),
Vue.renderSlot(_ctx.$slots, "title", {}, void 0, true)
])
], 2)),
_ctx.hasMore ? (Vue.openBlock(), Vue.createElementBlock("div", {
key: 2,
ref: "moreSpanRef",
class: "icon-arrow",
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click-more"))
}, [
Vue.createVNode(Vue.unref(uikitBaseComponentVue3.IconArrowUp), { size: "12" })
], 512)) : Vue.createCommentVNode("", true)
]);
};
}
});
exports.default = _sfc_main;
;