|
|
@@ -224,6 +224,29 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
this.srcList = temp;
|
|
|
+ // 查看图片里面显示当前第几张图
|
|
|
+ this.$nextTick(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.imgBigShow = true;
|
|
|
+ // 左按钮
|
|
|
+ const tempLeft = document.querySelector(".el-image-viewer__prev");
|
|
|
+ if (tempLeft) {
|
|
|
+ tempLeft.addEventListener("click", () => {
|
|
|
+ this.imgBigNum--;
|
|
|
+ if (this.imgBigNum === 0) this.imgBigNum = this.srcList.length;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 右按钮
|
|
|
+ const tempRight = document.querySelector(".el-image-viewer__next");
|
|
|
+ if (tempRight) {
|
|
|
+ tempRight.addEventListener("click", () => {
|
|
|
+ this.imgBigNum++;
|
|
|
+ if (this.imgBigNum === this.srcList.length + 1)
|
|
|
+ this.imgBigNum = 1;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, 100);
|
|
|
+ });
|
|
|
} else if (item.type === "video") {
|
|
|
this.myVideoShow = true;
|
|
|
this.myVideoSrc = this.baseURL + item.filePath;
|