You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
658 B
23 lines
658 B
import * as ElementPlusIcons from '@element-plus/icons-vue' |
|
//@ts-ignore |
|
const localIconsName: string[] = [] |
|
|
|
export const LOCAL_ICON_PREFIX = 'local-icon-' |
|
export const EL_ICON_PREFIX = 'el-icon-' |
|
|
|
const elIconsName: string[] = [] |
|
|
|
export function getElementPlusIconNames() { |
|
return elIconsName |
|
} |
|
export function getLocalIconNames() { |
|
return localIconsName |
|
} |
|
|
|
export default defineNuxtPlugin((nuxtApp) => { |
|
for (const [iconName, component] of Object.entries(ElementPlusIcons)) { |
|
const componenName = `${EL_ICON_PREFIX}${iconName}` |
|
elIconsName.push(componenName) |
|
nuxtApp.vueApp.component(componenName, component) |
|
} |
|
})
|
|
|