<span>评论区:</span> <ul class="list-group" v-for="item,key in comment_data"> <li class="list-group-item"> <p><span class="nid">#{% verbatim %} {{ key+1 }} {% endverbatim %}楼</span> <span>{% verbatim %} {{ item.create_time }} {% endverbatim %}</span> <span class="nid"><i>评价用户:</i>{% verbatim %} {{ item.username }} {% endverbatim %}</span> </p> <p class="comment_com"> {% verbatim %} {{ item.content }} {% endverbatim %} <a href="javascript:;" class="fl-right" v-if="is_delete==true" :value="item.pk">删除</a></p> </li> </ul> <textarea type="text" id="remark" class="" v-model="comment_datas"></textarea> <p> <button type="button" class="btn btn-primary" @click="submit">提交评论</button> </p>
// 删除评论
comment_delete(event){
console.log(event.target.getAttribute('value'));
}