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,

55 lines (54 loc) 1.58 kB
import { defineComponent, watch, createBlock, openBlock, withCtx, createVNode, normalizeClass, unref } from "vue"; import { DrawingTool } from "../type.mjs"; import IconButton from "../../common/base/IconButton.vue.mjs"; import SelectIcon from "./Icon/SelectIcon.vue.mjs"; import logger from "../../../utils/common/logger/index.mjs"; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "SelectButton", props: { activeTool: String, changeTool: String }, emits: ["click"], setup(__props, { emit: __emit }) { const props = __props; const emit = __emit; watch( () => props.changeTool, () => { if (props.changeTool === DrawingTool.Select) { logger.error( "changeToochangeToolchangeToolchangeToolchangeToolchangeToolchangeToolchangeToolchangeTooll" ); emit("click", { drawingTool: DrawingTool.Select }); } } ); const onClick = () => { if (props.activeTool === DrawingTool.Select) { return; } emit("click", { drawingTool: DrawingTool.Select }); }; return (_ctx, _cache) => { return openBlock(), createBlock(IconButton, { class: "tool-button", onClickIcon: onClick }, { default: withCtx(() => [ createVNode(SelectIcon, { class: normalizeClass({ "whiteboard-icon-active": __props.activeTool === unref(DrawingTool).Select }) }, null, 8, ["class"]) ]), _: 1 }); }; } }); export { _sfc_main as default };