美文网首页RN
react-native使用蚂蚁金服的antd-mobile组件

react-native使用蚂蚁金服的antd-mobile组件

作者: 既然可以颠覆何必循规蹈矩 | 来源:发表于2017-03-31 15:07 被阅读4673次

有什么问题可以进qq群讨论 131657381

国际惯例,先来展示下这个强大的组建库,常用的大部分组建都可以找到

9A99D507-9505-478F-956C-8F243CFECAF5.png 3D408F99-BCD5-4C3E-905B-0EDAEB58A858.png FFC8CB54-EF30-41AB-AA49-83AE3379C69E.png A52EFACE-86F2-4586-86F5-6644206FDD4D.png

https://mobile.ant.design 这是组件库网站 阿里旗下的

https://github.com/ant-design/ant-design-mobile 这是github网址,里面有源码,源码里面有使用案例,还有ios和android的apk安装包,扫一扫二维码就可以下载安装到手机。

安装步骤

yarn add antd-mobile
yarn add babel-plugin-import

3.在你的项目目录下找到。.babelrc 文件,把括号里面的内容( "plugins": [["import", { "libraryName": "antd-mobile" }]],)配置好

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

使用步骤
1.引入

import { Button } from 'antd-mobile';

2.使用

render() {
    return <Button>Start</Button>;
  }

亲测,超级好用所以分享给大家。。。。。

相关文章

网友评论

本文标题:react-native使用蚂蚁金服的antd-mobile组件

本文链接:https://www.haomeiwen.com/subject/tbxvottx.html