vue 动态变量值不变化

caseData = {
  lists:[]
};
vm = new Vue({
  el: '.hs-mt',
  data: caseData
});
function getlist(pid,id){
  $.ajax({
  url: 'xxxxxxxxxxxxxx',
  type: 'post',
  dataType: 'json',
  data: {pid:pid,id:id},
  beforeSend: function(){
},
})
.always(function(data) {
  if(data.status==200){
  Vue.set(caseData,'lists',data.data);
}
});

posted @ 2019-01-28 17:11  酷酷的城池  阅读(576)  评论(0编辑  收藏  举报