How can I apply Vue.js scoped styles to components loaded via <view-router>
.
Here is my code:
<template>
<div id="admin">
<router-view></router-view>
</div>
</template>
<style lang="scss" scoped>
#admin {
.actions {
display: none;
span {
cursor: pointer;
}
}
}
</style>
When I visit the /posts
a component named Posts
will be loaded, inside this component I have a
<div class="actions">
some content
</div>
The problem is that the style defined in #admin
is not applied to .action
element. When not scoped, this works fine. The problem come when the #admin
component styling is scoped
.
Is there any way to do that while keeping the .actions
style inside the admin
component scoped style tag?