38 lines
		
	
	
		
			960 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
		
		
			
		
	
	
			38 lines
		
	
	
		
			960 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
|  | <template> | |||
|  |     <div class="card"> | |||
|  |         <!-- 名下车辆信息展示 --> | |||
|  |         <div class="bg-yellow-100 text-yellow-700 p-4 rounded-lg"> | |||
|  |             <h3 class="text-xl font-semibold">名下车辆</h3> | |||
|  |             <p class="text-sm">此人名下拥有车辆:{{ data?.carNum }} 辆</p> | |||
|  |         </div> | |||
|  | 
 | |||
|  |         <!-- 校验对象展示 --> | |||
|  | 
 | |||
|  |     </div> | |||
|  | </template> | |||
|  | 
 | |||
|  | <script setup> | |||
|  | import { defineProps } from 'vue'; | |||
|  | 
 | |||
|  | // 接收父组件传入的 props
 | |||
|  | const props = defineProps({ | |||
|  |     data: Object, | |||
|  |     params: Object, | |||
|  | }); | |||
|  | 
 | |||
|  | // 脱敏函数:姓名脱敏(保留首位)
 | |||
|  | const maskName = (name) => { | |||
|  |     if (!name) return ''; | |||
|  |     return name.length > 1 ? name[0] + "*".repeat(name.length - 1) : "*"; | |||
|  | }; | |||
|  | 
 | |||
|  | // 脱敏函数:身份证号脱敏(保留前6位和最后4位)
 | |||
|  | const maskIdCard = (idCard) => { | |||
|  |     if (!idCard) return ''; | |||
|  |     return idCard.replace(/^(.{6})(?:\d+)(.{4})$/, "$1****$2"); | |||
|  | }; | |||
|  | </script> | |||
|  | 
 | |||
|  | <style scoped> | |||
|  | /* 自定义样式 */ | |||
|  | </style> |