研究很久!我们先来看看this输出的内容!
发现在item内!
那么我们可以在before
内获取参数然后传入data
before: function(obj) { var oldname = this.item[0].name; console.log(this.item[0].name); this.data.oldname = oldname; }
或者我们可以获取他的父级内容,来更新dom
done: function(res) { var imgsrc=this.item.parents('li').find('.xh-img-src').attr('src'); }