REST login/logout is working
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<template lang="html">
|
||||
<UserTools v-if="token" />
|
||||
<Login v-else />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapActions } from 'vuex'
|
||||
|
||||
import Login from 'vuejs/components/User/Login'
|
||||
import UserTools from 'vuejs/components/User/UserTools'
|
||||
|
||||
export default {
|
||||
// data () {
|
||||
// return {}
|
||||
// },
|
||||
computed: {
|
||||
...mapState({
|
||||
token: state => state.User.token
|
||||
})
|
||||
},
|
||||
components: {
|
||||
Login,
|
||||
UserTools
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user