Skip to content

Commit

Permalink
chore: merge 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Dec 20, 2019
2 parents e602a0c + 96a65e3 commit 05afa1b
Show file tree
Hide file tree
Showing 35 changed files with 723 additions and 110 deletions.
6 changes: 3 additions & 3 deletions docs/before-dev-remind.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ v1.2.22 已支持引入原生的 SDK。
Pay.js 文件,这是 Test 组件默认的形式,编译到微信小程序、百度小程序和 H5 三端之外的端使用的版本

```
test.h5.js 文件,这是 Pay 组件的 H5 版本
pay.h5.js 文件,这是 Pay 组件的 H5 版本
test.weapp.js 文件,这是 Pay 组件的 微信小程序 版本
pay.weapp.js 文件,这是 Pay 组件的 微信小程序 版本
test.rn.js 文件,这是 Pay 组件的 RN 版本
pay.rn.js 文件,这是 Pay 组件的 RN 版本
```

### 其他注意事项
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-alipay/src/create-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ function createComponent (ComponentClass, isPage) {
if (componentInstance[fn] && typeof componentInstance[fn] === 'function') {
weappComponentConf[fn] = function () {
const component = this.$component
if (component[fn] && typeof component[fn] === 'function') {
if (component && component[fn] && typeof component[fn] === 'function') {
return component[fn](...arguments)
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/taro-alipay/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
internal_get_original,
interceptors,
RefsArray,
handleLoopRef,
useEffect,
useLayoutEffect,
useReducer,
Expand Down Expand Up @@ -64,7 +65,7 @@ export const Taro = {
internal_get_original,
interceptors,
RefsArray,
getElementById,
handleLoopRef: handleLoopRef(getElementById),
genCompid,
useEffect,
useLayoutEffect,
Expand Down
2 changes: 2 additions & 0 deletions packages/taro-alipay/src/lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ function doUpdate (component, prevProps, prevState) {

if (component['$$hasLoopRef']) {
Current.current = component
Current.index = 0
component._disableEffect = true
component._createData(component.state, component.props, true)
component._disableEffect = false
Expand All @@ -217,6 +218,7 @@ function doUpdate (component, prevProps, prevState) {
} else if (component.$componentType === 'PAGE' && component['$$hasLoopRef']) {
// 解决初始化时 onLoad 最先触发,但拿不到子组件 ref 的问题
Current.current = component
Current.index = 0
component._disableEffect = true
component._createData(component.state, component.props, true)
component._disableEffect = false
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"fs-extra": "^5.0.0",
"generic-names": "^2.0.1",
"glob": "^7.1.2",
"inquirer": "^5.2.0",
"inquirer": "^7.0.0",
"joi": "^14.0.6",
"klaw": "^3.0.0",
"latest-version": "^4.0.0",
Expand All @@ -96,7 +96,7 @@
"ora": "^2.0.0",
"postcss": "^6.0.22",
"postcss-modules-extract-imports": "^1.1.0",
"postcss-modules-local-by-default": "^1.2.0",
"postcss-modules-local-by-default": "^3.0.2",
"postcss-modules-resolve-imports": "^1.3.0",
"postcss-modules-scope": "^1.1.0",
"postcss-modules-values": "^1.3.0",
Expand Down
Loading

0 comments on commit 05afa1b

Please sign in to comment.