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

bb function is overwritten completely if included both in mixin and in component #5

Open
Sporradik opened this issue Jan 12, 2021 · 2 comments

Comments

@Sporradik
Copy link

Sporradik commented Jan 12, 2021

Creating global mixin

Vue.mixin({
	bb() {
		return {
			conditionalFeatures: m.conditionalFeatures
		}
	}
})

Component

export default {
	bb() {
		return {
			customization: m.models.customization,
		}
	}
}

In the component, conditionalFeatures is undefined, but customization is present. If you remove bb from the component, then conditionalFeatures becomes available. If this were to follow vue's standard patterns, the objects would be merged and both properties would be present.

@mikeapr4
Copy link
Owner

thanks @Sporradik, you are right, this configuration isn't currently supported.

I don't know when I'll get time to look into it, but if you feel confident in providing a solution, I'm happy to look over a pull request.

@Sporradik
Copy link
Author

Sporradik commented Jan 20, 2021

Thanks @mikeapr4. Currently we have a workaround, because we can just avoid accessing the object through this and instead access it through the traditional means. So like you i'm not sure if I will be able to prioritize a fix soon, but if I can, I will submit a PR. Thanks for the sweet library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants