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.21 kB
JavaScript
import { defineComponent, openBlock, createElementBlock, Fragment, renderList, toDisplayString, createCommentVNode } from "vue";
import { decodeMessageText } from "../util.mjs";
const _hoisted_1 = {
key: 0,
class: "text-box"
};
const _hoisted_2 = ["src"];
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "MessageText",
props: ["data"],
setup(__props) {
const props = __props;
const handleTextMessageShowContext = (text) => decodeMessageText(text);
return (_ctx, _cache) => {
return openBlock(), createElementBlock("span", null, [
(openBlock(true), createElementBlock(Fragment, null, renderList(handleTextMessageShowContext(props.data), (item, index) => {
return openBlock(), createElementBlock("span", { key: index }, [
item.name === "text" ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(item.text), 1)) : item.name === "img" ? (openBlock(), createElementBlock("img", {
key: 1,
class: "text-img",
src: item.src
}, null, 8, _hoisted_2)) : createCommentVNode("", true)
]);
}), 128))
]);
};
}
});
export {
_sfc_main as default
};