Open
Description
Copied from vuejs/vue#4381 (comment)
Consider two component:
// BaseComp.vue
<template>
<div :class="$style.base">
BaseComp.vue
</div>
</template>
<style module>
.base{
color: red;
background-color: green;
}
</style>
// Hello.vue
<template>
<BaseComp :class="$style.hello"/>
</template>
<script>
import BaseComp from './BaseComp.vue'
export default {
name: 'hello',
components: {
BaseComp
}
}
</script>
<style module>
.hello {
color: blue;
background-color: pink;
}
</style>
Obviously I want to override the style of .base
, but actually it does not work because the style of BaseComp.vue
is loaded after Hello.vue
……