From 25190adaaf1aa820b49ae33b8f9c5220413534a9 Mon Sep 17 00:00:00 2001 From: kingc2022 <99593855+kingc2022@users.noreply.github.com> Date: Sat, 26 Oct 2024 19:20:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=20UI=20=E5=92=8C=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E8=81=8A=E5=A4=A9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auto-imports.d.ts | 5 +++++ src/components/chat/Chat.vue | 6 ++---- src/components/chat/Layout.vue | 5 ++++- vite.config.ts | 7 +++++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/auto-imports.d.ts b/src/auto-imports.d.ts index e8f788b..39054c1 100644 --- a/src/auto-imports.d.ts +++ b/src/auto-imports.d.ts @@ -3,6 +3,7 @@ // @ts-nocheck // noinspection JSUnusedGlobalSymbols // Generated by unplugin-auto-import +// biome-ignore lint: disable export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] @@ -105,6 +106,7 @@ declare module 'vue' { readonly onServerPrefetch: UnwrapRef readonly onUnmounted: UnwrapRef readonly onUpdated: UnwrapRef + readonly onWatcherCleanup: UnwrapRef readonly provide: UnwrapRef readonly reactive: UnwrapRef readonly readonly: UnwrapRef @@ -122,9 +124,12 @@ declare module 'vue' { readonly useAttrs: UnwrapRef readonly useCssModule: UnwrapRef readonly useCssVars: UnwrapRef + readonly useId: UnwrapRef + readonly useModel: UnwrapRef readonly useRoute: UnwrapRef readonly useRouter: UnwrapRef readonly useSlots: UnwrapRef + readonly useTemplateRef: UnwrapRef readonly watch: UnwrapRef readonly watchEffect: UnwrapRef readonly watchPostEffect: UnwrapRef diff --git a/src/components/chat/Chat.vue b/src/components/chat/Chat.vue index 6d806d7..8cc4e4c 100644 --- a/src/components/chat/Chat.vue +++ b/src/components/chat/Chat.vue @@ -27,8 +27,8 @@ 我们有一些预设提示词,您可以点击来一键输入。 - - + + AI 也有可能犯错误,请在使用之前核查信息。 -
- 测试版本,不代表最终品质。 diff --git a/src/components/chat/Layout.vue b/src/components/chat/Layout.vue index 2f3cf2d..6fd42a9 100644 --- a/src/components/chat/Layout.vue +++ b/src/components/chat/Layout.vue @@ -36,7 +36,7 @@ -
+
{ onPositiveClick: async () => { await getApi().Chat.apiV1ChatsIdDelete(chatId); await getChats(); + if (parseInt(router.currentRoute.value.params.id) === chatId) { + router.push("/") + } }, }); }; diff --git a/vite.config.ts b/vite.config.ts index ba3f721..2df9056 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,6 +10,13 @@ import AutoImport from "unplugin-auto-import/vite"; import { fileURLToPath, URL } from "node:url"; // https://vitejs.dev/config/ export default defineConfig({ + css: { + preprocessorOptions: { + scss: { + api: "modern-compiler", // or "modern", "legacy" + }, + }, + }, resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)),