提交 b0aefd1e authored 作者: yanpeng's avatar yanpeng

处理Tool1图标问题

......@@ -212,6 +212,7 @@ const toolList = ref([
]);
const handleToModule = (item, index) => {
window.sessionStorage.setItem("homeActiveTitleIndex", index);
if (index === 1) {
homeActiveTitleIndex.value = index;
router.push({
......@@ -232,10 +233,8 @@ const handleToModule = (item, index) => {
};
const handleClickTitle = (item, index) => {
// if (homeActiveTitleIndex.value === index) return
window.localStorage.setItem("homeActiveTitleIndex", homeActiveTitleIndex.value);
if (index === 0 || index === 3) {
window.sessionStorage.setItem("homeActiveTitleIndex", index);
homeActiveTitleIndex.value = index;
router.push(item.path);
}
......@@ -250,9 +249,13 @@ onMounted(() => {
if (route.query.titleIndex) {
homeActiveTitleIndex.value = Number(route.query.titleIndex);
} else {
homeActiveTitleIndex.value = Number(window.localStorage.getItem("homeActiveTitleIndex"));
homeActiveTitleIndex.value = Number(window.sessionStorage.getItem("homeActiveTitleIndex"));
}
});
onUnmounted(() => {
window.sessionStorage.removeItem("homeActiveTitleIndex");
});
</script>
<style lang="scss" scoped>
......
......@@ -3,7 +3,7 @@
<div class="pro-wrapper">
<div class="home-page">
<ModuleHeader v-if="isShowHeader" />
<div class="main-container">
<div class="main-container" :class="{'main-container1': isShowHeader}">
<router-view />
</div>
</div>
......@@ -548,7 +548,14 @@ body {
.main-container {
width: 100%;
height: calc(100vh - 64px);
// height: calc(100vh - 64px);
height: 100vh;
position: relative;
overflow: hidden;
}
.main-container1 {
width: 100%;
height: calc(100vh - 64px) !important;
position: relative;
overflow: hidden;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论