[Vue warn]: Computed property "selectMenu" was assigned to but it has no setter. found in

解决方案

selectMenu:{

get:function () {

let foods=[];

this.goods.forEach((good)=>{

good.foods.forEach((food)=>{

if(food.count){

foods.push(food);

}

})

})

return foods;

},

set:function (newVal) {

this.foods=newVal;

}

}

你可能感兴趣的:([Vue warn]: Computed property "selectMenu" was assigned to but it has no setter. found in)