fix: hide photoswipe alt text when its empty
This commit is contained in:
@@ -172,6 +172,12 @@ onMounted(() => {
|
|||||||
el.appendChild(textBox);
|
el.appendChild(textBox);
|
||||||
|
|
||||||
pwsp.on('change', (a) => {
|
pwsp.on('change', (a) => {
|
||||||
|
if (pwsp.currSlide?.data.comment) {
|
||||||
|
textBox.style.display = '';
|
||||||
|
} else {
|
||||||
|
textBox.style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
textBox.textContent = pwsp.currSlide.data.comment;
|
textBox.textContent = pwsp.currSlide.data.comment;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user