mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-27 01:32:10 +08:00 
			
		
		
		
	This commit is contained in:
		
							parent
							
								
									ce6bda41ad
								
							
						
					
					
						commit
						d4a29afb6a
					
				| @ -103,10 +103,7 @@ export default createComponent({ | |||||||
| 
 | 
 | ||||||
|   methods: { |   methods: { | ||||||
|     getHeight() { |     getHeight() { | ||||||
|       if (!this.height) { |       return this.$el?.getBoundingClientRect().height || 0; | ||||||
|         this.height = this.$el.getBoundingClientRect().height; |  | ||||||
|       } |  | ||||||
|       return this.height; |  | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     scrollIntoView(body) { |     scrollIntoView(body) { | ||||||
|  | |||||||
| @ -108,6 +108,12 @@ export default createComponent({ | |||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
| 
 | 
 | ||||||
|  |   inject: { | ||||||
|  |     vanPopup: { | ||||||
|  |       default: null, | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  | 
 | ||||||
|   data() { |   data() { | ||||||
|     return { |     return { | ||||||
|       subtitle: '', |       subtitle: '', | ||||||
| @ -165,6 +171,8 @@ export default createComponent({ | |||||||
| 
 | 
 | ||||||
|   mounted() { |   mounted() { | ||||||
|     this.init(); |     this.init(); | ||||||
|  |     // https://github.com/youzan/vant/issues/9845
 | ||||||
|  |     this.vanPopup?.$on('opened', this.onScroll); | ||||||
|   }, |   }, | ||||||
| 
 | 
 | ||||||
|   /* istanbul ignore next */ |   /* istanbul ignore next */ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user