acdr-ui/dist/build/mp-weixin/modules/pet/message/privatechat.js
2024-10-01 09:15:35 +08:00

2 lines
477 B
JavaScript

"use strict";const e=require("../../../common/vendor.js"),o=require("../../../service/webSocket.js");if(!Array){e.resolveComponent("layout-default-uni")()}const t={__name:"privatechat",setup(t){const{connectWebSocket:n,sendMessage:a,closeWebSocket:u}=o.useWebSocket(),c=e.ref(""),r=()=>{""!==c.value.trim()&&(a(c.value),c.value="")};return e.onMounted((()=>{n()})),e.onUnmounted((()=>{u()})),(o,t)=>({a:c.value,b:e.o((e=>c.value=e.detail.value)),c:e.o(r)})}};wx.createPage(t);