UserBlock.vue 521 B

1234567891011121314151617181920212223242526272829
  1. <template lang="html">
  2. <UserTools v-if="isloggedin" />
  3. <Login v-bind:title="title" v-bind:form="form" v-else />
  4. </template>
  5. <script>
  6. import { mapState, mapActions } from 'vuex'
  7. import Login from 'vuejs/components/User/Login'
  8. import UserTools from 'vuejs/components/User/UserTools'
  9. export default {
  10. props: ['title', 'form'],
  11. computed: {
  12. ...mapState({
  13. isloggedin: state => state.User.isloggedin
  14. })
  15. },
  16. components: {
  17. Login,
  18. UserTools
  19. }
  20. }
  21. </script>
  22. <style lang="css" scoped>
  23. </style>