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,

52 lines (51 loc) 1.71 kB
import { defineComponent, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, renderSlot } from "vue"; const _hoisted_1 = { key: 0, class: "button-icon" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "Button", props: { size: { default: void 0 }, type: { default: void 0 }, customStyle: { type: [Boolean, null, String, Object, Array], default: () => ({}) }, loading: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, round: { type: Boolean, default: true }, plain: { type: Boolean, default: false } }, emits: ["click"], setup(__props, { emit: __emit }) { const props = __props; const emit = __emit; function handleClick(event) { if (!props.disabled) { emit("click", event); } } const buttonClassList = computed(() => [ "tui-button", `tui-button-${props.type}`, `tui-button-${props.size}`, { "tui-button-round": props.round }, { "tui-button-loading": props.loading }, { "tui-button-disabled": props.disabled }, { "tui-button-plain": props.plain } ]); return (_ctx, _cache) => { return openBlock(), createElementBlock("button", { class: normalizeClass(buttonClassList.value), style: normalizeStyle(_ctx.customStyle), onClick: handleClick }, [ _ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_1, [ renderSlot(_ctx.$slots, "icon", {}, void 0, true) ])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6); }; } }); export { _sfc_main as default };