1.安装ant
yarn add antd
2.导入组件
//index.jsimport React from 'react';import ReactDOM from 'react-dom';import App from './App'//样式一定要配置在入口文件中import 'antd/dist/antd.css'ReactDOM.render(<App />, document.getElementById('root'));
3.使用 app.js
//在app.js中使用 在需要使用组件的页面引入即可import {Button} from 'antd';//使用<Button></Button>
