Skip to content

Commit dc65e62

Browse files
author
reco_luan
committed
refactor: cancel sync loading of article list
1 parent 4a58744 commit dc65e62

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

components/NoteAbstract.vue

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
<template>
22
<div class="abstract-wrapper">
3-
<div v-if="listLoadType === 'sync'" key="sync">
4-
<NoteAbstractItem
5-
v-for="(item, index) in data"
6-
:key="item.path"
7-
:item="item"
8-
:currentPage="currentPage"
9-
:currentTag="currentTag"
10-
v-show="index >= (currentPage * 10 - 10) && index < currentPage * 10"/>
11-
</div>
12-
<div v-else-if="listLoadType === 'async'" key="async">
13-
<NoteAbstractItem
3+
<NoteAbstractItem
144
v-for="(item) in currentPageData"
155
:key="item.path"
166
:item="item"
177
:currentPage="currentPage"
188
:currentTag="currentTag"
199
:hideAccessNumber="true" />
20-
</div>
2110
</div>
2211
</template>
2312

@@ -28,15 +17,6 @@ export default {
2817
components: { NoteAbstractItem },
2918
props: ['data', 'currentPage', 'currentTag', 'hideAccessNumber'],
3019
computed: {
31-
listLoadType () {
32-
const valineConfig = this.$themeConfig.valineConfig
33-
if (this.$frontmatter.home) return 'async'
34-
if (valineConfig && !valineConfig.hideListAccessNumber) {
35-
return 'sync'
36-
} else {
37-
return 'async'
38-
}
39-
},
4020
currentPageData () {
4121
const start = this.currentPage * 10 - 10
4222
const end = this.currentPage * 10

0 commit comments

Comments
 (0)