mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-04-24 12:04:31 +08:00
代码显示高亮加上展开和收起按钮
This commit is contained in:
@@ -299,7 +299,7 @@
|
||||
v-model="prompt"
|
||||
@keydown="onInput"
|
||||
@input="onInput"
|
||||
placeholder="按 Enter 键发送消息,使用 Ctrl + Enter 换行"
|
||||
placeholder="按 Enter 键发送消息,使用 Shift + Enter 换行"
|
||||
autofocus
|
||||
>
|
||||
</textarea>
|
||||
@@ -1092,9 +1092,8 @@ const onInput = (e) => {
|
||||
|
||||
// 输入回车自动提交
|
||||
if (e.keyCode === 13) {
|
||||
if (e.ctrlKey) {
|
||||
// Ctrl + Enter 换行
|
||||
prompt.value += '\n'
|
||||
// Shift + Enter 换行
|
||||
if (e.shiftKey) {
|
||||
return
|
||||
}
|
||||
e.preventDefault()
|
||||
|
||||
Reference in New Issue
Block a user