码迷,mamicode.com
首页 > 其他好文 > 详细

Computed property "selected_all" was assigned to but it has no setter,在购物车添加完去结算,然后商品列表不显示

时间:2018-07-05 19:53:29      阅读:2153      评论:0      收藏:0      [点我收藏+]

标签:sign   pre   sele   function   assigned   catch   selected   type   for   

这是用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);
                })
        },

  

Computed property "selected_all" was assigned to but it has no setter,在购物车添加完去结算,然后商品列表不显示

标签:sign   pre   sele   function   assigned   catch   selected   type   for   

原文地址:https://www.cnblogs.com/xkris/p/9269765.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!