自己测试的项目,有上拉加载与下拉刷新
- 安装node
- 安装taro-cli
npm install -g @tarojs/cli
- update
taro update self
taro update project
用于主模块基础文件生成
cd {proj}
pages模版快速生成
npm run tep '文件名'
- clone项目
- 使用npm或者taro 编译
- 使用对应的开发工具(如:微信开发者工具),选择编译后的dist文件夹进行预览;或者直接预览(如:H5)
# npm script
$ npm run dev:weapp
$ npm run build:weapp
# 仅限全局安装
$ taro build --type weapp --watch
$ taro build --type weapp
# npm script
$ npm run dev:h5
# 仅限全局安装
$ taro build --type h5 --watch
# npm script
$ npm run dev:alipay
$ npm run build:alipay
# 仅限全局安装
$ taro build --type alipay --watch
$ taro build --type alipay
# npm script
$ npm run dev:rn
# 仅限全局安装
$ taro build --type rn --watch
- taro-ui@2.0.1 不兼容问题,需要还原旧版: cnpm install taro-ui@1.5.4