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(runtime-core): only update existing props #5530

Closed
wants to merge 1 commit into from

Conversation

edison1105
Copy link
Member

close #5520

@netlify
Copy link

netlify bot commented Mar 6, 2022

✔️ Deploy Preview for vuejs-coverage ready!

🔨 Explore the source changes: aa76515

🔍 Inspect the deploy log: https://app.netlify.com/sites/vuejs-coverage/deploys/6224a375bf71a000089cfac5

😎 Browse the preview: https://deploy-preview-5530--vuejs-coverage.netlify.app

@netlify
Copy link

netlify bot commented Mar 6, 2022

✔️ Deploy Preview for vue-sfc-playground ready!

🔨 Explore the source changes: aa76515

🔍 Inspect the deploy log: https://app.netlify.com/sites/vue-sfc-playground/deploys/6224a3755c84030007703e93

😎 Browse the preview: https://deploy-preview-5530--vue-sfc-playground.netlify.app/

@netlify
Copy link

netlify bot commented Mar 6, 2022

✔️ Deploy Preview for vue-next-template-explorer ready!

🔨 Explore the source changes: aa76515

🔍 Inspect the deploy log: https://app.netlify.com/sites/vue-next-template-explorer/deploys/6224a37504d64500086a8033

😎 Browse the preview: https://deploy-preview-5530--vue-next-template-explorer.netlify.app

@edison1105 edison1105 changed the title fix(runtime-core): improve update props fix(runtime-core): only update existing props Mar 6, 2022
@ygj6
Copy link
Member

ygj6 commented Mar 7, 2022

Look at #5517.

@edison1105
Copy link
Member Author

Look at #5517.

Oh~ I didnot see that one.😅

@iwusong
Copy link
Contributor

iwusong commented Mar 7, 2022

你这个有一些问题
image
增加 && hasOwn(options, (camelizedKey = camelize(key))) 的条件后 ,下面的

  if (hasOwn(attrs, key)) {
            if (value !== attrs[key]) {
              attrs[key] = value
              hasAttrsChanged = true
            }

似乎永远也执行不到.
而且事件监听都会在else中被添加的attrs,即使在组件中的emits options中声明也无效

@edison1105 edison1105 closed this Mar 8, 2022
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.

event listener as dynamicProp is added erroneously to instance's props
3 participants