vue计算商品总价使用 ---- 计算属性 注 命名规则: 属性名称,方法名称,变量名称 尽量使用小驼峰命名法 computed:{ totalPrice() { let totalPrice = 0 for (let i = 0; i< this.books.length; i++) { totalPrice += this