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

created() not called when using mixins with extends #3415

Closed
ygj6 opened this issue Mar 13, 2021 · 2 comments
Closed

created() not called when using mixins with extends #3415

ygj6 opened this issue Mar 13, 2021 · 2 comments

Comments

@ygj6
Copy link
Member

ygj6 commented Mar 13, 2021

Version

3.0.7

Reproduction link

https://codesandbox.io/s/wonderful-wing-etp2p?file=/src/components/HelloWorld.vue

Steps to reproduce

  1. Open the Sandbox link
  2. Check the console log
    Here is a brief code:
const BaseA = {
  created() {
    console.log("created A");
  },
};

const MixinB = {
  mixins: [BaseA],
  created() {
    console.log("created B");
  },
};

export default {
  name: "HelloWorld",
  props: {
    msg: String,
  },
  extends: MixinB,
};

What is expected?

console output:

created A
created B

What is actually happening?

console output:

created B

function created() not called

@ygj6
Copy link
Member Author

ygj6 commented Mar 13, 2021

This is the same as vue-class-component issue#514
vuejs/vue-class-component#514

@HcySunYang
Copy link
Member

Duplicate of #3038

@HcySunYang HcySunYang marked this as a duplicate of #3038 Mar 13, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants