Merge pull request #6 from jjm2473/patch-1

fix: 防止中文输入法输入英文时触发提交
This commit is contained in:
Redon 2023-02-12 10:24:04 +08:00 committed by GitHub
commit ddec57f562
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ function addMessage(message: string, reversal = false) {
</main>
<footer class="p-4">
<div class="flex items-center justify-between space-x-2">
<NInput v-model:value="value" :disabled="loading" placeholder="Type a message..." @keyup="handleEnter" />
<NInput v-model:value="value" :disabled="loading" placeholder="Type a message..." @keypress="handleEnter" />
<NButton type="primary" :loading="loading" @click="handleSubmit">
<template #icon>
<Icon icon="ri:send-plane-fill" />