refactor(main.ts): ♻️ 抽离一些功能为vue插件

This commit is contained in:
cshaptx4869
2024-03-01 21:04:04 +08:00
parent 8c12cfecbe
commit c422c27d94
9 changed files with 114 additions and 77 deletions

9
src/plugins/icons.ts Normal file
View File

@@ -0,0 +1,9 @@
import type { App } from "vue";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
// 注册所有图标
export function setupElIcons(app: App<Element>) {
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component);
}
}