Test.vue 453 B

12345678910111213141516171819202122
  1. <template lang="html">
  2. <div id="block-pagetitle" class="">
  3. <h1>Test Shared Store ( logged in: {{ isloggedin }} )</h1>
  4. <h2 v-if="isloggedin">Shared store is working</h2>
  5. </div>
  6. </template>
  7. <script>
  8. import { mapState, mapActions } from 'vuex'
  9. export default {
  10. computed: {
  11. ...mapState({
  12. token: state => state.User.token,
  13. isloggedin: state => state.User.isloggedin
  14. })
  15. }
  16. }
  17. </script>
  18. <style lang="scss" scoped>
  19. </style>