fix(device-information): handle of unknown values
This commit is contained in:
		
							parent
							
								
									138149e6f0
								
							
						
					
					
						commit
						4f599b6999
					
				| @ -1,16 +1,17 @@ | |||||||
| <template> | <template> | ||||||
|   <n-card v-for="{ name, information } in sections" :key="name" :title="name"> |   <n-card v-for="{ name, information } in sections" :key="name" :title="name"> | ||||||
|     <n-grid cols="1 400:2" x-gap="12" y-gap="12"> |     <n-grid cols="1 400:2" x-gap="12" y-gap="12"> | ||||||
|       <n-gi v-for="{ label, value } in information" :key="label" class="information"> |       <n-gi v-for="{ label, value: { value } } in information" :key="label" class="information"> | ||||||
|         <n-card :bordered="false" embedded> |         <n-card :bordered="false" embedded> | ||||||
|           <div class="label"> |           <div class="label"> | ||||||
|             {{ label }} |             {{ label }} | ||||||
|           </div> |           </div> | ||||||
| 
 | 
 | ||||||
|           <div class="value"> |           <div class="value"> | ||||||
|             <n-ellipsis> |             <n-ellipsis v-if="value"> | ||||||
|               {{ value.value }} |               {{ value }} | ||||||
|             </n-ellipsis> |             </n-ellipsis> | ||||||
|  |             <div v-else class="undefined-value">unknown</div> | ||||||
|           </div> |           </div> | ||||||
|         </n-card> |         </n-card> | ||||||
|       </n-gi> |       </n-gi> | ||||||
| @ -90,5 +91,9 @@ const sections = [ | |||||||
|     font-size: 20px; |     font-size: 20px; | ||||||
|     font-weight: 400; |     font-weight: 400; | ||||||
|   } |   } | ||||||
|  | 
 | ||||||
|  |   .undefined-value { | ||||||
|  |     opacity: 0.8; | ||||||
|  |   } | ||||||
| } | } | ||||||
| </style> | </style> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user