1.How can the local styles referenced in vue also take effect on other pages? After the router switches the page, it loads the style of the changed page
我想大声告诉你2017-07-06 10:37:40
Partial styles can only be applied locally. If you need to use them globally, you can put the public class into app.vue
女神的闺蜜爱上我2017-07-06 10:37:40
In vue, there is the general component app.vue. In this file, the commands you want to promote to the global level can be seen in other operating components. This is the advantage of the declarative framework of vue. In a main The methods or styles defined in the component can be bound to other components
ringa_lee2017-07-06 10:37:40
It just writes the css in a local file, which does not mean that the css only acts locally. If you want it to work only within the component, you can add scoped
<style scoped>
/*css code*/
</style>
phpcn_u15822017-07-06 10:37:40
Two ways
Control the scope of the tag selector yourself
Add scoped to style in the component template.