Skip to content

Commit

Permalink
fix(with-weapp): 当第二个参数没有传入时无法监听 props 变化
Browse files Browse the repository at this point in the history
close #3793
  • Loading branch information
yuche committed Jul 12, 2019
1 parent eb7931c commit 61ac83c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/taro-with-weapp/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export default function withWeapp (componentType: string, weappConf?: Object) {
class BaseComponent<_ = {}, S = {}> extends ConnectComponent {
constructor (props) {
super(props)
if (Array.isArray(super._observeProps)) {
this._observeProps = super._observeProps
}
defineGetter(this, 'data', 'state')
if (isComponent) {
defineGetter(this, 'properties', 'props')
Expand Down

0 comments on commit 61ac83c

Please sign in to comment.