mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-12 04:03:42 +08:00
fixed bug for ctrl + enter key start a new row
This commit is contained in:
@@ -114,6 +114,8 @@
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
|
||||
<span class="text">Ctrl + Enter 换行</span>
|
||||
|
||||
</el-row>
|
||||
|
||||
<div class="input-box">
|
||||
@@ -457,6 +459,11 @@ export default defineComponent({
|
||||
|
||||
inputKeyDown: function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
if (e.ctrlKey) { // Ctrl + Enter 换行
|
||||
this.inputValue += "\n";
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.sending) {
|
||||
ElMessage.warning("AI 正在作答中,请稍后...");
|
||||
e.preventDefault();
|
||||
@@ -812,6 +819,11 @@ export default defineComponent({
|
||||
background-color #232425
|
||||
cursor pointer
|
||||
}
|
||||
.text {
|
||||
margin-left 10px;
|
||||
font-size 12px;
|
||||
color #9f9f9f;
|
||||
}
|
||||
}
|
||||
|
||||
.input-box {
|
||||
|
||||
Reference in New Issue
Block a user