mirror of https://github.com/ElemeFE/element
pull/19155/head
parent
bc7dcc6281
commit
7259a83852
|
@ -94,7 +94,12 @@
|
||||||
return Array.isArray(previewSrcList) && previewSrcList.length > 0;
|
return Array.isArray(previewSrcList) && previewSrcList.length > 0;
|
||||||
},
|
},
|
||||||
imageIndex() {
|
imageIndex() {
|
||||||
return this.previewSrcList.indexOf(this.src);
|
let previewIndex = 0;
|
||||||
|
const srcIndex = this.previewSrcList.indexOf(this.src);
|
||||||
|
if (srcIndex >= 0) {
|
||||||
|
previewIndex = srcIndex;
|
||||||
|
}
|
||||||
|
return previewIndex;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue