wuzhen 20250723提交
This commit is contained in:
1 parent
609371ed82
commit
cc03e81f49
117 files changed
+76654
-1889
No files matched your search
+12
-18
@@ -1,20 +1,14 @@
|
||||
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
|
||||
import { App } from 'vue';
|
||||
import { App } from 'vue'
|
||||
import * as ElementPlusIconsVue from '@element-plus/icons-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);
|
||||
}
|
||||
export default function registerIcons(app: App) {
|
||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||
app.component(key, component)
|
||||
}
|
||||
};
|
||||
|
||||
// 移除重复的Close组件注册
|
||||
// app.component('Close', ElementPlusIconsVue.Close);
|
||||
|
||||
// 注册常用图标的别名
|
||||
app.component('CircleCloseIcon', ElementPlusIconsVue.CircleClose);
|
||||
}
|
||||
Reference in new issue
Block a user