可信代码库-可信开源代码库AI助手跳转按钮及历史列表按钮添加
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
"format": "prettier --write src/"
|
"format": "prettier --write src/"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@devui-design/icons": "^1.3.0",
|
"@devui-design/icons": "^1.4.0",
|
||||||
"@matechat/core": "^1.4.0",
|
"@matechat/core": "^1.4.0",
|
||||||
"@micro-zoe/micro-app": "1.0.0-rc.3",
|
"@micro-zoe/micro-app": "1.0.0-rc.3",
|
||||||
"@sentry/vue": "^7.101.1",
|
"@sentry/vue": "^7.101.1",
|
||||||
|
|||||||
BIN
src/assets/imgs/jyh/ai/ai_zh.png
Normal file
BIN
src/assets/imgs/jyh/ai/ai_zh.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
@@ -14,6 +14,9 @@
|
|||||||
<div class="flex-1 flex items-center justify-end" v-if="!isHome">
|
<div class="flex-1 flex items-center justify-end" v-if="!isHome">
|
||||||
<Search class="g-toolbar-left-search" v-if="!isMobile" :key="$route.fullPath" />
|
<Search class="g-toolbar-left-search" v-if="!isMobile" :key="$route.fullPath" />
|
||||||
</div>
|
</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">
|
<div class="g-toolbar-right gap-[12px] flex-grow-0 flex-shrink-0">
|
||||||
<GLink
|
<GLink
|
||||||
class="g-toolbar-right-link"
|
class="g-toolbar-right-link"
|
||||||
@@ -76,7 +79,7 @@
|
|||||||
import { onBeforeUnmount, ref, watchEffect, computed } from 'vue';
|
import { onBeforeUnmount, ref, watchEffect, computed } from 'vue';
|
||||||
import { useElementSize } from '@vueuse/core';
|
import { useElementSize } from '@vueuse/core';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { useAccountStore } from '@/stores/user';
|
import { useAccountStore } from '@/stores/user';
|
||||||
import { emitEvent } from '@/utils/eventBus';
|
import { emitEvent } from '@/utils/eventBus';
|
||||||
|
|
||||||
@@ -108,6 +111,11 @@ const handleLogin = (type) => {
|
|||||||
emitEvent('login', { type, triggerType: '主动注册' });
|
emitEvent('login', { type, triggerType: '主动注册' });
|
||||||
};
|
};
|
||||||
const { isMobile } = usePageResize();
|
const { isMobile } = usePageResize();
|
||||||
|
const router = useRouter();
|
||||||
|
const gotoAI = (row) => {
|
||||||
|
// 后续请换成params,暂时params传参没传过去
|
||||||
|
router.push({ name: 'aihome' });
|
||||||
|
};
|
||||||
|
|
||||||
/* store 用户信息 */
|
/* store 用户信息 */
|
||||||
/* @test 后面将清除 */
|
/* @test 后面将清除 */
|
||||||
|
|||||||
@@ -62,7 +62,15 @@
|
|||||||
|
|
||||||
<!-- 浮动工具栏(移动端不显示) -->
|
<!-- 浮动工具栏(移动端不显示) -->
|
||||||
<!-- <ToolsFloat v-if="showToolsFloat" />-->
|
<!-- <ToolsFloat v-if="showToolsFloat" />-->
|
||||||
|
<!-- 在 d-layout 结束前添加返回按钮 -->
|
||||||
|
<div class="back-in-btn">
|
||||||
|
<div class="back-in-time-btn" @click="handleBackInTime">
|
||||||
|
<i class="icon icon-history" title="查看历史"></i>
|
||||||
|
</div>
|
||||||
|
<div class="back-in-time-btn" @click="handleBackInTime">
|
||||||
|
<i class="icon icon-operation-log" title="查看文档"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</d-layout>
|
</d-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -209,4 +217,42 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.back-in-btn {
|
||||||
|
position: fixed;
|
||||||
|
left: 20px;
|
||||||
|
bottom: 20px;
|
||||||
|
display: flex;
|
||||||
|
gap: 12px;
|
||||||
|
|
||||||
|
.back-in-time-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 8px;
|
||||||
|
background-color: var(--el-color-primary);
|
||||||
|
//color: white;
|
||||||
|
border-radius: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 999;
|
||||||
|
transition: all 0.3s;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-in-time-btn:hover {
|
||||||
|
background-color: var(--el-color-primary-light-3);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式调整 - 移动端隐藏或调整位置 */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.back-in-time-btn {
|
||||||
|
left: 10px;
|
||||||
|
bottom: 10px;
|
||||||
|
padding: 6px 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user