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,

32 lines (31 loc) 1.05 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const Vue = require("vue"); const _hoisted_1 = { class: "timing" }; const _sfc_main = /* @__PURE__ */ Vue.defineComponent({ __name: "RoomTime", setup(__props) { const meetingTime = Vue.ref(0); let intervalId = null; const formattedTime = Vue.computed(() => { const minutes = Math.floor(meetingTime.value / 60); const seconds = meetingTime.value % 60; return `${minutes.toString().padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`; }); function startTimer() { intervalId = setInterval(() => { meetingTime.value += 1; }, 1e3); } Vue.onMounted(() => { startTimer(); }); Vue.onUnmounted(() => { intervalId && clearInterval(intervalId); }); return (_ctx, _cache) => { return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, Vue.toDisplayString(formattedTime.value), 1); }; } }); exports.default = _sfc_main;