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

In @Mutation, how to call another Mutation, this.xxx is undefined #405

Open
chenp1204 opened this issue Apr 8, 2022 · 1 comment
Open

Comments

@chenp1204
Copy link

chenp1204 commented Apr 8, 2022

My environment
vue 2.6.13
vuex 3.6.0
vuex-module-decorators 2.0.0

Hi, @championswimmer ,

@Module({ dynamic: true, namespaced: true, name: 'editor', store, }) class EditorModule extends VuexModule { }

image

i want to call another Mutation in a Mutation, but this.deleteComponent and this.addComponent is undefined,
i found this only has properties but no Mutation functions
and this.context also undefined

@championswimmer
Copy link
Owner

You should not need to call one mutation from other as you have this. available directly to you.

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

No branches or pull requests

2 participants