mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-31 03:22:08 +08:00 
			
		
		
		
	fix(Field): should not trigger validation after blurring readonly input (#9863)
This commit is contained in:
		
							parent
							
								
									35fa1e9a1d
								
							
						
					
					
						commit
						3bd5284812
					
				| @ -352,13 +352,16 @@ export default createComponent({ | |||||||
| 
 | 
 | ||||||
|       // readonly not work in legacy mobile safari
 |       // readonly not work in legacy mobile safari
 | ||||||
|       /* istanbul ignore if */ |       /* istanbul ignore if */ | ||||||
|       const readonly = this.getProp('readonly'); |       if (this.getProp('readonly')) { | ||||||
|       if (readonly) { |  | ||||||
|         this.blur(); |         this.blur(); | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     onBlur(event) { |     onBlur(event) { | ||||||
|  |       if (this.getProp('readonly')) { | ||||||
|  |         return; | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|       this.focused = false; |       this.focused = false; | ||||||
|       this.updateValue(this.value, 'onBlur'); |       this.updateValue(this.value, 'onBlur'); | ||||||
|       this.$emit('blur', event); |       this.$emit('blur', event); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user