vuepress-theme-reco/components/NoteAbstract.vue

33 lines
720 B
Vue
Raw Normal View History

2019-04-15 10:35:40 +08:00
<template>
<div class="abstract-wrapper">
<NoteAbstractItem
2019-11-13 15:55:16 +08:00
v-for="(item) in currentPageData"
:key="item.path"
:item="item"
:currentPage="currentPage"
:currentTag="currentTag"
:hideAccessNumber="true" />
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', 'hideAccessNumber'],
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>