create-react-app引入Ant Design

一、reeact官方脚手架搭建:

先安装node.js,安装这里就不在进行叙述,然后在cmd命令行工具中找个空文件夹,依次执行以下几条命令:

npm create-react-app my-app

cd my-app

npm start

二、搭建好项目后,执行:

npm install antd --save

官方给出的部署文档:https://ant.design/docs/react/use-with-create-react-app-cn

三、在App.css中引入

create-react-app引入Ant Design

四、在组件中进行引入使用即可:

create-react-app引入Ant Design

create-react-app引入Ant Design

五、运行结果:

create-react-app引入Ant Design

 

相关文章:

  • 2021-06-17
  • 2022-12-23
  • 2021-09-06
  • 2021-05-15
  • 2022-12-23
  • 2021-10-03
  • 2021-09-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-11
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案