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

The mixin.created can't work when use both extends and mixins. #3038

Closed
godxiaoji opened this issue Jan 18, 2021 · 0 comments · Fixed by #3040
Closed

The mixin.created can't work when use both extends and mixins. #3038

godxiaoji opened this issue Jan 18, 2021 · 0 comments · Fixed by #3040
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. 🐞 bug Something isn't working

Comments

@godxiaoji
Copy link
Contributor

Version

3.0.5

Reproduction link

https://codesandbox.io/s/cranky-einstein-pfvg9

Steps to reproduce

SFC:

<script>
const myMixin = {
  created() {
    console.log('hello from mixin!')
  }
}

const myExtends = {
  mixins: [myMixin],
  created() {
    console.log('hello from extend!')
  }
}

export default {
  extends: myExtends
}
</script>

What is expected?

Console print out:

hello from mixin!
hello from extends!

What is actually happening?

Console print out:

hello from extends!

Vue2. x is correct.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. 🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants