react使用ant-design组件库

新建项目并引入组件

1,全局安装脚手架

npm install -g create-react-app

2,新建项目

create-react-app reactantd

3,安装组件

npm install antd --save

4,引入组件

在需要使用组件的页面进行引入并使用

import Button from 'antd/lib/button'
import 'antd/dist/antd.css'
<Button type="primary">antd</Button>

猜你喜欢

转载自www.cnblogs.com/yuyujuan/p/10335919.html