https://cn.vuejs.org/v2/guide/computed.html
// 计算属性有缓存性:如果值没有发生改变,则页面不回重新渲染computed:{total(){return: this.list.length}}
// 默认情况下 watch 初始化时不执行watch: {courses(newVal, oldVal){console.log(newVal, oldVal)this.total = newVal.length}}
//watch: {courses: {immediate: true, // 立即执行一次deep: true, // 深层监听,耗性能handler(newVal, oldVal) {console.log(newVal, oldVal)this.total = newVal.length}}}
