mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-24 23:20:49 +08:00
feat: 主页缓存
This commit is contained in:
@@ -107,7 +107,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, onMounted, watch, onActivated, onDeactivated, nextTick } from 'vue'
|
||||
import { ref, onMounted, watch, onActivated, nextTick } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { stripMarkdown } from '../utils/markdown'
|
||||
import { API_BASE_URL } from '../main'
|
||||
@@ -175,12 +175,6 @@ export default {
|
||||
})
|
||||
})
|
||||
|
||||
onDeactivated(() => {
|
||||
if (homePage.value) {
|
||||
savedScrollTop.value = homePage.value.scrollTop
|
||||
}
|
||||
})
|
||||
|
||||
const countComments = (list) =>
|
||||
list.reduce((sum, c) => sum + 1 + countComments(c.replies || []), 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user