feat: 混合布局
This commit is contained in:
parent
c31c15c244
commit
eb7436067f
@ -174,7 +174,7 @@ const handleCancel = () => {
|
|||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 20px;
|
width: 10px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #232324;
|
background: #232324;
|
||||||
}
|
}
|
||||||
@ -184,9 +184,9 @@ const handleCancel = () => {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 50px;
|
width: 60px;
|
||||||
height: 15px;
|
height: 10px;
|
||||||
background: #fff;
|
background: #c2c4c8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ const handleCancel = () => {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 15px;
|
height: 10px;
|
||||||
background: #232324;
|
background: #232324;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -211,7 +211,7 @@ const handleCancel = () => {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 15px;
|
height: 10px;
|
||||||
background: #232324;
|
background: #232324;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,9 +219,9 @@ const handleCancel = () => {
|
|||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 15px;
|
top: 10px;
|
||||||
width: 20px;
|
width: 10px;
|
||||||
height: calc(100% - 15px);
|
height: calc(100% - 10px);
|
||||||
background: #232324;
|
background: #232324;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,11 +68,8 @@ console.log("路由信息", route);
|
|||||||
// 混合布局的横向菜单为顶层路由下的一级菜单
|
// 混合布局的横向菜单为顶层路由下的一级菜单
|
||||||
// 这里通过当前路由信息直接获取
|
// 这里通过当前路由信息直接获取
|
||||||
const aciveRoute = computed(() => {
|
const aciveRoute = computed(() => {
|
||||||
if (route.matched.length >= 2) {
|
getAsideMenu(route.matched[1].name as string);
|
||||||
return route.matched[1].name;
|
return route.matched[1].name;
|
||||||
} else {
|
|
||||||
return route.matched[0].name;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 横向菜单点击事件
|
// 横向菜单点击事件
|
||||||
@ -108,7 +105,7 @@ const getAsideMenu = (key: string) => {
|
|||||||
const find = findLinearArray(key);
|
const find = findLinearArray(key);
|
||||||
setAsideMenu(find);
|
setAsideMenu(find);
|
||||||
};
|
};
|
||||||
getAsideMenu(aciveRoute.value as string);
|
// getAsideMenu(aciveRoute.value as string);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user