update at 2026-02-07 14:47:38

This commit is contained in:
douboer
2026-02-07 14:47:38 +08:00
parent 50c20700c0
commit 2034aec6f7
2 changed files with 46 additions and 2 deletions

View File

@@ -48,6 +48,10 @@ function getCategoryFontIds(node: FontTreeNode): string[] {
.map(child => child.fontInfo.id)
}
function getCategoryFontCount(node: FontTreeNode): number {
return getCategoryFontIds(node).length
}
function isCategoryAllInPreview(node: FontTreeNode): boolean {
const ids = getCategoryFontIds(node)
return ids.length > 0 && ids.every(id => fontStore.previewFontIds.has(id))
@@ -101,7 +105,7 @@ function handleCategorySelectAll(node: FontTreeNode, event: Event) {
@click="toggleExpand(node)"
class="text-base font-medium text-black cursor-pointer flex-1 ml-2"
>
{{ node.name }}
{{ node.name }}{{ getCategoryFontCount(node) }}字体
</div>
<div class="flex items-center gap-2 shrink-0 mr-[1px]">