关于引入antd样式不生效的问题
有时候我们在引入antd,依赖包什么的都下好了的,可是样式就是不生效,比如这样
import {
Row, Col,Button } from antd;
<Row justify="space-between">
<Col span={
4}>col-4</Col>
<Col span={
4}>col-4</Col>
<Col span={
4}>col-4</Col>
<Col span={
4}>col-4</Col>
</Row>
<Button type="dashed">登陆</Button>
然后页面运行结果却是这样的 这完全没有效果啊,明明我 npm i antd cnpm i antd npm add antd都试过了,为啥没有效果呢, 然后看到官网有这么一句话 就是
@import ~antd/dist/antd.css;
然后我也在index.css文件里面引入了,结果直接报错???
====================================== 又找了一会,发现没有下载依赖包。 于是把这个下下来就好啦!
npm i babel-plugin-import
