vue 渲染出来的图片右上角叉号点击删除
html部分 <span class="delete" @click="showFiguredelete(index)">×</span>js部分showFiguredelete(index){ var that=this;//console.log(ind
·
html部分
<span class="delete" @click="showFiguredelete(index)">×</span>
js部分
showFiguredelete(index){
var that=this;
//console.log(index)
console.log(that.staffinfoForm.showFigure[index])
that.staffinfoForm.showFigure.splice(index,1)
}
css部分
.delete{
width: 20px;
height: 20px;
position: absolute;
top: -30px;
font-size: 18px;
color: red;
right: -10px;
cursor:pointer;
}
更多推荐
已为社区贡献5条内容
所有评论(0)