Methods can prompt undefined when $store.state, calls a method in methods in mounted.

A method in methods is called in mounted in the same component.
but the use of error-free
mounted in methods prompts $store is undefine
as soon as it is called. Excuse me, what"s going on?

Mar.17,2021

should be this.$store.commit ('functionName') triggers methods in vuex
this.functionName calls methods in methods


I don't know if it's a lifecycle problem,
can call

after putting methods in mounted into updated.
Menu