<div>
<el-image
ref="imageEnlargeRef"
style="width: 1px; height: 1px; position: absolute; opacity: 0"
:src="url"
:preview-src-list="getPreviewImages(3)"
></el-image>
</div>
getPreviewImages(index) {
var imgList = [...this.srcList]
console.log(index, 'imgList')
if (index === 0) return imgList
var start = imgList.splice(index)
var remain = imgList.splice(0, index)
console.log('start.concat(remain)', index)
return start.concat(remain)
}
elment-ui el-image 设置initial-index失效 导致无法改变图片预览顺序
最新推荐文章于 2024-09-29 16:23:49 发布