📜  Framework7照片浏览器方法和属性

📅  最后修改于: 2021-01-02 06:30:33             🧑  作者: Mango

照片浏览器方法和属性

初始化照片浏览器后,可以初始化实例变量以使用照片浏览器的方法和属性。

照片浏览器属性

Index Properties Description
1) myPhotoBrowser.swiper It holds initialized swiper instances with every available swiper methods and properties.
2) myPhotoBrowser.container It is the DOM7 element with photo browser container HTML element.
3) myPhotoBrowser.exposed It contains true, if photo browser is in exposition mode.
4) myPhotoBrowser.activeIndex It is the index number of the currently active slide.
5) myPhotoBrowser.params It is the object with passed initialization parameters.

照片浏览器方法

Index Method Description
1) myPhotoBrowser.open(index); It is used to open the photo browser on photo with index number. If index is not specified then, last closed photo will be opened.
2) myPhotoBrowser.close(); It is used to close the photo browser.
3) myPhotoBrowser.toggleZoom(); It toggles the zoom of currently active slide.
4) myPhotoBrowser.toggleExposition(); It is used to toggle the exposition mode.
5) myPhotoBrowser.enableExposition(); It is used to enable the exposition mode.
6) myPhotoBrowser.disableExposition(); It is used when you want to disable the exposition mode.