diff --git a/README.md b/README.md index c51a86f..b3d8836 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,22 @@ > Vue.use(ProductZoomer) # Usage + +### Basic: +``` + +``` + +### Tracking click on preview image: ``` ``` diff --git a/src/App.vue b/src/App.vue index 887431a..8287a8b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,6 +5,8 @@
@@ -218,6 +220,15 @@ export default { }, components: { ProductZoomer + }, + methods: { + someCustomMethod (previewImage) { + // As parameter we get image that was clicked on + // Do, whatever you want, when user clicked on preview Image + + alert('You clicked on image with id: ' + previewImage.id) + console.log(previewImage) + } } } diff --git a/src/components/ProductZoomer.vue b/src/components/ProductZoomer.vue index eb69846..245bc3f 100644 --- a/src/components/ProductZoomer.vue +++ b/src/components/ProductZoomer.vue @@ -1,10 +1,11 @@