miniprogram-computed
网友回复
微盟:
// 在data数据中定义变量
data: {
num1: 1,
num2: 2
},
// 在computed计算属性中使用变量进行计算
computed: {
result: function () {
return this.data.num1 + this.data.num2
}
}