使用jquery 的
deferred 出现Uncaught TypeError: Cannot read property 'done' of undefined错误
form_vm.change_widget_type("save_form").done(function(data){
console.log("继续执行其他字段的保存" , data)
}).fail(function(e){
console.log("ajax无返回" ,e)
})
原因是 多次调用change_widget_type时,没有return ,要一直return 所有函数,返回ajax的deferred