一、为什么使用Vue的计算属性? 在Vue应用中,在模板中双向绑定一些数据或者表达式({ {***}}),但是表达式如果过长,或者逻辑更为复杂时,就会变得臃肿甚至难以维护和阅读,而使用methods较为耗费性能,多次重复使用,多次重复调用,比如这样的写法:
<div class="app">
<table border="1">
<thead>
<th>学科</th>
<th>分数</th>
</thead>
<tbody>
<tr>
<td>数学</td>
<td><input type="text" v-model="Math"></td>
</tr>
<tr>
<td>英语</td>
<td><input type="text" v-model="English"></td>
</tr>
<tr>
<td>化学<