码迷,mamicode.com
首页 > 其他好文 > 详细

计算属性和方法

时间:2018-10-18 19:21:16      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:基于   eth   依赖   compute   style   ted   就会   put   methods   

计算属性

computed:{

}

方法

methods: {
      
 }

两者功能上差不多,计算属性是基于依赖缓存的,而methods只要页面重新渲染就会变

想做缓存就用计算属性

计算属性和方法

标签:基于   eth   依赖   compute   style   ted   就会   put   methods   

原文地址:https://www.cnblogs.com/eunuch/p/9812478.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!