<template>
  <el-icon v-if="icon.includes('icon')" :class="`iconfont ${icon}`" :size="size" />
  <el-icon v-else :size="size"> <component :is="icon" /></el-icon>
</template>
<script setup name="layout-icon">
defineProps({
  icon: {
    type: String,
    required: true,
  },
  size: {
    type: Number,
    default: 20,
  },
});
</script>
