<el-table-column prop="imgUrl" label="图片" align="center">
<template slot-scope="scope">
<div class="wrap" :class="{'moreImg':scope.row.imgUrl.length > 1}">
<el-image
v-for="(item,index) in scope.row.imgUrl"
:key="index"
:src="item"
></el-image>
</div>
</template>
</el-table-column>
this.$post("api/control/aluDynamic/selectDynamicByManage", data
).then(
(res
) => {
console
.log(res
);
console
.log(res
.data
.list
);
for (var i
= 0; i
< res
.data
.list
.length
; i
++) {
var str
= res
.data
.list
[i
].imgUrl
;
var strArr
= str
.split(";");
console
.log(strArr
);
res
.data
.list
[i
].imgUrl
= strArr
;
console
.log(res
.data
.list
[i
].imgUrl
);
}
this.tableData
= res
.data
.list
;
this.total
= res
.data
.total
;
}
);
转载请注明原文地址:https://tech.qufami.com/read-10490.html