ImagePreview
Install
Usage
Basic Usage
Custom config
Async Close
Component Call
Options
| Attribute |
Description |
Type |
Default |
| images |
Images URL list |
Array |
[] |
| startPosition |
Start position |
Number |
0 |
| showIndex |
Whether to show index |
Boolean |
true |
| showIndicators |
Whether to show indicators |
Boolean |
false |
| loop |
Whether to enable loop |
Boolean |
true |
| onClose |
Close callback |
Function |
- |
| asyncClose |
Whether to enable async close |
Boolean |
false |
| className |
Custom className |
`String |
Array |
| lazyLoad |
Whether to enable thumb lazy load,should register Lazyload component |
Boolean |
false |
| maxZoom |
Max zoom |
Number |
3 |
| minZoom |
Min zoom |
Number |
1/3 |
Props
| Attribute |
Description |
Type |
Default |
| images |
Images URL list |
Array |
[] |
| start-position |
Start position |
Number |
0 |
| show-index |
Whether to show index |
Boolean |
true |
| show-indicators |
Whether to show indicators |
Boolean |
false |
| loop |
Whether to enable loop |
Boolean |
true |
| async-close |
Whether to enable async close |
Boolean |
false |
| class-name |
Custom className |
`String |
Array |
| lazy-load |
Whether to enable thumb lazy load,should register Lazyload component |
Boolean |
false |
| max-zoom |
Max zoom |
Number |
3 |
| min-zoom |
Min zoom |
Number |
1/3 |
Event
| Event |
Description |
Parameters |
| close |
Triggered when close |
{ index, url } |
| change |
Triggered when current image change |
index: index of current image |
Slot
| name |
Description |
| index |
Custom index |
onClose Parematers
| Attribute |
Description |
Type |
| url |
Url of current image |
Number |
| index |
Index of current image |
String |