输入框修改为富文本,支持换行 (#53)

* add Dockerfile

* update Readme.md

* Fixed : Docker log file

* Update vite.config.ts

* chore: code merge, update README.md

* chore: update GitHub workflow

* fix: 输入框修改为富文本,支持换行

* chore: 更新.gitignore

* Update index.vue

---------

Co-authored-by: Redon <790348264@qq.com>
main
Void 2 years ago committed by GitHub
parent c98a2a3cb8
commit ea887ad755
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -78,8 +78,10 @@ async function handleSubmit() {
}
function handleEnter(event: KeyboardEvent) {
if (event.key === 'Enter')
if (event.key === 'Enter' && !event.shiftKey) {
event.preventDefault()
handleSubmit()
}
}
function addMessage(
@ -189,7 +191,9 @@ watch(
</HoverButton>
<NInput
v-model:value="prompt"
placeholder="Type a message..."
type="textarea"
:autosize="{ minRows: 1, maxRows: 2 }"
placeholder="Ask me anything..."
@keypress="handleEnter"
/>
<NButton type="primary" :disabled="loading" @click="handleSubmit">

Loading…
Cancel
Save