fix: support pluginPath svg file as component show list when dev mode (#1902)

This commit is contained in:
chenlianghong
2024-10-09 10:30:27 +08:00
committed by GitHub
parent 5d227d8d72
commit 6e38eb1d70
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -31,10 +31,12 @@ const registerIcons = async(app) => {
continue
}
const key = `${pluginName}${iconName}`
const iconComponent = createIconComponent(iconName)
// 开发模式下列出所有 svg 图标,方便开发者直接查找复制使用
import.meta.env.MODE == 'development' && console.log(`svg-icon-component: <${key} />`)
const iconComponent = createIconComponent(key)
config.logs.push({
'key': key,
'label': iconName,
'label': key,
})
app.component(key, iconComponent)
}