computed当依赖的变量改变时,会重新计算结果。这种类型也是响应式的。 123456789<div> part1: <input type="text" v-model="part1"> <br> part2: <input type="text" v-model="part2"> <br> part1+part2: {{part12}}</div> 123456let part1 = ref()let part2 = ref()let part12 = computed(() => { return part1.value + part2.value;})