fix(theme): incorrect icon name validation

This commit is contained in:
pengzhanbo 2026-01-19 23:48:35 +08:00
parent f804ba8420
commit 6a41d44322

View File

@ -66,7 +66,9 @@ const rect = computed(() => {
return { width, height: height || width }
})
const binding = computed(() => ({
name: (name as string).replace(/^(iconify|iconfont|fontawesome)\s+/, ''),
name: typeof name === 'string'
? name.replace(/^(iconify|iconfont|fontawesome)\s+/, '')
: name as unknown as string,
color,
size: rect.value,
prefix: __MD_POWER_ICON_PREFIX__ as any,