Commit 46601f5d authored by 黄奎's avatar 黄奎

11

parent 908a3712
......@@ -491,16 +491,15 @@
},
showImg: function (src) {
let srcArr = src.split('?')
src = srcArr[0]
let isExsit = false
this.images.forEach(x => {
if (x === src)
isExsit = true
})
if (!isExsit) {
src = srcArr[0];
this.images=[];
var tempObj = this.images.find(x => x == src);
if (!tempObj) {
this.images.push(src)
} else {
this.$viewer.view(this.images.indexOf(src))
}
var clickIndex = this.images.indexOf(src);
if (clickIndex > -1) {
this.$viewer.view(clickIndex)
}
this.$viewer.show()
},
......
......@@ -1129,7 +1129,8 @@
showImg: function (src) {
let srcArr = src.split('?')
src = srcArr[0]
let isExsit = false
let isExsit = false;
this.images=[];
this.images.forEach(x => {
if (x === src)
isExsit = true
......
......@@ -1221,6 +1221,7 @@
let srcArr = src.split("?");
src = srcArr[0];
let isExsit = false;
this.images=[];
this.images.forEach((x) => {
if (x === src) isExsit = true;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment