可信代码库-可信开源代码库AI助手跳转按钮及历史列表按钮添加

This commit is contained in:
付民康
2025-05-08 15:04:31 +08:00
parent 59fe23153d
commit be3cc41e65
4 changed files with 57 additions and 3 deletions

View File

@@ -14,6 +14,9 @@
<div class="flex-1 flex items-center justify-end" v-if="!isHome">
<Search class="g-toolbar-left-search" v-if="!isMobile" :key="$route.fullPath" />
</div>
<a v-if="!isHome" @click="gotoAI">
<img style="width: 98px;height: 32px;cursor: pointer" src="@/assets/imgs/jyh/ai/ai_zh.png" />
</a>
<div class="g-toolbar-right gap-[12px] flex-grow-0 flex-shrink-0">
<GLink
class="g-toolbar-right-link"
@@ -76,7 +79,7 @@
import { onBeforeUnmount, ref, watchEffect, computed } from 'vue';
import { useElementSize } from '@vueuse/core';
import { storeToRefs } from 'pinia';
import { useRoute } from 'vue-router';
import { useRoute, useRouter } from 'vue-router';
import { useAccountStore } from '@/stores/user';
import { emitEvent } from '@/utils/eventBus';
@@ -108,6 +111,11 @@ const handleLogin = (type) => {
emitEvent('login', { type, triggerType: '主动注册' });
};
const { isMobile } = usePageResize();
const router = useRouter();
const gotoAI = (row) => {
// 后续请换成params暂时params传参没传过去
router.push({ name: 'aihome' });
};
/* store 用户信息 */
/* @test 后面将清除 */