{"repo":"mirari/v-viewer","free":true,"listed":false,"github":"https://github.com/mirari/v-viewer","clone":"git clone https://github.com/mirari/v-viewer.git","description":"Image viewer component for vue, supports rotation, scale, zoom and so on, based on viewer.js","language":"Vue","stars":2639,"topics":["vue","viewer","gallery","picture","img","image"],"license":"MIT","category":"ui-components","readme_excerpt":"v-viewer Image viewer component for vue, supports rotation, scale, zoom and so on, based on viewer.js v-viewer for vue2 Live demo Quick Example - directive - component - api - thumbnail & source - viewer callback - custom toolbar - filter images - change images 中文文档 Installation Install from NPM Usage To use v-viewer , simply import it and the css file, and call app.use() to install. The component, directive and api will be installed together in the global. Two different API styles are both supported: Options API and Composition API . Support UMD Browser CommonJS AMD Usage of directive Just add the directive v-viewer to any element, then all img elements in it will be handled by viewer . You can set the options like this: v-viewer=\"{inline: true}\" Get the element by selector and then use el.$viewer to get the viewer instance if you need. Directive modifiers static The viewer instance will be created only once after the directive binded. If you're sure the images inside this element won't change again, use it to avoid unnecessary re-render. rebuild The viewer instance will be updated by update method when the source images changed (added, removed or sorted) by default. If you encounter any display problems, try rebuilding instead of updating. Usage of component You can simply import the component and register it locally too. Component props images - Type: Array trigger - Type: Object You can replace images with trigger , to accept any type of prop. when the trigger changes, th","default_branch":null,"files":null,"tree":[],"storefront":"/r/mirari","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mirari/v-viewer/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}