import { nextTick } from 'vue' import * as elIcons from '@element-plus/icons-vue' /* * 获取element plus 自带的图标 */ export function getElementPlusIconfontNames() { return new Promise((resolve, reject) => { nextTick(() => { const iconfonts = [] const icons = elIcons as any for (const i in icons) { iconfonts.push(`el-icon-${icons[i].name}`) } if (iconfonts.length > 0) { resolve(iconfonts) } else { reject('No ElementPlus Icons') } }) }) }