| 1234567891011121314151617181920 |
- import * as ElementPlusIconsVue from '@element-plus/icons-vue';
- import { App } from 'vue';
- export default {
- install: (app: App) => {
- for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
- app.component(key, component);
- }
- // 确保Close图标被正确注册(用于Dialog关闭按钮)
- if (ElementPlusIconsVue.Close) {
- app.component('Close', ElementPlusIconsVue.Close);
- }
- // 备用:如果Close不存在,使用CircleClose
- if (ElementPlusIconsVue.CircleClose && !ElementPlusIconsVue.Close) {
- app.component('Close', ElementPlusIconsVue.CircleClose);
- }
- }
- };
|