@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,
40 lines (39 loc) • 1.13 kB
JavaScript
import { defineComponent, createBlock, openBlock, withCtx, createVNode, normalizeClass, unref } from "vue";
import { DrawingTool } from "../type.mjs";
import IconButton from "../../common/base/IconButton.vue.mjs";
import EraserIcon from "./Icon/EraserIcon.vue.mjs";
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "EraserButton",
props: {
activeTool: String
},
emits: ["click"],
setup(__props, { emit: __emit }) {
const props = __props;
const emit = __emit;
const onClick = () => {
if (props.activeTool === DrawingTool.Eraser) {
return;
}
emit("click", {
drawingTool: DrawingTool.Eraser
});
};
return (_ctx, _cache) => {
return openBlock(), createBlock(IconButton, {
class: "tool-button",
onClickIcon: onClick
}, {
default: withCtx(() => [
createVNode(EraserIcon, {
class: normalizeClass({ "whiteboard-icon-active": __props.activeTool === unref(DrawingTool).Eraser })
}, null, 8, ["class"])
]),
_: 1
});
};
}
});
export {
_sfc_main as default
};