mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-09-20 20:02:05 +08:00
- 新增 migrate-legacy-icons 脚本,批量将旧图标替换为 legacy-el-icon 组件 - 多个组件中将 <i class="el-icon-*"> 统一改为 <legacy-el-icon name="el-icon-*"> - 将 size="mini"/"medium" 调整为 Element Plus 的 small/default - 新增 legacy-el-icon 全局组件及图标映射逻辑
26 lines
436 B
Vue
26 lines
436 B
Vue
<template>
|
|
<el-icon v-bind="$attrs">
|
|
<component :is="iconComponent" v-if="iconComponent" />
|
|
</el-icon>
|
|
</template>
|
|
|
|
<script>
|
|
import { resolveLegacyIcon } from "@/core/legacy-icon-map";
|
|
|
|
export default {
|
|
name: "LegacyElIcon",
|
|
inheritAttrs: false,
|
|
props: {
|
|
name: {
|
|
type: String,
|
|
default: "",
|
|
},
|
|
},
|
|
computed: {
|
|
iconComponent() {
|
|
return resolveLegacyIcon(this.name);
|
|
},
|
|
},
|
|
};
|
|
</script>
|