<el-table :data="weekList" stripe tooltip-effect="dark" class="table"> <el-table-column v-for="(item, index) in tableOrderItem":key="index":width="item.width":prop="item.prop":label="item.label"align="center"show-overflow-tooltip > <template slot-scope="scope"> <template v-if="item.prop === 'commodityDetails'"> <div v-html="scope.row.commodityDetails"></div> </template> <!-- 图片有多张的情况 先分隔为数组 然后利用v-for 遍历得到 src --> <template v-else-if="item.prop === 'picture1'"> <div v-for="(item,index) in scope.row.picture1.split(',')" :key="index" class="table-flex"> <el-image style="50px; height: 50px; margin-right: 10px;" :src="imgUrl+item" :preview-src-list="[imgUrl+item]"></el-image> </div> </template> <template v-else>{{scope.row[item.prop]}} </template> </template> </el-table-column> </el-table>
el-table 表格循环多张图片
免责声明:文章转载自《el-table 表格循环多张图片》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
上篇谈谈localhost与127.0.0.1Java Integer(-128~127)值的==和equals比较产生的思考下篇
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=