三列排版
This commit is contained in:
tangly1024
2021-12-20 15:39:05 +08:00
parent 44121bf50b
commit 44df05243c
20 changed files with 230 additions and 136 deletions

View File

@@ -6,7 +6,7 @@
* @param tagOptions tags的下拉选项
* @returns {Promise<{}|*[]>}
*/
export async function getAllTags ({ allPosts, sliceCount = 12, tagOptions }) {
export async function getAllTags ({ allPosts, sliceCount = 16, tagOptions }) {
if (!allPosts) {
return []
}
@@ -31,7 +31,7 @@ export async function getAllTags ({ allPosts, sliceCount = 12, tagOptions }) {
})
list.sort((a, b) => b.count - a.count)
if (sliceCount && sliceCount > 0) {
return list.slice(0, 12)
return list.slice(0, sliceCount)
} else {
return list
}