Answer the question
In order to leave comments, you need to log in
Vue typescript mixins() vuex.getter breaks $styles?
https://github.com/vuejs/vue-class-component/issues/566
'use strict';
import {Component, Vue} from 'vue-property-decorator';
import {Getter, namespace} from 'vuex-class';
import {AUTH} from '@/store';
import {IAuthenticate} from '@/store/module/common/auth/actions';
import {IAuth} from '@/store/module/common/auth/state';
const moduleAuth = namespace(AUTH);
@Component
export default class AuthenticationMixin extends Vue implements IAuth {
// @namespace(AUTH).Getter
// @Getter('roles', { namespace: AUTH })
@moduleAuth.Getter
isAuthenticating!: boolean;
authenticateAnon!: () => Promise<any>;
}
export default class Menu extends mixins(LoadingModalScreenMixin, AuthenticationMixin) {
[Vue warn]: Error in mounted hook: "TypeError: Cannot read properties of undefined (reading 'test')"
found in
---> <Menu>
<LayoutDefault>
<Root>
mounted(): void {
console.info(this);
console.info(this.$style);
console.info(this.$style['test']);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question