vuepress-theme-reco/components/NoteAbstract.vue

32 lines
657 B
Vue
Raw Normal View History

2019-04-15 10:35:40 +08:00
<template>
<div class="abstract-wrapper">
<NoteAbstractItem
v-for="(item) in currentPageData"
:key="item.path"
:item="item"
:currentPage="currentPage"
:currentTag="currentTag" />
2019-04-15 10:35:40 +08:00
</div>
</template>
<script>
import NoteAbstractItem from './NoteAbstractItem'
2019-04-15 10:35:40 +08:00
export default {
components: { NoteAbstractItem },
props: ['data', 'currentPage', 'currentTag'],
computed: {
currentPageData () {
const start = this.currentPage * 10 - 10
const end = this.currentPage * 10
return this.data.slice(start, end)
}
}
2019-04-15 10:35:40 +08:00
}
</script>
<style lang="stylus" scoped>
.abstract-wrapper
width 100%
</style>