mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 10:18:42 +08:00 
			
		
		
		
	v3.6.0 增加字典标签样式回显
This commit is contained in:
		
							
								
								
									
										28
									
								
								yudao-ui-admin/src/components/DictTag/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								yudao-ui-admin/src/components/DictTag/index.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| <template> | ||||
|   <div> | ||||
|     <template v-for="(dict, index) in this.getDictDatas2(type, value)"> | ||||
|       <!-- 默认样式 --> | ||||
|       <span v-if="dict.colorType === 'default' || dict.colorType === '' || dict.color === undefined" :key="dict.value" :index="index" | ||||
|             :class="dict.cssClass">{{ dict.label }}</span> | ||||
|       <!-- Tag 样式 --> | ||||
|       <el-tag v-else :key="dict.value" :index="index" :type="dict.colorType" :class="dict.cssClass"> | ||||
|         {{ dict.label }} | ||||
|       </el-tag> | ||||
|     </template> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: "DictTag", | ||||
|   props: { | ||||
|     type: String, | ||||
|     value: [Number, String, Array], | ||||
|   }, | ||||
| }; | ||||
| </script> | ||||
| <style scoped> | ||||
| .el-tag + .el-tag { | ||||
|   margin-left: 10px; | ||||
| } | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV