标签:发送消息 his eve rip meta enter NPU prevent size
html:
<el-input type="textarea" autofocus="true" @keydown.native="handleKeyCode($event)" resize="none" v-model="messageTxt" maxlength="2000" show-word-limit > </el-input>
js:
// 键盘回车事件 handleKeyCode(event) { if (event.keyCode == 13) { if (!event.metaKey) { event.preventDefault(); this.handleTextSend(); } else { this.messageTxt = this.messageTxt + ‘\n‘; } } },
// 发送消息
handleTextSend() {
}
标签:发送消息 his eve rip meta enter NPU prevent size
原文地址:https://www.cnblogs.com/bgwhite/p/12160559.html