pref: 优化部份内容

This commit is contained in:
ChenZhaoYu
2023-02-09 15:48:27 +08:00
parent 93f4af22a2
commit 36eff8af07
8 changed files with 107 additions and 44 deletions

View File

@@ -7,8 +7,18 @@ import Chat from '@/views/Chat/index.vue'
<template>
<NConfigProvider class="h-full" preflight-style-disabled>
<NaiveProvider>
<div class="h-full p-4">
<Chat />
<div class="flex flex-col h-full p-4">
<div class="flex-1">
<div class="container h-full m-auto">
<Chat />
</div>
</div>
<div class="px-4 mt-4 text-sm text-center text-neutral-500">
Made By ChenZhaoYu
<a href="https://github.com/Chanzhaoyu/chatgpt-bot" target="_blank" class="text-blue-500">
Github
</a>
</div>
</div>
</NaiveProvider>
</NConfigProvider>

View File

@@ -1,3 +1,5 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
/** api url */
readonly VITE_GLOB_API_URL: string;

View File

@@ -74,7 +74,9 @@ function addMessage(message: string, user = false, error = false) {
<template>
<div class="flex flex-col h-full overflow-hidden border rounded-md shadow-md">
<header class="flex items-center justify-between p-4">
<div>会话</div>
<h1 class="text-xl font-bold">
Chat
</h1>
<div>
<button
class="w-[40px] h-[40px] rounded-full hover:bg-neutral-100 transition flex justify-center items-center"
@@ -103,7 +105,9 @@ function addMessage(message: string, user = false, error = false) {
@keyup="handleEnter"
/>
<NButton type="primary" :loading="loading" @click="handleSubmit">
<SvgIcon icon="ri:send-plane-fill" />
<template #icon>
<SvgIcon icon="ri:send-plane-fill" />
</template>
</NButton>
</div>
</footer>