标签:json格式 设计 console parse pre The 全选 post请求 组件
axios发送的post请求数据,控制器参数前必须加@RequestBody 才接受的到
axios.post(url,sendData).then(function(response){
var userList = response.data;
}).catch(function(reason){
console.log(reason);
})
axios接受的响应必须是json格式,如果没有返回或者是其他格式,不会调用回调函数
vue生命周期方法不是写在methods里面的,单独写在外面
vue.js文件分为开发版和压缩版,开发版运行错误,有错误信息显示。
delete是关键字不能用来自定义方法
vue中表单多个checkbox绑定一个数据,每个checkbox选中就添加他的value属性到数据的数组中。
b. 每次数据更新后检测是否所有数据被选中,更新全选框状态
vue-select下拉框组件,接受的数据格式必须是:[{id:"1",text:"x"},{id:"2",text:"y"} ]
entity = { name:"zangsan" , brandIds:"[{},{}]" , specIds:"[{},{}]" }
转成对象entity = { name:"zangsan", brandIds:[{},{}] , specIds:[{},{}] }
将JSON字符串转成JSON数组
entity.brandIds = JSON.parse(entity.brandIds);
entity.specIds = JSON.parse(entity.specIds);
标签:json格式 设计 console parse pre The 全选 post请求 组件
原文地址:https://www.cnblogs.com/tianzhen45/p/11407169.html