2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-08 22:12:26 +03:00
Files
vue-meta/examples/vuex/views/Home.vue
T
2016-11-08 12:39:14 +02:00

27 lines
526 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'
}
}
</script>