1\安装antd-mobile-rn 库

npm install antd-mobile-rn --save

2、按需加载

npm install babel-plugin-import --save-dev

3、修改.babelrc配置如下

{
  "presets": [
    "react-native"
  ],
  "plugins": [
    [
      "import",
      {
        "libraryName": "antd-mobile-rn"
      }
    ]
  ]
}

4、引入组件

import { Button } from 'antd-mobile-rn';

5、使用组件

<Button>6</Button>

  

相关文章:

  • 2022-12-23
  • 2021-08-10
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2021-07-10
猜你喜欢
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-09-21
  • 2022-12-23
  • 2021-06-05
  • 2021-11-11
相关资源
相似解决方案