umi-plugin-antd-react-native

umi-plugin-antd-react-native

Usage no npm install needed!

<script type="module">
  import umiPluginAntdReactNative from 'https://cdn.skypack.dev/umi-plugin-antd-react-native';
</script>

README

umi-plugin-antd-react-native

针对@ant-design/react-nativeumi插件。

了解如何使用umi开发 RN 应用,请移步至:umi-react-native

目录

安装

在 RN 工程目录下,使用 yarn 安装umi-plugin-antd-react-native

yarn add umi-plugin-antd-react-native --dev

接下来根据你的 RN 工程所选用的开发工具,安装:

React Native CLI

在 RN 工程目录下,使用 yarn 安装@ant-design/react-native:

yarn add @ant-design/react-native

链接 @ant-design/react-native 字体图标资源文件:

yarn react-native link
# 等价于: ./node_modules/.bin/react-native link

如需使用@ant-design/react-native@4.x请按照:安装 & 使用操作。

expo

在 RN 工程目录下,使用 expo 安装@ant-design/react-nativeexpo-font:

expo install @ant-design/react-native expo-font

使用

umi-plugin-antd-react-native已经为 @ant-design/react-native 做了以下支持:

开发者直接引入想用组件即可。

自定义主题/皮肤

目前已经支持:使用 umi theme 配置覆盖 @ant-design/react-native 的主题

// .umirc.js
export default {
  theme: {
    color_text_base: '#000000',
    modal_zindex: 999,
    // ...
  },
};

TODO:

  1. 支持在运行时动态切换@ant-design/react-native主题/皮肤。

国际化支持

TODO:

  1. 支持通过 umi 配置修改@ant-design/react-native初始默认的语言文件;
  2. 支持在运行时动态切换@ant-design/react-native语言文件;
  3. 支持添加新的@ant-design/react-native语言文件。