Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // in mixin.js
- export default {
- methods: {
- getName: function () {
- return this.$store.getters['myStore/getName'];
- }
- }
- }
- // im myComponent.vue
- <template>
- <h1>{this.getName()}</h1>
- <template>
- <script>
- import myMixin from './mixin.js
- export default {
- mixins: [myMixin]
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement