23 lines
427 B
Vue
23 lines
427 B
Vue
<template>
|
|
<post-query :posts="posts" :count="count" />
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { Vue, Component } from 'nuxt-property-decorator'
|
|
|
|
@Component<BlogPage>({
|
|
async asyncData({ $axios }) {
|
|
const { result, count } = (await $axios.$get('/api/q')) || {}
|
|
|
|
return {
|
|
posts: result,
|
|
count,
|
|
}
|
|
},
|
|
})
|
|
export default class BlogPage extends Vue {
|
|
posts: IPostTeaser[] = []
|
|
count = 0
|
|
}
|
|
</script>
|