Skip to content

Commit

Permalink
fix(taro-swan/taro-tt): 百度和头条 properties 的 value 值设置成对应 defaultProps …
Browse files Browse the repository at this point in the history
…的值,避免 null 值覆盖 initData 值
  • Loading branch information
Chen-jj committed Jan 21, 2019
1 parent ef2309b commit 1c79db3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/taro-swan/src/create-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function bindProperties (weappComponentConf, ComponentClass) {
if (defaultProps.hasOwnProperty(key)) {
weappComponentConf.properties[key] = {
type: null,
value: null
value: defaultProps[key]
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-tt/src/create-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function bindProperties (weappComponentConf, ComponentClass) {
if (defaultProps.hasOwnProperty(key)) {
weappComponentConf.properties[key] = {
type: null,
value: null
value: defaultProps[key]
}
}
}
Expand Down

0 comments on commit 1c79db3

Please sign in to comment.