提交 450d3027 authored 作者: 付康's avatar 付康

合并分支 'fk-dev' 到 'pre'

Fk dev 查看合并请求 !265
流水线 #169 已通过 于阶段
in 4 分 42 秒
......@@ -33,7 +33,7 @@
<div class="menu-box" v-show="isShowMenu" @mouseenter="handleHoverMenu(true)"
@mouseleave="handleHoverMenu(false)">
<div class="menu-content">
<div class="menu-item" v-for="(item, index) in menuList" :key="index" @click="handleToModule(item)">
<div class="menu-item" v-for="(item, index) in menuList" :key="index" @click="handleToModule(item, 1)">
<div class="icon">
<img :src="item.icon" alt="" />
</div>
......@@ -44,7 +44,7 @@
<div class="tool-box" v-show="isShowTool" @mouseenter="handleHoverTool(true)"
@mouseleave="handleHoverTool(false)">
<div class="menu-content">
<div class="menu-item" v-for="(item, index) in toolList" :key="index" @click="handleToModule(item)">
<div class="menu-item" v-for="(item, index) in toolList" :key="index" @click="handleToModule(item, 2)">
<div class="icon">
<img :src="item.icon" alt="" />
</div>
......@@ -57,7 +57,7 @@
</template>
<script setup>
import { ref, computed, onMounted, watchEffect } from "vue";
import { ref, computed, onMounted, watchEffect, onUnmounted } from "vue";
import { useRouter } from "vue-router";
import { useRoute } from "vue-router";
import { getPersonType } from "@/api/common/index";
......@@ -226,30 +226,25 @@ const toolList = ref([
{
title: "智能写报",
icon: Tool2,
path: "/writting"
path: "/writtingAsstaint"
},
])
const handleToModule = item => {
// const curRoute = router.resolve({
// path: item.path
// });
// window.open(curRoute.href, "_blank");
const handleToModule = (item, index) => {
homeActiveTitleIndex.value = index
if (index === 1) {
router.push({
path: item.path
})
};
const searchText = ref("");
const handleSearch = () => {
} else {
const curRoute = router.resolve({
path: "/searchResults",
query: {
searchText: searchText.value
}
path: item.path
});
window.open(curRoute.href, "_blank");
}
isShowMenu.value = false
isShowTool.value = false
};
const handleClickTitle = (item, index) => {
......@@ -276,6 +271,10 @@ onMounted(() => {
handleGetPersonType();
homeActiveTitleIndex.value = Number(window.localStorage.getItem('homeActiveTitleIndex'))
});
onUnmounted(() => {
window.localStorage.removeItem('homeActiveTitleIndex')
})
</script>
<style lang="scss" scoped>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论