2020-08-02 19:22:39 +08:00
|
|
|
<template>
|
|
|
|
<el-row>
|
2022-07-25 06:45:33 +08:00
|
|
|
<el-col v-for="article in articles.list" :key="article.idArticle">
|
2020-08-02 19:22:39 +08:00
|
|
|
<el-col>
|
2020-08-12 11:28:37 +08:00
|
|
|
<el-link rel="nofollow" @click="onRouter(article.articleLink)" :underline="false">
|
2020-08-02 19:22:39 +08:00
|
|
|
<h2 v-html="article.articleTitle"></h2>
|
|
|
|
</el-link>
|
|
|
|
</el-col>
|
|
|
|
<el-col>
|
|
|
|
<small class="d-block text-muted">{{ article.timeAgo }}</small>
|
|
|
|
</el-col>
|
|
|
|
<el-col>
|
|
|
|
<el-divider></el-divider>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
2022-07-25 06:45:33 +08:00
|
|
|
<el-col v-if="articles.list.length == 0" class="text-center">
|
2020-08-02 19:22:39 +08:00
|
|
|
<span class="text-default">这里什么也没有!</span>
|
|
|
|
</el-col>
|
|
|
|
<el-col>
|
|
|
|
<div class="vertical-container text-center">
|
2022-07-25 06:45:33 +08:00
|
|
|
<el-pagination :hide-on-single-page="true"
|
2020-08-02 19:22:39 +08:00
|
|
|
layout="prev, pager, next"
|
2022-07-25 06:45:33 +08:00
|
|
|
:current-page="articles.pageNum"
|
|
|
|
:total="articles.total"
|
2020-08-02 19:22:39 +08:00
|
|
|
@current-change="currentChange">
|
|
|
|
</el-pagination>
|
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: "DraftList",
|
|
|
|
props: {
|
|
|
|
articles: {
|
|
|
|
type: Object
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
currentChange(page) {
|
|
|
|
},
|
|
|
|
onRouter(url) {
|
|
|
|
this.$router.push({
|
|
|
|
path: url
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
</style>
|