优化IconPicker组件,修复一些图标库图标显示不全的问题

This commit is contained in:
jingrow 2025-10-11 16:11:15 +08:00
parent 7b5c4ca398
commit 9fecbf87cd

View File

@ -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)