2020-11-22 发现:
完全不用单独设置,element会自动定位当前图片。
<el-image :src="srcList[1]" :preview-src-list="srcList"></el-image>
export default {
data: () => ({
srcList: [
require("@/static/pic/FreeBuildWeb/1.png"),
require("@/static/pic/FreeBuildWeb/2.png"),
require("@/static/pic/FreeBuildWeb/3.png"),
require("@/static/pic/FreeBuildWeb/4.png"),
require("@/static/pic/FreeBuildWeb/5.png"),
require("@/static/pic/FreeBuildWeb/6.png")
]
}),
};
评论区