Update IconPicker.vue

fix: index = -1
This commit is contained in:
Jack LIU
2025-07-22 11:14:39 +08:00
committed by GitHub
parent ac06b7ae70
commit d84f4fc7be

View File

@@ -57,7 +57,8 @@ const icons = [epIcons, antIcons, tIcons]
const iconName = ref(icons[0].prefix)
const currentIconNameIndex = computed(() => {
return icons.findIndex((item) => item.prefix === unref(iconName))
const index = icons.findIndex((item) => item.prefix === unref(iconName))
return index < 0 ? 0 : index
})
const tabChange = () => {