+Vuex +ElementUI +Pug
- Log on now works, storing user profile in vuex state - Templates in Pug = awesome
This commit is contained in:
@@ -1,21 +1,23 @@
|
||||
<template>
|
||||
<article>
|
||||
<page-title title="Your Dashboard" />
|
||||
<p>here you are! {{ JSON.stringify(this.user) }}</p>
|
||||
</article>
|
||||
<template lang="pug">
|
||||
article
|
||||
page-title(:title="title")
|
||||
p here you are!
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import PageTitle from './PageTitle'
|
||||
|
||||
export default {
|
||||
name: 'dashboard',
|
||||
props: ['user'],
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
components: {
|
||||
PageTitle
|
||||
},
|
||||
computed: {
|
||||
title () {
|
||||
return `${this.user.given_name}'s Dashboard`
|
||||
},
|
||||
...mapState(['user'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user