修复Icon缺失报错的问题
This commit is contained in:
		
							parent
							
								
									9a1b7b5a52
								
							
						
					
					
						commit
						e20d7d5135
					
				| @ -1,12 +1,13 @@ | ||||
| <template> | ||||
|   <el-icon v-if="icon.includes('icon')" :class="`iconfont ${icon}`" :size="size" /> | ||||
|   <el-icon v-if="!icon" :size="size" /> | ||||
|   <el-icon v-else-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, | ||||
|     default: '', | ||||
|   }, | ||||
|   size: { | ||||
|     type: Number, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user