1.2.24 • Published 3 years ago
duo-image-viewer v1.2.24
目录
快速入门
安装
$ npm i duo-image-viewer --save # install duo-image-viewer
用法
main.js 文件:
import duoImageViewer from 'duo-image-viewer'
Vue.use(duoImageViewer)
使用:
<template>
<div>
<button @click="handleOpen">打开查看器</button>
<duo-image-viewer
:list="srcList"
@open="openCallback"
@close="closeCallback"
:show.sync="showViewer"
:currentIndex="currentIndex"
/>
</div>
</template>
<script>
export default {
data() {
return {
currentIndex: 0, // 打开图片查看器时,需要定位到的图片的索引
srcList: [
"https://scpic.chinaz.net/files/pic/pic9/202203/apic39703.jpg",
"https://scpic.chinaz.net/files/pic/pic9/202005/zzpic24899.jpg",
"https://scpic.chinaz.net/files/pic/pic9/202109/bpic24244.jpg",
"https://scpic.chinaz.net/files/pic/pic9/202110/hpic4529.jpg",
"https://scpic.chinaz.net/files/pic/pic9/201912/zzpic22106.jpg",
"https://scpic.chinaz.net/files/pic/pic9/202202/apic38580.jpg",
], // 图片查看器数据集
showViewer: false, // 是否打开图片查看器
};
},
methods: {
handleOpen() {
this.showViewer = true;
},
openCallback() {}, // 打开时的回调
closeCallback() {}, // 关闭时的回调
}
};
</script>
维护者
1.2.0
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.2.20
3 years ago
1.2.23
3 years ago
1.2.24
3 years ago
1.2.21
3 years ago
1.2.22
3 years ago
1.2.15
3 years ago
1.0.47
4 years ago
1.0.46
5 years ago
1.0.45
5 years ago
1.0.38
5 years ago
1.0.40
5 years ago
1.0.44
5 years ago
1.0.43
5 years ago
1.0.42
5 years ago
1.0.41
5 years ago
1.0.36
5 years ago
1.0.35
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.28
5 years ago
1.0.25
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago