var plan_table = new Vue({
el: '#planListTable',
created:function(){
var that = this;
planInfoInit.tablevueSelf = this;
getTableData();
},
data:{
tableData:[]
},
methods: {
showDetail: function (event) {
var id = $(event.currentTarget).attr("id");
$.ajax({
url:httpresquest.header+'/knowledge/emergencyPlan/getEmergencyPlanById?id='+id,
type:'GET',
dataType:"JSON",
success:function(obj){
if(obj.success == true){
planInfoInit.detailvueSelf.vueDetailData = obj.data;
planInfoInit.wordvueSelf.vueWordData = obj.data;
}
}
});
}
},
mounted:function (){
this.$nextTick(function () {
console.log(111111111111111111111111111111111111111111111);
return;
})
}
});
plan_table.$watch("tableData",function(){
if($("#planListTable tbody").find("tr:first-child").length>0){
$("#planListTable tbody").find("tr:first-child").click();
}else{
planInfoInit.detailvueSelf.vueDetailData = '';
planInfoInit.wordvueSelf.vueWordData = '';
}
console.log(222222222222222222222222222);
return false;
});
至少去js.do或者jsfiddle写一个能重现错误的页面吧