open(index) { this.current = index this.isOpen = true document.body.classList.add('modal-open') }, close() { this.isOpen = false document.body.classList.remove('modal-open') }, next() { if (this.current < this.images.length - 1) this.current++ }, prev() { if (this.current > 0) this.current-- } } }