考虑到有单个文件组件(如指南中所示),
<style>
.example {
color: red;
}
</style>
<template>
<div class="example">hi</div>
</template>
Run Code Online (Sandbox Code Playgroud)
在非模块化ES5/ES6环境中如何在没有Vue加载器的情况下完成同样的事情?
考虑到风格是范围的,
<style scoped>
.example {
color: red;
}
</style>
Run Code Online (Sandbox Code Playgroud)
有没有办法在非模块化环境中实现作用域CSS?如果没有,有没有办法在模块化环境(Webpack)中实现它,但没有Vue加载器和自定义.vue格式?