From 9fecbf87cd985fb290d13f4dd70069d1083f88eb Mon Sep 17 00:00:00 2001 From: jingrow Date: Sat, 11 Oct 2025 16:11:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96IconPicker=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=BA=93=E5=9B=BE=E6=A0=87=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/IconPicker.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/src/components/IconPicker.vue b/frontend/src/components/IconPicker.vue index e84fe1c..76a2432 100644 --- a/frontend/src/components/IconPicker.vue +++ b/frontend/src/components/IconPicker.vue @@ -179,6 +179,15 @@ async function loadAllIcons() { if (data && data.uncategorized) { allIcons.value = data.uncategorized.sort() + } else if (data && data.categories) { + // 处理分类结构的图标库(如Carbon Icons) + const allCategoryIcons: string[] = [] + Object.values(data.categories).forEach((categoryIcons: any) => { + if (Array.isArray(categoryIcons)) { + allCategoryIcons.push(...categoryIcons) + } + }) + allIcons.value = allCategoryIcons.sort() } else { // 如果API失败,使用预定义的常用图标列表 allIcons.value = getFallbackIcons(config.prefix)