fix: hide photoswipe alt text when its empty
This commit is contained in:
		
							parent
							
								
									6242f37111
								
							
						
					
					
						commit
						5d746d4ee5
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -172,6 +172,12 @@ onMounted(() => {
 | 
			
		|||
				el.appendChild(textBox);
 | 
			
		||||
 | 
			
		||||
				pwsp.on('change', (a) => {
 | 
			
		||||
					if (pwsp.currSlide?.data.comment) {
 | 
			
		||||
						textBox.style.display = '';
 | 
			
		||||
					} else {
 | 
			
		||||
						textBox.style.display = 'none';
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					textBox.textContent = pwsp.currSlide.data.comment;
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue