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

Fix mp loader data conflict #1127

Merged
merged 3 commits into from
Jul 9, 2019
Merged

Fix mp loader data conflict #1127

merged 3 commits into from
Jul 9, 2019

Conversation

wssgcg1213
Copy link
Collaborator

@wssgcg1213 wssgcg1213 commented Jul 9, 2019

原先用了 data 这个作用域名与 props 中的 data 会有冲突, 即:

<Component data=“{{foo}}” />

In Component:

<view>{{data}}</view>

original:

function render(data) {
  return (createElement(‘view’, null, [data]));
}

PS: 入参 data = { …this.data, …this.props };

after:

function render(__data__) {
  var data = __data__.data;
  return (createElement(‘view’, null, [data]));
}

@wssgcg1213 wssgcg1213 requested a review from SoloJiang July 9, 2019 05:10
@wssgcg1213
Copy link
Collaborator Author

大部分修改是 测试用例的 snapshot, 过滤看源码部分变更就可以了

Copy link
Collaborator

@SoloJiang SoloJiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@wssgcg1213 wssgcg1213 merged commit a9efb55 into master Jul 9, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix-mp-loader-data-conflict branch July 9, 2019 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants