feat(icon): findIcon function (#107)

* feat(icon): findIcon function

支持ElementPlus icon组件和 FontAwesomeIcon

* fix(menu): 支持第三方icon组件
This commit is contained in:
hb0730
2021-11-15 16:41:51 +08:00
committed by GitHub
parent 1e1747a355
commit 2d6ad99f6f
3 changed files with 50 additions and 7 deletions

View File

@@ -93,9 +93,10 @@ const components = [
ElDescriptions,
ElDescriptionsItem,
ElBacktop,
ElSwitch,
// icon
ElSwitch
];
// icon
export const iconComponents = [
Check,
Menu,
HomeFilled,
@@ -115,6 +116,7 @@ const components = [
const plugins = [ElLoading];
export function useElementPlus(app: App) {
components.push(...iconComponents);
components.forEach((component: Component) => {
app.component(component.name, component);
});