2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-05-25 23:44:05 +03:00
Files
vue-meta/examples/vuex/views/Home.vue
T
2016-11-10 15:28:21 +02:00

30 lines
628 B
Vue

<template>
<div>
<h3>This is the homepage</h3>
<h4>There are <u>{{ postsCount }}</u> published posts</h4>
<ul>
<li v-for="post in posts">
<router-link :to="'posts/' + post.slug">{{ post.title }}</router-link>
</li>
</ul>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
name: 'home',
computed: mapGetters({
posts: 'publishedPosts',
postsCount: 'publishedPostsCount'
}),
metaInfo: {
title: 'Home',
meta: [
{ vmid: 'description', name: 'description', content: 'The home page' }
]
}
}
</script>