刘曙尘

导航

react-native引入Antd-mobile

1.这是安装antd-mobile-rn
    yarn add @ant-design/react-native

2.antd-mobile-rn里面有很多Icon和font如果需要引入,则下载
    yarn add @ant-design/icons-react-native

3.在根目录创建.babelrc
    {
      "plugins": [
        ["import", { "libraryName": "@ant-design/react-native" }]
      ]
    }

4.安装其他依赖
    yarn add @react-native-community/cameraroll @react-native-community/picker @react-native-community/segmented-control @react-native-community/slider @react-native-community/viewpager

5.报错提示安装
    npm install babel-plugin-import --save
   npm install
7.官网地址:
  https://rn.mobile.ant.design/docs/react/introduce-cn

 

posted on 2020-06-29 13:38  刘曙尘  阅读(1615)  评论(0编辑  收藏  举报