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

处理Tool1图标问题

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