-
+
+
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/layouts/Header.vue b/src/layouts/Header.vue
index 86d8abf..8fbdf87 100644
--- a/src/layouts/Header.vue
+++ b/src/layouts/Header.vue
@@ -23,8 +23,9 @@
resizable
:default-width="width"
placement="left"
+ class="select-none"
>
-
+
@@ -44,9 +45,15 @@
-
-
-
+
+
+
+
+
+
+ 新对话
+
+
@@ -89,17 +96,24 @@ import UserMenu from "../components/UserMenu.vue";
import AssistantMenu from "../components/AssistantMenu.vue";
import { useAppStore } from "../stores/app";
import { useUserStore } from "../stores/user";
-import { useIsMobile, useIsTablet } from "../utils/composables";
-import { MenuOutline, PersonOutline, AddOutline } from "@vicons/ionicons5";
+import { useIsMobile } from "../utils/composables";
+import {
+ MenuOutline,
+ PersonOutline,
+ AddOutline,
+ TrashOutline,
+} from "@vicons/ionicons5";
import router from "@/router";
-
+import { useChatStore } from "@/stores/chat";
+import getApi from "@/plugins/api";
const userStore = useUserStore();
const isMobile = useIsMobile();
-const isTablet = useIsTablet();
+// const isTablet = useIsTablet();
const appStore = useAppStore();
const showDrawer = ref(false);
const width = ref(200);
+const chatStore = useChatStore();
// 如果是手机,则 width 为全屏
if (isMobile.value) {
@@ -115,9 +129,11 @@ if (isMobile.value) {
userPlacement.value = "bottom";
}
+const clearChatHistory = async () => {
+ await getApi().ChatMessage.apiV1ChatsIdClearPost(chatStore.currentChatId);
+};
+
const backToHome = () => {
router.push("/");
};
-
-
diff --git a/src/main.ts b/src/main.ts
index 11baee3..e0a3b8f 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -3,6 +3,7 @@ meta.name = "naive-ui-style";
document.head.appendChild(meta);
import "./style.css";
+import "animate.css";
import { registerPlugins } from "./plugins";
import router from "./router";
diff --git a/src/style.css b/src/style.css
index cba4625..a9bc2bc 100644
--- a/src/style.css
+++ b/src/style.css
@@ -6,6 +6,20 @@
--header-height: 48px;
}
+body {
+ overflow: hidden;
+}
+
.header-height {
min-height: var(--header-height);
}
+
+.fade-enter-active,
+.fade-leave-active {
+ transition: opacity 0.15s ease-in-out;
+}
+
+.fade-enter-from,
+.fade-leave-to {
+ opacity: 0;
+}