fix: render dict
							parent
							
								
									3ed4174aad
								
							
						
					
					
						commit
						30065de533
					
				|  | @ -51,7 +51,7 @@ export default defineComponent({ | ||||||
|         return null |         return null | ||||||
|       } |       } | ||||||
|       // 解决自定义字典标签值为零时标签不渲染的问题 |       // 解决自定义字典标签值为零时标签不渲染的问题 | ||||||
|       if (props.value === undefined) { |       if (props.value === undefined && props.value !== null) { | ||||||
|         return null |         return null | ||||||
|       } |       } | ||||||
|       getDictObj(props.type, props.value.toString()) |       getDictObj(props.type, props.value.toString()) | ||||||
|  |  | ||||||
|  | @ -94,7 +94,7 @@ export const useRender = { | ||||||
|    */ |    */ | ||||||
|   renderDict: (text, type, dictType?) => { |   renderDict: (text, type, dictType?) => { | ||||||
|     if (type) { |     if (type) { | ||||||
|       return h(DictTag, { type: type, value: text || '', dictType: dictType || 'number' }) |       return h(DictTag, { type: type, value: text !== null ? text : '', dictType: dictType || 'number' }) | ||||||
|     } |     } | ||||||
|     return '' |     return '' | ||||||
|   }, |   }, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 xingyu
						xingyu