use a table to display the data
This commit is contained in:
		
							parent
							
								
									8d0a4273fb
								
							
						
					
					
						commit
						7c100f4030
					
				| @ -4,14 +4,24 @@ | |||||||
|       <n-input v-model:value="raw_jwt" type="textarea" placeholder="Put your token here..." rows="5" /> |       <n-input v-model:value="raw_jwt" type="textarea" placeholder="Put your token here..." rows="5" /> | ||||||
|     </n-form-item> |     </n-form-item> | ||||||
| 
 | 
 | ||||||
|     <p>Header</p> |     <n-table> | ||||||
|     <ul> |       <tbody> | ||||||
|       <li v-for="(value, key) in decodedJWT.header" :key="key">{{ key }}: {{ value }}</li> |         <td colspan="2" class="table-header"><b>Header</b></td> | ||||||
|     </ul> |         <tr v-for="(value, key) in decodedJWT.header" :key="key"> | ||||||
|     <p>Payload</p> |           <td> | ||||||
|     <ul> |             <i>{{ key }}</i> | ||||||
|       <li v-for="(value, key) in decodedJWT.payload" :key="key">{{ key }}: {{ value }}</li> |           </td> | ||||||
|     </ul> |           <td>{{ value }}</td> | ||||||
|  |         </tr> | ||||||
|  |         <td colspan="2" class="table-header"><b>Payload</b></td> | ||||||
|  |         <tr v-for="(value, key) in decodedJWT.payload" :key="key"> | ||||||
|  |           <td> | ||||||
|  |             <i>{{ key }}</i> | ||||||
|  |           </td> | ||||||
|  |           <td>{{ value }}</td> | ||||||
|  |         </tr> | ||||||
|  |       </tbody> | ||||||
|  |     </n-table> | ||||||
|   </n-card> |   </n-card> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
| @ -39,4 +49,8 @@ const validation = useValidation({ | |||||||
| }); | }); | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <style lang="less" scoped></style> | <style lang="less" scoped> | ||||||
|  | .table-header { | ||||||
|  |   text-align: center; | ||||||
|  | } | ||||||
|  | </style> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user