update

上级 e6aa1410
...@@ -14,7 +14,14 @@ ...@@ -14,7 +14,14 @@
:autosize="{ minRows: 4, maxRows: 6 }" :autosize="{ minRows: 4, maxRows: 6 }"
placeholder="输入你的问题" placeholder="输入你的问题"
/> />
<Button class="ivu-mt" type="primary" size="large" :loading="loading" @click="handleSend">发送</Button> <Row class="ivu-mt">
<Col>
<Button type="primary" size="large" icon="md-send" :loading="loading" @click="handleSend">发送</Button>
</Col>
<Col>
<Button size="large" class="ivu-ml" icon="md-add" :disabled="loading" @click="handleNewChat">新对话</Button>
</Col>
</Row>
</div> </div>
</div> </div>
</template> </template>
...@@ -27,11 +34,11 @@ ...@@ -27,11 +34,11 @@
dialogs: [ dialogs: [
{ {
role: 'me', role: 'me',
text: 'vscode 的' text: '你好'
}, },
{ {
role: 'ai', role: 'ai',
text: 'dshjfjksdhfkjsdhkjfdsjkhfksdhdfjkjkdsfjkhsdkjfhsddshjfjksdhfkjsdhkjfdsjkhfksdhdfjkjkdsfjkhsdkjfhsddshjfjksdhfkjsdhkjfdsjkhfksdhdfjkjkdsfjkhsdkjfhsd' text: '你也好'
} }
] ]
} }
...@@ -40,6 +47,10 @@ ...@@ -40,6 +47,10 @@
handleSend () { handleSend () {
if (this.loading) return; if (this.loading) return;
this.loading = true; this.loading = true;
// todo
},
handleNewChat () {
this.dialogs = [];
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册