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,

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