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

11

parent 908a3712
...@@ -491,16 +491,15 @@ ...@@ -491,16 +491,15 @@
}, },
showImg: function (src) { showImg: function (src) {
let srcArr = src.split('?') let srcArr = src.split('?')
src = srcArr[0] src = srcArr[0];
let isExsit = false this.images=[];
this.images.forEach(x => { var tempObj = this.images.find(x => x == src);
if (x === src) if (!tempObj) {
isExsit = true
})
if (!isExsit) {
this.images.push(src) 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() this.$viewer.show()
}, },
......
...@@ -1129,7 +1129,8 @@ ...@@ -1129,7 +1129,8 @@
showImg: function (src) { showImg: function (src) {
let srcArr = src.split('?') let srcArr = src.split('?')
src = srcArr[0] src = srcArr[0]
let isExsit = false let isExsit = false;
this.images=[];
this.images.forEach(x => { this.images.forEach(x => {
if (x === src) if (x === src)
isExsit = true isExsit = true
......
...@@ -1221,6 +1221,7 @@ ...@@ -1221,6 +1221,7 @@
let srcArr = src.split("?"); let srcArr = src.split("?");
src = srcArr[0]; src = srcArr[0];
let isExsit = false; let isExsit = false;
this.images=[];
this.images.forEach((x) => { this.images.forEach((x) => {
if (x === src) isExsit = true; 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