Vue2系列教程(六):实际业务中computed计算属性的两种使用方式
Vue2 - 实际业务中computed计算属性的两种使用方式ES6对象中函数属性的简洁写法data的写法与computed的写法比较实际业务中computed计算属性的两种用法?一:ES6对象中函数属性的简洁写法?let cat = { name: "tom", // 以前: eat: function (food) { console.log(this.name + " Eat " + food); }, // 箭头函数版: