Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): bump sinon from 6.3.5 to 8.0.2 #5224

Closed
wants to merge 194 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
7730140
chore(deps): bump postcss-modules-local-by-default from 1.2.0 to 3.0.…
dependabot-preview[bot] Dec 11, 2019
ac039e8
fix(components): 修复 Image 组件在 react 环境下报错的问题
luckyadam Dec 12, 2019
1d17269
fix(components): h5 image 删除无关代码 (#4998)
Lostsory Dec 13, 2019
b0ec706
feat: checkout from auto-docs
ZakaryCode Dec 15, 2019
338650a
feat(cli): 尝试接入 webpack 来编译各端小程序
luckyadam May 13, 2019
e5a9fca
feat(cli): 拆分逻辑到 loader
luckyadam May 15, 2019
97cc0e1
feat(cli): 将 app/页面/组件 添加到入口文件进行编译
luckyadam May 23, 2019
36d8ac9
refactor(transformer): 任何情况返回都返回相同的 result
yuche May 28, 2019
5f78126
fix(transformer): 修复测试用例
yuche May 28, 2019
d4b38be
refactor(transformer): isApp 不再是必填参数
yuche May 28, 2019
62f71a5
fix(transformer): 支持直接 import default
yuche May 28, 2019
4771c21
fix(cli): 编译器参数调整
luckyadam May 28, 2019
ed9e755
fix(cli): lerna 加入 taro-mini-runner && 接入 webpack 生成小程序文件
luckyadam May 28, 2019
f08eac9
refactor(transformer): isNormal 变为可选参数
yuche May 29, 2019
3bc5450
fix(cli): 普通文件经过编译器编译必须传入 isNormal
luckyadam May 29, 2019
f209936
feat(cli): 调整文件编译
luckyadam May 29, 2019
8eb3d43
feat(taro-mini-runner): 拆分文件编译成为 plugin
luckyadam Jun 4, 2019
1041ffe
feat(taro-mini-runner): 引入拆分的公共 chunks
luckyadam Jun 4, 2019
15dede3
feat(taro-mini-runner): 生成页面以及组件的 usingComponents 配置
luckyadam Jun 4, 2019
9029d25
feat(taro-mini-runner): 生成多端类型文件
luckyadam Jun 5, 2019
65c699d
feat(taro-mini-runner): 优化文件生成
luckyadam Jun 5, 2019
302e878
feat(taro-mini-runner): 如果是组件需要补充 component:true 配置
luckyadam Jun 5, 2019
18bc2bc
fix(cli): 支持引用 node_modules 中组件
luckyadam Jun 14, 2019
2ea3205
feat(mini-runner): 增加 Taro 模块专有处理插件
luckyadam Jun 17, 2019
413f9f7
feat(cli): 增加 tapable 包
luckyadam Jun 17, 2019
1a5a903
fix(cli): 修复代码合并的问题
luckyadam Jun 17, 2019
f012d26
fix(transformer): 修复错误类型
yuche Jun 17, 2019
b77f00a
feat(cli): 借助 tapable 改造
luckyadam Jun 17, 2019
13ab8b0
feat(cli): cli 支持事件 && 小程序编译配置向 H5 看齐
luckyadam Jun 19, 2019
9f19372
fix(cli): 修复目录创建
luckyadam Jun 24, 2019
0b47af5
feat(taro): 调整小程序和 H5 的编译配置
luckyadam Jun 25, 2019
8578d17
feat(taro-cli): 调整 rn 编译配置
luckyadam Jun 25, 2019
6abb72b
feat(mini-runner): 支持分包
luckyadam Jun 26, 2019
975efa2
fix(mini-runner): npm 中文件不会经过 taro 包替换操作
luckyadam Jun 26, 2019
43a129a
feat(mini-runner): 支持编译 tabBar 上引用的资源编译
luckyadam Jun 26, 2019
56369d4
feat(mini-runner): 支持与原生小程序代码混写
luckyadam Jun 26, 2019
c861872
fix(mini-runner): 只有 taro 的包不能经过依赖包名替换
luckyadam Jul 4, 2019
27612a3
fix(mini-runner): 修复引用 npm 中组件间存在依赖时依赖路径解析错误的问题
luckyadam Jul 10, 2019
6e8a4ff
fix(mini-runner): 打包优化,引用自 npm 包中的组件不抽离至 vendors 中
luckyadam Jul 10, 2019
0ee1a7f
chore: merge master
luckyadam Aug 20, 2019
2e13173
fix(taro): 小程序 webpack 编译静态文件路径
luckyadam Aug 26, 2019
48ba4d8
fix(mini-runner): 优化 webpack 编译时样式处理
luckyadam Aug 26, 2019
678ddd4
feat(mini-runner): 加入 watch
luckyadam Aug 27, 2019
aa9f99e
fix(cli): 修复 watch 时文件修改不对的问题
luckyadam Sep 3, 2019
ddf2199
chore: merge master
luckyadam Sep 4, 2019
0d7e5c8
feat(taro): 加入快应用编译支持
luckyadam Sep 5, 2019
d469c84
fix(mini-runner): 提前解析快应用页面
luckyadam Sep 8, 2019
4fd3152
feat(mini-runner): 生成快应用页面及组件
luckyadam Sep 9, 2019
236ebaa
feat(mini-runner): 保证快应用文件生成正确
luckyadam Sep 16, 2019
07134d7
feat(mini-runner): 优化 watch
luckyadam Sep 16, 2019
c84b683
fix(mini-runner): 修复 watch bug
luckyadam Sep 18, 2019
e64e177
chore: merge
luckyadam Sep 18, 2019
de78fe4
fix(jd): 修复合并代码导致的京东小程序的编译问题
luckyadam Sep 18, 2019
cac8473
chore: 修复语法报错问题
luckyadam Sep 18, 2019
7251ea3
fix(mini-runner): 修复普通小程序编译的问题
luckyadam Sep 23, 2019
a58909d
fix(webpack): 修复文件压缩的问题
luckyadam Sep 24, 2019
f80016f
feat(taro): cli 配合 mini-runner 重构 && 支持使用 mini-runner 编译插件
luckyadam Oct 8, 2019
1e8aef1
fix(mini-runner): 修复小程序编译报错
luckyadam Oct 15, 2019
e38ebc7
fix(mini-runner): 支持快应用编译后模板与样式的检测
luckyadam Oct 15, 2019
5019023
fix(mini-runner): 修复对 css modules 的支持
luckyadam Oct 15, 2019
2a26e20
fix: pxtransform disable on quick-app
ZakaryCode Oct 17, 2019
127d6d2
fix(cli): 修复 doctor 对 config 的检测
luckyadam Oct 17, 2019
179be5c
fix(cli): 清理代码
luckyadam Oct 17, 2019
4597d1a
fix(mini-runner): 加上文件编译提示
luckyadam Oct 22, 2019
121ba14
fix(cli): 修复配置文件中读取不到 process.env.TARO_ENV 的问题
luckyadam Oct 22, 2019
3f1aa7d
fix(taro-quickapp): 修复快应用事件绑定异常问题
luckyadam Oct 22, 2019
42eb4c4
fix: position linter for quickapp 1060+
ZakaryCode Oct 22, 2019
55c4bed
chore(taro): 规范类型定义文件命名
Garfield550 Oct 22, 2019
de5dc7b
fix(mini-runner): 修复快应用编译后页面标题展示不正确的问题
luckyadam Oct 22, 2019
5a7638e
fix(taro): 修复快应用下拉刷新问题
luckyadam Oct 22, 2019
d17a8c5
fix(cli): 更新默认模板
luckyadam Oct 23, 2019
e9a25b8
fix(mini-runner): 修复 builder 的 hooks 调用
luckyadam Oct 23, 2019
95bc24d
docs: 更新新的配置文档
luckyadam Oct 23, 2019
77d7aeb
fix(mini-runner): 修复 tabbar 编译及组件 watch 的问题
luckyadam Oct 24, 2019
2796e46
feat: audio context
ZakaryCode Oct 24, 2019
a26c41a
feat: mock for quickapp
ZakaryCode Oct 27, 2019
c263ee6
fix: quickapp api upload from docs
ZakaryCode Oct 28, 2019
7477c76
chore: merge master
luckyadam Oct 28, 2019
ca7bdb7
fix(mini-runner): 修复快应用打包报错的问题
luckyadam Oct 28, 2019
b3b21bf
fix(components-qa): 修复页面 onReachBottom 事件不触发的问题
luckyadam Oct 29, 2019
1c2fa60
fix(quickapp): pull-down-refresh page-scroll
ZakaryCode Oct 31, 2019
dbc27c5
feat: stop trans asset for quickapp
ZakaryCode Oct 31, 2019
0598df6
fix: somethings no need
ZakaryCode Oct 31, 2019
931a208
fix(mini-runner): 移除无用代码
luckyadam Nov 5, 2019
5041342
chore(release): publish v2.0.0-beta.0
luckyadam Nov 5, 2019
f928f51
chore: changelog
luckyadam Nov 5, 2019
325758b
merge
luckyadam Nov 12, 2019
547085b
chore(release): publish v2.0.0-beta.1
luckyadam Nov 13, 2019
2661430
chore: changelog
luckyadam Nov 13, 2019
2e09509
fix(mini-runner): 修复对 alias 的支持
luckyadam Nov 14, 2019
e7dec0a
chore(release): publish v2.0.0-beta.2
luckyadam Nov 14, 2019
3ca1aa2
chore: changelog && docs
luckyadam Nov 14, 2019
cd264dd
fix(taro-cli): update package list 新增 @tarojs/mini-runner,对列表排序
Garfield550 Nov 15, 2019
2a4bd98
docs: 更新异步编程文档
luckyadam Nov 18, 2019
6ccfe83
feat(docs): 更新 2.0 版本使用 async-await 的文档 #4837
Garfield550 Nov 19, 2019
d8898f1
fix(mini-runner): 组件引入支持统一从一个入口文件中引入
luckyadam Nov 19, 2019
174c7b2
fix(mini-runner): 更新编译时提示
luckyadam Nov 19, 2019
ab1a9da
chore(release): publish v2.0.0-beta.3
luckyadam Nov 19, 2019
fa35918
chore: changelog
luckyadam Nov 19, 2019
9647e8a
docs(readme): 增加版本选择提示
Garfield550 Nov 19, 2019
48f3443
chore: 更新 i18n 文件
Garfield550 Nov 19, 2019
a5cbb98
fix(cli): 更新默认模板
luckyadam Nov 21, 2019
71b34eb
fix(template): 更新 Taro 2.0 的模版和下载地址 #4837
Garfield550 Nov 21, 2019
860c3b9
feat(taro-cli): 配置文件分开存放,优化 taro config 输出
Garfield550 Nov 21, 2019
83322ec
feat(components-qa): 增强快应用button组件,增加属性判断及点击变色等 (#4882)
Nov 21, 2019
21c5754
chore(release): publish v2.0.0-beta.4
luckyadam Nov 21, 2019
6531a1f
chore: changelog && docs
luckyadam Nov 21, 2019
955784f
fix(mini-runner): 修复小程序编译时样式中引用静态资源转换为 base64
luckyadam Nov 27, 2019
70dde62
fix(mini-runner): 修复 watch 时文件报错导致无法重新编译的问题,fix #4949
luckyadam Nov 28, 2019
89896a5
docs: 去除已经废除的h5.webpack配置
Littly Nov 28, 2019
6e15d16
fix(cli): 修正快应用依赖项安装命令在windows不兼容问题 (#4954)
Nov 28, 2019
52032dd
fix(mini-runner): 快应用页面路径编译错误
luckyadam Nov 28, 2019
9c336f5
fix(components-qa): 改进 button 动画效果展示,引入 css 属性描述文件 (#4898)
Nov 30, 2019
1f9b8d6
fix修正快应用Manifest配置文件,在windows下json转换时反斜杆‘\\’路径问题 (#4979)
Dec 2, 2019
2c61570
fix(mini-runner): 修正快应用pages中ux文件未正确生成问题 (#4969)
Dec 2, 2019
3649db5
fix(cli): 解决 cli 编译时缺少 @types/react 依赖问题 (#4997)
Dec 3, 2019
e1e979d
fix(mini-runner): 修复 sass 变量失效的问题,close #4893
luckyadam Dec 3, 2019
b0c68cf
fix(mini-runner): 加入 preval 支持
luckyadam Dec 3, 2019
6798787
fix(mini-runner): 修复 windows 下编译后 taro 引用错误的问题
luckyadam Dec 3, 2019
4d4d080
fix(mini-runner): 组件中 $componentPath 路径生成不对
luckyadam Dec 3, 2019
e4616eb
fix(mini-runner): 组件引用支持 import as 语法
luckyadam Dec 3, 2019
eacfd6a
chore(release): publish v2.0.0-beta.5
luckyadam Dec 3, 2019
0dcd247
chore: changelog && docs
luckyadam Dec 3, 2019
98c82da
fix(mini-runner): 修复分包页面丢失的问题
luckyadam Dec 4, 2019
fc20fc4
chore(release): publish v2.0.0-beta.6
luckyadam Dec 4, 2019
b201639
chore: changelog && docs
luckyadam Dec 4, 2019
60bfe5c
fix(taro-webpack-runner): 修复 sassLoaderOption 未定义的问题
Garfield550 Dec 5, 2019
d8e180c
fix(mini-runner): 优化 watch 时文件编译速度
luckyadam Dec 5, 2019
4635bec
fix(mini-runner): 修复页面 hooks config 失效问题
luckyadam Dec 5, 2019
201a991
feat(taro-runner-utils): 添加 @tarojs/runner-utils 包
Garfield550 Dec 5, 2019
765c8de
fix(taro-runner-utils): 优化代码,修复找不到类型定义的问题
Garfield550 Dec 6, 2019
d799097
feat: webpack-runner 和 mini-runner 代码优化
Garfield550 Dec 6, 2019
97a1642
feat(taro-runner-utils): 添加单元测试和优化注释
Garfield550 Dec 6, 2019
7dac473
fix(taro): 增加递归查找中止条件,修正拼写错误 (#5045)
Dec 10, 2019
cca8c72
fix(mini-runner): 增加快应用公共属性的自动更新,优化button动画直接调用 (#5044)
Dec 10, 2019
09dd6b7
fix(mini-runner): 修复包未安装不报错的问题
luckyadam Dec 11, 2019
03967de
fix(mini-runner): 修复引用原生组件报错的问题
luckyadam Dec 11, 2019
9d58a87
fix(mini-runner): 修复引用原生组件编译后样式文件缺失的问题
luckyadam Dec 11, 2019
3d3118e
fix(mini-runner): 暴露 commonChunks 配置以供自定义公共 chunks 生成
luckyadam Dec 11, 2019
86a7372
chore(release): publish v2.0.0-beta.7
luckyadam Dec 11, 2019
24701e6
fix(mini-runner): 修复使用 preval 报错的问题
luckyadam Dec 12, 2019
cd36ca1
fix: for video objectFit
ZakaryCode Dec 12, 2019
d920785
chore(deps-dev): bump enzyme from 3.9.0 to 3.10.0 (#4875)
dependabot-preview[bot] Dec 12, 2019
9685cea
chore(deps-dev): bump babel-preset-jest from 22.4.4 to 25.0.0 (#4623)
dependabot-preview[bot] Dec 12, 2019
54b95f7
chore(release): publish v2.0.0-beta.8
luckyadam Dec 12, 2019
4bfaebb
chore: changelog && docs
luckyadam Dec 12, 2019
debdae6
docs: 更新 readme
luckyadam Dec 12, 2019
4fc3e62
chore(deps): [security] bump mixin-deep from 1.3.1 to 1.3.2 (#5073)
dependabot-preview[bot] Dec 13, 2019
40de9f7
chore(deps): bump ejs from 2.7.1 to 3.0.1 (#5075)
dependabot-preview[bot] Dec 13, 2019
61ee57c
docs: 增加特别鸣谢
luckyadam Dec 13, 2019
a560edb
fix(mini-runner): 修复 defineConstants 小程序表现与 H5 不一致问题 close #5078
Garfield550 Dec 13, 2019
de9ef7d
chore(deps-dev): bump @types/enzyme from 3.9.1 to 3.10.4 (#5082)
dependabot-preview[bot] Dec 14, 2019
80086c8
chore(deps-dev): bump @types/webpack from 4.4.31 to 4.41.0 (#5081)
dependabot-preview[bot] Dec 14, 2019
37af02e
fix: use rimraf instead of rm to fixed Windows build error
Garfield550 Dec 16, 2019
9e40489
chore(deps): bump klaw from 2.1.1 to 3.0.0 (#5097)
dependabot-preview[bot] Dec 17, 2019
3a84775
fix(cli): 2.0.0-beta.8. 编译RN报错 'babel' of undefined close #5093
Pines-Cheng Dec 17, 2019
6ecb39e
chore(deps-dev): bump rollup-plugin-postcss from 1.6.3 to 2.0.3 (#5113)
dependabot-preview[bot] Dec 18, 2019
fd19662
chore(release): publish v2.0.0-beta.9
yuche Dec 18, 2019
4ac67e2
chore: changelog & docs
yuche Dec 18, 2019
c984109
fix(types): add enableFlex to ScrollViewProps (#5142)
SunskyXH Dec 20, 2019
7c042fa
快应用自定义组件调用,进行相对路径转换
Dec 20, 2019
4f848b2
增加Button Loading动画类型选择,默认与原生组件保持一致
Dec 20, 2019
3e849cc
chore(release): publish v2.0.0-beta.10
yuche Dec 20, 2019
ca929a8
chore: changelog & docs
yuche Dec 20, 2019
1a6f314
docs: update readme
luckyadam Dec 22, 2019
03a7672
fix(mini-runner): 编译时需要移除对组件文件的引用
luckyadam Dec 23, 2019
9267765
fix(cli): 插件编译失败,close #5149
luckyadam Dec 23, 2019
769ded0
fix(mini-runner): 修复 watch 时增加组件文件的 bug,close #5140
luckyadam Dec 23, 2019
bf2af74
fix(mini-runner): 编译时移除组件文件引用,遗漏了 npm 包中组件,close #5139
luckyadam Dec 24, 2019
38279ec
fix(taro): update getStorage return typings (#5170)
waiwaic Dec 24, 2019
e703bd6
fix(mini-runner): 降低 babel-plugin-preval 版本以保证使用 async await 时不报错
luckyadam Dec 24, 2019
0760a99
chore(transformer-wx): 缺少 babel-plugin-preval 包
luckyadam Dec 24, 2019
ff7463d
fix(cli): 增加运行提示
luckyadam Dec 24, 2019
def32f5
fix(mini-runner): 修复多端文件引用的问题,close #5175
luckyadam Dec 25, 2019
ab22ee1
chore(release): publish v2.0.0-beta.11
luckyadam Dec 25, 2019
bbd8e64
chore: changelog && docs
luckyadam Dec 25, 2019
8c49f05
chore: 确保文档发布过程中持续输出内容,避免 ci 失败
luckyadam Dec 26, 2019
a0ccc36
fix(mini-runner): 修复静态资源引用的 bug
luckyadam Dec 26, 2019
8c95471
chore(release): publish v2.0.0-beta.12
luckyadam Dec 26, 2019
abbe71a
chore: changelog && docs
luckyadam Dec 26, 2019
f3564ba
docs: 增加Button在快应用doc中属性兼容说明 (#5202)
Dec 27, 2019
e71d8e9
feat(docs):增加windows下基于vscode单步调测配置说明 (#5201)
Dec 27, 2019
85a48d8
chore(deps): [security] bump handlebars from 4.0.11 to 4.5.3 (#5200)
dependabot-preview[bot] Dec 27, 2019
801bb80
fix(mini-runner): 支持自定义 tabBar
luckyadam Dec 30, 2019
8cfd5bb
fix(mini-runner): 修复组件 watch 时改动不生效的问题
luckyadam Dec 30, 2019
b5394c7
fix(mini-runner): 修复 watch 时修改页面导致组件无法及时更新的问题
luckyadam Dec 31, 2019
4455175
chore(release): publish v2.0.0-beta.13
luckyadam Dec 31, 2019
505fe4d
chore: changelog && docs
luckyadam Dec 31, 2019
3a20fe4
feat(h5): chooseImage回调中加入了originalFileObj属性
Littly Dec 31, 2019
23aca91
fix(types): 补充 chooseImage 在 H5 下的类型
Garfield550 Jan 2, 2020
368550d
docs: 更新文档
luckyadam Jan 2, 2020
35ba9c1
fix(mini-runner): 修复生产打包时公共样式无法插入的问题
luckyadam Jan 2, 2020
17b9b31
feat(rn): taro React Native 依赖由 0.55.4 升级到 0.59.9
Pines-Cheng Jan 3, 2020
4311a97
chore(deps-dev): bump sinon from 6.3.5 to 8.0.2
dependabot-preview[bot] Jan 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 140 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

> 👽 Taro['tɑ:roʊ],泰罗·奥特曼,宇宙警备队总教官,实力最强的奥特曼。

## 版本

<h3>当前 2.0 版本处在 beta 测试阶段,可能存在些许问题,若想稳定使用,请安装至 1.3.31 版本</h3>

[1.x 版本文档](https://nervjs.github.io/taro/docs/1.3.29/README.html)

## 简介

**Taro** 是一套遵循 [React](https://reactjs.org/) 语法规范的 **多端开发** 解决方案。现如今市面上端的形态多种多样,Web、React-Native、微信小程序等各种端大行其道,当业务同时在不同的端都要求有所表现的时候,针对不同的端编写多套代码的成本显然非常高,这时只编写一套代码就能适配到多端的能力就显得极为重要。
Expand Down Expand Up @@ -132,9 +138,9 @@ Taro 方案的初心就是为了打造一个多端开发的解决方案。目前

## 特别鸣谢

[![nanjingboy](https://avatars1.githubusercontent.com/u/1390888?s=100&v=4)](https://github.com/nanjingboy/) | [![jsNewbee](https://avatars3.githubusercontent.com/u/20449400?s=100&v=4)](https://github.com/js-newbee/) | [![Qiyu8](https://avatars2.githubusercontent.com/u/15245051?s=100&v=4)](https://github.com/Qiyu8/)
:---:|:---:|:---:
[nanjingboy](https://github.com/nanjingboy/) | [jsNewbee](https://github.com/js-newbee/) | [Qiyu8](https://github.com/Qiyu8/)
[![nanjingboy](https://avatars1.githubusercontent.com/u/1390888?s=100&v=4)](https://github.com/nanjingboy/) | [![jsNewbee](https://avatars3.githubusercontent.com/u/20449400?s=100&v=4)](https://github.com/js-newbee/) | [![Qiyu8](https://avatars2.githubusercontent.com/u/15245051?s=100&v=4)](https://github.com/Qiyu8/) | [![Hanqin](https://avatars3.githubusercontent.com/u/6348297?s=100&v=4)](https://github.com/shenghanqin/)
:---:|:---:|:---:|:---:
[nanjingboy](https://github.com/nanjingboy/) | [jsNewbee](https://github.com/js-newbee/) | [Qiyu8](https://github.com/Qiyu8/)| [Hanqin](https://github.com/shenghanqin/)

## 贡献者们

Expand Down
20 changes: 17 additions & 3 deletions build/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@ const ghPages = require('gh-pages')
const ora = require('ora')
const spinner = ora('Publishing gitbooks...').start()

cp.exec('npm run docs', err => {
if (!err) {
const docs = cp.spawn('npm', ['run', 'docs'])

docs.stdout.on('data', data => {
console.log(data)
})

docs.stderr.on('data', data => {
console.error(data)
})

docs.on('close', code => {
if (code === 0) {
ghPages.publish('./website/build/taro', err => {
if (!err) {
spinner.succeed('Publish successfully.')
Expand All @@ -13,6 +23,10 @@ cp.exec('npm run docs', err => {
}
})
} else {
spinner.fail(err)
spinner.fail(`文档站点编译出错,出错码 ${code}`)
}
})

docs.on('error', error => {
console.log(error)
})
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: Taro 介绍
---

> 这是 Taro 2.x 版本的文档,若要查看 1.x 版本的文档,请[点击这里选择版本](/taro/versions.html)
## 简介

**Taro** 是一套遵循 [React](https://reactjs.org/) 语法规范的 **多端开发** 解决方案。
Expand Down
39 changes: 30 additions & 9 deletions docs/async-await.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,40 @@
title: 异步编程
---

Taro 支持使用 `async functions` 来让开发者获得不错的异步编程体验,开启 `async functions` 支持需要安装包 `@tarojs/async-await`
> Taro 2.x 版本中使用 `async-await` 不再需要 `@tarojs/async-await`。

Taro 支持使用 `async functions` 来让开发者获得不错的异步编程体验,开启 `async functions` 支持需要安装包 `babel-plugin-transform-runtime` 和 `babel-runtime`。

```bash
$ yarn add @tarojs/async-await
# 或者使用 npm
$ npm install --save @tarojs/async-await
$ yarn add babel-plugin-transform-runtime --dev
$ yarn add babel-runtime
```

随后在项目入口文件 `app.js` 中直接 `import` ,就可以开始使用 `async functions` 功能了
随后修改项目 [`babel` 配置](./config-detail.md#babel),增加插件 `babel-plugin-transform-runtime`。

```javascript
// src/app.js
import '@tarojs/async-await'
```js
babel: {
sourceMap: true,
presets: [
[
'env',
{
modules: false
}
]
],
plugins: [
'transform-decorators-legacy',
'transform-class-properties',
'transform-object-rest-spread',
['transform-runtime', {
"helpers": false,
"polyfill": false,
"regenerator": true,
"moduleName": 'babel-runtime'
}]
]
}
```

> 值得注意的事,使用 `@tarojs/async-await` 一定要记得按照[开发前注意](./before-dev-remind.md)中提示的内容进行操作,否则会出现报错
> 值得注意的事,使用 `async functions` 一定要记得按照[开发前注意](./before-dev-remind.md)中提示的内容进行操作,否则会出现报错
22 changes: 11 additions & 11 deletions docs/components/forms/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ sidebar_label: Button

> 属性及支持度

| H5 | ReactNative| 属性名 | 类型 | 默认值 | 说明 |
| :-: | :-: | :- | :- | :- | :- |
| ✔ | ✔ | type | String | default | 按钮的样式类型 |
| ✔ | ✔ | size | String | default | 按钮的大小 px |
| ✔ | ✔ | plain | Boolean | false | 按钮是否镂空,背景色透明 |
| ✔ | ✔ | disabled | Boolean | false | 是否禁用 |
| ✔ | ✔ | loading | Boolean | false | 名称前是否带 loading 图标 |
| ✔ | X (支持 hoverStyle 属性,但框架未支持 hoverClass) | hoverClass | String | button-hover | 指定按钮按下去的样式类。当 hover-class='none' 时,没有点击态效果 |
| ✔ | ✔ | hoverStartTime | Number | 20 | 按住后多久出现点击态,单位毫秒 |
| ✔ | ✔ | hoverStayTime | Number | 70 | 手指松开后点击态保留时间,单位毫秒 |
| X | X | onGetUserInfo | Handler | | 微信小程序open-type='getUserInfo'时,用户点击该按钮,会返回获取到的用户信息,从返回参数的 detail 中获取到的值同 wx.getUserInfo |
| H5 | ReactNative| Quickapp| 属性名 | 类型 | 默认值 | 说明 |
| :-: | :-: | :-: | :- | :- | :- | :- |
| ✔ | ✔ | ✔ | type | String | default | 按钮的样式类型 |
| ✔ | ✔ | ✔ | size | String | default | 按钮的大小 px |
| ✔ | ✔ | ✔ | plain | Boolean | false | 按钮是否镂空,背景色透明 |
| ✔ | ✔ | ✔ | disabled | Boolean | false | 是否禁用 |
| ✔ | ✔ | ✔ | loading | Boolean | false | 名称前是否带 loading 图标 |
| ✔ | X (支持 hoverStyle 属性,但框架未支持 hoverClass) | X(支持 active 伪类状态变化) | hoverClass | String | button-hover | 指定按钮按下去的样式类。当 hover-class='none' 时,没有点击态效果 |
| ✔ | ✔ | X | hoverStartTime | Number | 20 | 按住后多久出现点击态,单位毫秒 |
| ✔ | ✔ | X | hoverStayTime | Number | 70 | 手指松开后点击态保留时间,单位毫秒 |
| X | X | X | onGetUserInfo | Handler | | 微信小程序open-type='getUserInfo'时,用户点击该按钮,会返回获取到的用户信息,从返回参数的 detail 中获取到的值同 wx.getUserInfo |

>其他相关属性请看各小程序官方文档

Expand Down
Loading