当前位置: 代码迷 >> 综合 >> react-creat-app+antd
  详细解决方案

react-creat-app+antd

热度:21   发布时间:2024-03-07 20:04:23.0

安装

npx create-react-app demo

cd到该文件路径下

npm start

npm add antd

引入

1.在App.js中输入(例为按钮组件)

import { button } from 'antd';
const App = () => (<div className="App"><Button type="primary">Button</Button></div>
);

代码在:https://ant.design/components/overview-cn/

2.在App.css顶部加上

@import '~antd/dist/antd.css';

3.最终效果

  相关解决方案