// 单个商品全部选中后全选按钮也选中
var checkAllFlag = true;
this.productList.forEach(function(item,index){
checkAllFlag = checkAllFlag && item.checked;
});
this.checkAllFlag = checkAllFlag;
var checkAllFlag = true;
this.productList.forEach(function(item,index){
checkAllFlag = checkAllFlag && item.checked;
});
this.checkAllFlag = checkAllFlag;
2017-02-18
最新回答 / 慕函数3319187
课程demohttps://github.com/LinStan/VueStudy/tree/master/购物车课程demo完成后的源码https://github.com/LinStan/VueStudy/tree/master/vue2.0-shoppingCart
2017-02-17
加v-model="item.productQuentity"报了这个错:
[Vue warn]: <input v-model="item.productQuentity" value="0">:
inline value attributes will be ignored when using v-model. Declare initial values in the component's data option instead.
这个错误要删除 value="0"属性吧
[Vue warn]: <input v-model="item.productQuentity" value="0">:
inline value attributes will be ignored when using v-model. Declare initial values in the component's data option instead.
这个错误要删除 value="0"属性吧
2017-02-17