Skip to content

Commit

Permalink
fix: 修复换行失效。
Browse files Browse the repository at this point in the history
  • Loading branch information
Evansy committed Jul 1, 2023
1 parent 0ce0883 commit c0bb921
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/views/Home/components/ChatBox/MsgInput/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ const onInputKeyDown = (e: KeyboardEvent) => {
onSelectPerson(personList.value[activeIndex.value])
}
} else {
// 禁止处理换行
if ((e.ctrlKey && e.key === 'Enter') || (e.shiftKey && e.key === 'Enter')) return
// 仅回车就发送
if (e.key === 'Enter') {
emit('send', e)
}
Expand Down

0 comments on commit c0bb921

Please sign in to comment.