🎨 规范Home.vue,About.vue

master
linhaojun 3 years ago
parent 3c0015fcb2
commit 5510dd56a4

@ -85,12 +85,10 @@ export default defineComponent({
size: 7
})
const fetchData = async () => {
onMounted(() => {
fetchComments()
fetchAbout()
}
onMounted(fetchData)
})
onBeforeUnmount(() => {
commonStore.resetHeaderImage()

@ -127,15 +127,13 @@ export default defineComponent({
let nowCategoryId = 0
let md = require('markdown-it')()
const fetchData = () => {
onMounted(() => {
fetchTopAndFeatured()
fetchCategories()
fetchArticles()
const articleListEl = document.getElementById('article-list')
articleOffset.value = articleListEl && articleListEl instanceof HTMLElement ? articleListEl.offsetTop + 120 : 0
}
onMounted(fetchData)
})
const fetchTopAndFeatured = () => {
api.getTopAndFeaturedArticles().then(({ data }) => {

Loading…
Cancel
Save