@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,
46 lines (45 loc) • 1.7 kB
JavaScript
import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, createVNode, withDirectives, createElementVNode, withKeys, isRef, vModelText } from "vue";
import emojiPC from "../EditorTools/emojiPC.vue.mjs";
import useChatEditor from "./useChatEditor.mjs";
const _hoisted_1 = ["disabled", "placeholder"];
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "ChatEditorPC",
setup(__props) {
const {
t,
editorInputEle,
sendMsg,
isMessageDisabled,
sendMessage,
handleChooseEmoji
} = useChatEditor();
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(["chat-editor", { disable: unref(isMessageDisabled) }])
}, [
createVNode(unref(emojiPC), {
class: "chat-emoji",
onChooseEmoji: unref(handleChooseEmoji)
}, null, 8, ["onChooseEmoji"]),
withDirectives(createElementVNode("textarea", {
ref_key: "editorInputEle",
ref: editorInputEle,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(sendMsg) ? sendMsg.value = $event : null),
disabled: unref(isMessageDisabled),
class: "content-bottom-input",
placeholder: unref(isMessageDisabled) ? unref(t)("Muted by the moderator") : unref(t)("Type a message"),
onKeyup: _cache[1] || (_cache[1] = withKeys(
//@ts-ignore
(...args) => unref(sendMessage) && unref(sendMessage)(...args),
["enter"]
))
}, null, 40, _hoisted_1), [
[vModelText, unref(sendMsg)]
])
], 2);
};
}
});
export {
_sfc_main as default
};