项目作者: wuba

项目描述 :
首个 Taro 3 多端统一实例 - 支持 React Native,Weapp,H5。
高级语言: TypeScript
项目地址: git://github.com/wuba/Taro-Mortgage-Calculator.git
创建时间: 2020-12-30T07:22:59Z
项目社区:https://github.com/wuba/Taro-Mortgage-Calculator

开源协议:MIT License

下载


Mortgage-Calculator

Taro 3 - MortgageCalculator

从左到右:React Native、Weapp、H5

基于Taro 3开发的多端(React Native、Weapp、H5)实例

开发React Native, 推荐阅读React Native 端开发流程React Native 端开发前注意

项目介绍

目录结构:

  1. ├── config
  2. ├── global.d.ts
  3. ├── metro.config.js // Taro 3 RN metro 配置文件
  4. ├── package.json
  5. ├── project.config.json
  6. ├── src
  7. ├── app.config.ts
  8. ├── app.rn.scss // 针对RN的单独样式
  9. ├── app.scss
  10. ├── app.ts
  11. ├── assets
  12. ├── components // 封装的一些多端组件
  13. ├── index.html
  14. ├── pages
  15. └── utils
  16. ├── tsconfig.json
  17. └── yarn.lock

此项目旨在为Taro 3开发多端应用提供一个可参考的案例,封装一些支持多端的组件,提供一份开发多端应用的思路、技巧,能够快速上手开发

在线预览

React Native
小程序
H5
安卓:taroDemo.apk
IOS:taroDemo.app(IOS模拟器包)

https://wuba.github.io/Taro-Mortgage-Calculator

使用 Taro Playground 预览

  1. 下载安装 Taro Playground
  2. 本地运行 yarn dev:rn,打印二维码。或者打开releases页面。
  3. 使用 APP 扫描二维码加载 bundle,进行预览。

本地运行

  1. # clone到本地
  2. git clone https://github.com/wuba/Taro-Mortgage-Calculator.git
  3. # 进去项目根目录
  4. cd Taro-Mortgage-Calculator
  5. # 安装依赖
  6. yarn
  7. # 运行RN 默认端口8081
  8. yarn dev:rn
  9. # 运行微信小程序
  10. yarn dev:weapp
  11. # 运行H5
  12. yarn dev:h5

License

MIT