我用ajax做分页,vue做数据渲染,当我点击第二页时请求数据这个是没有问题的,但是当我回到第一页,页面事件就不生效了,我要怎样删除页面数据重新渲染??
{{item.id}}{{item.menuname}}{{item.engname}}{{item.path}}{{item.ord}}function pags(totalCount){
//分页
$('.M-box4').pagination({
totalData: totalCount,
showData: 10,
jump: true,
callback: function (api) {
var data = {
pageNum: api.getCurrent(),
pageSize:10
};
$.post('admin/resources/resourceList.jhtml', data, function (json) {
vmm.mydatas = json.datas;
vmm.$nextTick(function(){
$(".footable").footable();
});
});
}
},function (api) {
var this_page = api.getCurrent(); //1
if(this_page == 1){
$.post('admin/resources/resourceList.jhtml?pageNum=1&pageSize=10',function (json) {
vmm.mydatas = json.datas;
vmm.$nextTick(function(){
$(".footable").footable();
});
});
}
});