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,

36 lines (35 loc) 1.01 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const Vue = require("vue"); const avatar = require("../../assets/imgs/avatar.png.js"); const _hoisted_1 = { class: "avatar-container" }; const _hoisted_2 = ["src"]; const _sfc_main = /* @__PURE__ */ Vue.defineComponent({ __name: "Avatar", props: { imgSrc: {} }, setup(__props) { const props = __props; const src = Vue.computed(() => { if (isError.value) { return avatar.default; } return props.imgSrc || avatar.default; }); const isError = Vue.ref(false); function handleError() { isError.value = true; } return (_ctx, _cache) => { return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [ Vue.createElementVNode("img", { class: "avatar", src: src.value, onerror: handleError }, null, 8, _hoisted_2) ]); }; } }); exports.default = _sfc_main;