这是用python 写一个商城项目 报的错,原因是全选vue报的错
on_selected_all: function(){ var selected = !this.selected_all; axios.put(this.host + '/cart/selection/', { selected }, { responseType: 'json', headers:{ 'Authorization': 'JWT ' + this.token }, withCredentials: true }) .then(response => { for (var i=0; i<this.cart.length;i++){ this.cart[i].selected = selected; } }) .catch(error => { console.log(error.response.data); }) },