初始化

This commit is contained in:
zg
2026-07-15 16:13:27 +08:00
parent 6d6f559793
commit c4023c1623
276 changed files with 42622 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
/**
* 图标注册表 — 动态图标解析
*
* 因为 unplugin-vue-components 按需导入,模板中 `<component :is="iconName">` 无法通过字符串找到图标。
* 这里导入全部 Element Plus 图标建立字符串→组件映射,供系统配置表、菜单图标等动态渲染场景使用。
*
* 使用场景SystemList、SystemSelectView、MenuList、IntegrationDoc 等动态图标渲染
*/
import * as Icons from '@element-plus/icons-vue'
/**
* 根据图标名称获取图标组件
* @param name - 图标名称(如 "Setting"、"UserFilled"
* @returns 图标组件对象,找不到返回 null
*/
export function getIconComponent(name: string | undefined | null) {
if (!name) return null
return (Icons as Record<string, any>)[name] || null
}
export { Icons }
export default Icons