Skip to content

Commit 15fd75e

Browse files
test: example
1 parent 1ef13ac commit 15fd75e

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

example/App.vue

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<template>
2+
<ImageMagnifier :src="image" :zoom-src="image" width="400" height="300" zoom-width="400" zoom-height="300"></ImageMagnifier>
3+
</template>
4+
5+
<script>
6+
import ImageMagnifier from '../src/components/ImageMagnifier.vue'
7+
import image from './img/DA2D9393-4081-4384-B493-95DA1620C26D.png'
8+
export default {
9+
components: {
10+
ImageMagnifier
11+
},
12+
data() {
13+
return {
14+
image,
15+
config: {
16+
width:400,
17+
height:300,
18+
maskWidth:100,
19+
maskHeight:100,
20+
maskColor:'#fff',
21+
maskOpacity:0.5
22+
}
23+
}
24+
}
25+
}
26+
</script>
27+
28+
<!-- Add "scoped" attribute to limit CSS to this component only -->
29+
<style scoped>
30+
31+
</style>
310 KB
Loading

example/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import Vue from 'vue';
2+
import App from './App.vue';
3+
4+
new Vue({
5+
render: (h) => h(App)
6+
}).$mount('#app')

0 commit comments

Comments
 (0)