mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
perf(theme): optimize internal link
This commit is contained in:
parent
27b6f70b91
commit
811f7f4361
@ -12,7 +12,7 @@ const { archives } = useArchives()
|
||||
|
||||
<h2 class="archives-title">
|
||||
<span class="vpi-archive icon" />
|
||||
<span>{{ archiveLink.text }}</span>
|
||||
<span>{{ archiveLink?.text ?? 'Archives' }}</span>
|
||||
</h2>
|
||||
<div v-if="archives.length" class="archives">
|
||||
<template v-for="archive in archives" :key="archive.label">
|
||||
|
||||
@ -12,7 +12,7 @@ const { categories } = useBlogCategory()
|
||||
|
||||
<h2 class="categories-title">
|
||||
<span class="vpi-category icon" />
|
||||
<span>{{ categoriesLink.text }}</span>
|
||||
<span>{{ categoriesLink?.text ?? 'Categories' }}</span>
|
||||
</h2>
|
||||
|
||||
<slot name="blog-categories-content-before" />
|
||||
|
||||
@ -13,7 +13,7 @@ const { tags, currentTag, postList, handleTagClick } = useTags()
|
||||
<div class="tags-nav">
|
||||
<h2 class="tags-title">
|
||||
<span class="vpi-tag icon" />
|
||||
<span>{{ tagsLink.text }}</span>
|
||||
<span>{{ tagsLink?.text ?? 'Tags' }}</span>
|
||||
</h2>
|
||||
<slot name="blog-tags-title-after" />
|
||||
<div class="tags">
|
||||
|
||||
@ -20,20 +20,20 @@ export function useBlogExtract() {
|
||||
)
|
||||
|
||||
const tags = computed(() => ({
|
||||
link: links.tags.value.link,
|
||||
text: links.tags.value.text,
|
||||
link: links.tags.value?.link,
|
||||
text: links.tags.value?.text,
|
||||
total: tagsList.value.length,
|
||||
}))
|
||||
|
||||
const archives = computed(() => ({
|
||||
link: links.archive.value.link,
|
||||
text: links.archive.value.text,
|
||||
link: links.archive.value?.link,
|
||||
text: links.archive.value?.text,
|
||||
total: postList.value.length,
|
||||
}))
|
||||
|
||||
const categories = computed(() => ({
|
||||
link: links.categories.value.link,
|
||||
text: links.categories.value.text,
|
||||
link: links.categories.value?.link,
|
||||
text: links.categories.value?.text,
|
||||
total: getCategoriesTotal(categoryList.value),
|
||||
}))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user