remove pug

This commit is contained in:
polv committed 2020-12-16 01:12:41 +07:00
1 parent e397c9ae1e
commit 68840c9c60
49 files changed
+1421 -806

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
<template>
<p v-if="$fetchState.pending"></p>
<p v-else-if="$fetchState.error">
An error occurred {{ $fetchState.error.message }}
</p>
<p v-else-if="!posts.length">No posts found.</p>
<post-query v-else :posts="posts" :count="count" />
</template>
<script lang="ts">
import { Vue, Component } from 'nuxt-property-decorator'
@Component<BlogPage>({
async fetch() {
const { result, count } = await this.$axios.$get('/api/q', {
params: {
q: this.$route.query.q,
page: this.$route.query.page,
},
})
this.posts = result
this.count = count
},
})
export default class BlogPage extends Vue {
posts: IPostTeaser[] = []
count = 0
}
</script>