增加 标识
This commit is contained in:
parent
b55da311a6
commit
c7906514ef
@ -1,8 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Container from "../components/Container.vue";
|
import { NLayout } from "naive-ui";
|
||||||
import { NLayout, NLayoutContent, NLayoutSider } from "naive-ui";
|
|
||||||
import { useIsMobile } from "../utils/composables.js";
|
|
||||||
import Menu from "../components/Menu.vue";
|
|
||||||
import { useUserStore } from "../stores/user";
|
import { useUserStore } from "../stores/user";
|
||||||
import Guest from "../pages/guest/index.vue";
|
import Guest from "../pages/guest/index.vue";
|
||||||
import router from "../router";
|
import router from "../router";
|
||||||
@ -11,12 +8,6 @@ const currentRoute = computed(() => router.currentRoute.value.name);
|
|||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
// import Header from './Header.vue'
|
|
||||||
const isMobile = useIsMobile();
|
|
||||||
// const isTablet = useIsTablet()
|
|
||||||
const menuCollapsed = ref({
|
|
||||||
left: false,
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<n-layout class="select-none">
|
<n-layout class="select-none">
|
||||||
<n-layout-header bordered class="layout-header header-height">
|
<n-layout-header bordered class="layout-header header-height">
|
||||||
<n-grid cols="2" class="header-height">
|
<n-grid cols="3" class="header-height">
|
||||||
<n-grid-item class="flex items-center justify-start mr-1.5">
|
<n-grid-item class="flex items-center justify-start mr-1.5">
|
||||||
<!-- 左侧 -->
|
<!-- 左侧 -->
|
||||||
<!-- <n-popover
|
<!-- <n-popover
|
||||||
@ -25,7 +25,11 @@
|
|||||||
placement="left"
|
placement="left"
|
||||||
class="select-none"
|
class="select-none"
|
||||||
>
|
>
|
||||||
<n-drawer-content title="有什么我可以帮您的吗" closable :native-scrollbar="false">
|
<n-drawer-content
|
||||||
|
title="有什么我可以帮您的吗"
|
||||||
|
closable
|
||||||
|
:native-scrollbar="false"
|
||||||
|
>
|
||||||
<LeftSettings></LeftSettings>
|
<LeftSettings></LeftSettings>
|
||||||
</n-drawer-content>
|
</n-drawer-content>
|
||||||
</n-drawer>
|
</n-drawer>
|
||||||
@ -42,6 +46,20 @@
|
|||||||
<div v-show="appStore.updating">正在更新数据</div>
|
<div v-show="appStore.updating">正在更新数据</div>
|
||||||
</n-grid-item>
|
</n-grid-item>
|
||||||
|
|
||||||
|
<n-grid-item class="flex items-center justify-center">
|
||||||
|
<!-- 中间部分 -->
|
||||||
|
<n-popover trigger="hover">
|
||||||
|
<template #trigger>
|
||||||
|
<img
|
||||||
|
:src="leaflowpng"
|
||||||
|
class="w-10 cursor-pointer hidden lg:block"
|
||||||
|
@click="backToHome"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<span> Leaflow 利飞 </span>
|
||||||
|
</n-popover>
|
||||||
|
</n-grid-item>
|
||||||
|
|
||||||
<n-grid-item class="flex items-center justify-end mr-1.5">
|
<n-grid-item class="flex items-center justify-end mr-1.5">
|
||||||
<!-- 右侧 -->
|
<!-- 右侧 -->
|
||||||
<!-- 新对话 -->
|
<!-- 新对话 -->
|
||||||
@ -101,11 +119,12 @@ import {
|
|||||||
MenuOutline,
|
MenuOutline,
|
||||||
PersonOutline,
|
PersonOutline,
|
||||||
AddOutline,
|
AddOutline,
|
||||||
TrashOutline,
|
// TrashOutline,
|
||||||
} from "@vicons/ionicons5";
|
} from "@vicons/ionicons5";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import { useChatStore } from "@/stores/chat";
|
// import { useChatStore } from "@/stores/chat";
|
||||||
import getApi from "@/plugins/api";
|
// import getApi from "@/plugins/api";
|
||||||
|
import leaflowpng from "@/assets/images/leaflow.png";
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const isMobile = useIsMobile();
|
const isMobile = useIsMobile();
|
||||||
@ -113,7 +132,7 @@ const isMobile = useIsMobile();
|
|||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const showDrawer = ref(false);
|
const showDrawer = ref(false);
|
||||||
const width = ref(200);
|
const width = ref(200);
|
||||||
const chatStore = useChatStore();
|
// const chatStore = useChatStore();
|
||||||
|
|
||||||
// 如果是手机,则 width 为全屏
|
// 如果是手机,则 width 为全屏
|
||||||
if (isMobile.value) {
|
if (isMobile.value) {
|
||||||
@ -129,9 +148,9 @@ if (isMobile.value) {
|
|||||||
userPlacement.value = "bottom";
|
userPlacement.value = "bottom";
|
||||||
}
|
}
|
||||||
|
|
||||||
const clearChatHistory = async () => {
|
// const clearChatHistory = async () => {
|
||||||
await getApi().ChatMessage.apiV1ChatsIdClearPost(chatStore.currentChatId);
|
// await getApi().ChatMessage.apiV1ChatsIdClearPost(chatStore.currentChatId);
|
||||||
};
|
// };
|
||||||
|
|
||||||
const backToHome = () => {
|
const backToHome = () => {
|
||||||
router.push("/");
|
router.push("/");
|
||||||
|
Loading…
Reference in New Issue
Block a user