我有一个子组件需要使用spectre.css,但是当我在子组件中导入spectre.css时,父组件也会受到影响。如何使spectre.css只应用于子组件?谢谢
父组件:
class ParentComponent extends React.Component{
render(){
return <ChildComponent></ChildComponent>
}
}在儿童部分,
import from 'spectre.css'
class ChildComponent extends React.Component{
/* ... */
}https://stackoverflow.com/questions/55364270
复制相似问题