diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index c2ed0b6..24224c7 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -62,6 +62,14 @@ + + + +
+ +
+
+
@@ -98,6 +106,7 @@ import { getTenantList } from '@/api/login'; import { dynamicClear, dynamicTenant } from '@/api/system/tenant'; import { TenantVO } from '@/api/types'; import notice from './notice/index.vue'; +import AiAssistant from './TopBar/aiAssistant.vue'; const appStore = useAppStore(); const userStore = useUserStore(); @@ -182,14 +191,23 @@ const handleCommand = (command: string) => { commandMap[command](); } }; + + +const aiAssistantRef = ref>(); + +const openAiAssistantMenu = () => { + aiAssistantRef.value?.openSearch(); +}; + + //用深度监听 消息 -watch( - () => noticeStore.state.value.notices, - (newVal) => { - newNotice.value = newVal.filter((item: any) => !item.read).length; - }, - { deep: true } -); +// watch( +// () => noticeStore.state.value.notices, +// (newVal) => { +// newNotice.value = newVal.filter((item: any) => !item.read).length; +// }, +// { deep: true } +// ); +