Answer the question
In order to leave comments, you need to log in
VuexModule class private field?
export default class LayoutDefault extends Vue {
@user.State
public name!: string // test
@user.Getter
public nameUpperCase!: string // test
@Module({namespaced: true})
export default class User extends VuexModule {
private name: string = 'test';
public get nameUpperCase(): string {
return this.name
Answer the question
In order to leave comments, you need to log in
private guarantees you only that you cannot use it directly in the code. What is heaped up there through decorators and reflection is no longer controlled.
Even more so in a template.
Perhaps when the real hello class properties from es2020 arrive, it will be what you want. But by that time there will already be vue 3 where the classes were abandoned.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question