Is there a way to set the Vue parent component footer CSS differently only in the subcomponent inside the router?
I want to change the login.vue CSS inside the Router view
I tried both the deep method and the import method, but failed. Any alternatives?
<template>
<ToHeader />
<RouterView />
<ToFooter />
</template>
footer.vue
<template>
<div class="footer">
<div class="footer_wrap">
<h2 class="logo">
Logo
</h2>
</div>
</div>
</template>
<style>
/* footer */
.footer{
width: 100%;
height: 160px;
display: flex;
align-items: center;
background: #3d3936;
position: absolute;
bottom: 0;
}
</style>
Login.vue
<template class="login">
<div class="login_box">
</div>
</template>
<style>
.login_box {
position: absolute;
top: 50%;
transform: translate(-50% ,-70%);
left: 50%;
}
::v-deep .footer{
display: none;
}
</style>