vue-循环标记列表元素
Posted 郑福坤
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vue-循环标记列表元素相关的知识,希望对你有一定的参考价值。
<el-col :lg="4" class="list" v-for="(item,index) in picList"> <img :src="item.src" /> <span @click="delPicture(index)">×</span> </el-col>
picList:[{ src:"http://imgs.zeju.cn//263804351010818/item/280106160156674/rendering/20150827174046.jpg" },{ src:"http://imgs.zeju.cn//263804351010818/item/280106160156674/rendering/20150827174046.jpg" }, { src:"http://imgs.zeju.cn//263804351010818/item/280106160156674/rendering/20150827174046.jpg" }, { src:"http://imgs.zeju.cn//263804351010818/item/280106160156674/rendering/20150827174046.jpg" }, { src:"http://imgs.zeju.cn//263804351010818/item/280106160156674/rendering/20150827174046.jpg" }, { src:"http://imgs.zeju.cn//263804351010818/item/280106160156674/rendering/20150827174046.jpg" }, { src:"http://imgs.zeju.cn//263804351010818/item/280106160156674/rendering/20150827174046.jpg" }, { src:"http://imgs.zeju.cn//263804351010818/item/280106160156674/rendering/20150827174046.jpg" }, { src:"http://imgs.zeju.cn//263804351010818/item/280106160156674/rendering/20150827174046.jpg" }, { src:"http://imgs.zeju.cn//263804351010818/item/280106160156674/rendering/20150827174046.jpg" }, { src:"http://imgs.zeju.cn//263804351010818/item/280106160156674/rendering/20150827174046.jpg" }]
delPicture(index){ console.log(index) }
以上是关于vue-循环标记列表元素的主要内容,如果未能解决你的问题,请参考以下文章