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