article-comment.vue
638 Bytes
<template>
<Layout class="article">
<LayoutHeader theme="white" slot='header'>
{{headerText}}
</LayoutHeader>
<CommentList :dest-id="destId" :column-type="1001" @on-page-change="onPageChange"></CommentList>
</Layout>
</template>
<script>
export default {
name: 'ArticleComment',
data() {
return {
size: 0
};
},
computed: {
destId() {
return parseInt(this.$route.params.articleId, 10);
},
headerText() {
return this.size ? `${this.size}条评论` : '';
}
},
methods: {
onPageChange({size}) {
this.size = size;
}
}
};
</script>
<style>
</style>