摘要:
一、computed 和 methods computed是计算属性,methods是方法,都可以实现对 data 中的数据加工后再输出。 不同的是 computed 计算属性是基于它们的依赖进行缓存的。计算属性 computed 只有在它的相关依赖发生改变时才会重新求值。这就意味着只要data 中 阅读全文
摘要:
1.父传子通过属性 <div id="#box"> <one :abc="mytext"></one> </div> new Vue({ el:"#box", data:{ mytext:"hello" }, components:{ one:{ template:`<div>{{abc}}</di 阅读全文