Fri Jun 9 03:49:00 UTC 2023 inscode

上级 39fed091
......@@ -8,10 +8,10 @@
</template>
</div>
<div class="question ivu-mt">
<Input v-model="question" type="textarea" :autosize="{ minRows: 4, maxRows: 6 }" placeholder="输入你的问题" />
<Input v-model="question" type="textarea" :autosize="{ minRows: 4, maxRows: 6 }" placeholder="输入你的问题" @keydown.ctrl.enter="keyCtrlEnter" />
<Row class="ivu-mt">
<Col>
<Button type="primary" size="large" icon="md-send" :loading="loading" @click="handleSend">发送</Button>
<Button type="primary" size="large" icon="md-send" :loading="loading" @click="handleSend">发送(Ctrl+Enter)</Button>
</Col>
<Col>
<Button size="large" class="ivu-ml" icon="md-add" :disabled="loading" @click="handleNewChat">新对话</Button>
......@@ -33,6 +33,10 @@ export default {
}
},
methods: {
//Ctrl + enter按键 发生消息
keyCtrlEnter(e){
this.handleSend()
},
handleSend() {
if (this.loading || this.question === '') return;
this.loading = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册