项目作者: posva

项目描述 :
Recomputable computed properties
高级语言: JavaScript
项目地址: git://github.com/posva/vue-recomputed.git
创建时间: 2018-08-08T21:58:13Z
项目社区:https://github.com/posva/vue-recomputed

开源协议:MIT License

下载


VueRecomputed Build Status npm package coverage thanks

Recomputable computed properties in Vue

⚠️ You probably don’t need this, please, first check this issue and this comment and this other one as well

Installation

  1. npm install vue-recomputed

Usage

This is a silly example to showcase the API. Never do this kind of things:

  1. export default {
  2. recomputed: {
  3. currentTime() {
  4. // you have access to the component as with computed properties
  5. return Date.now()
  6. },
  7. },
  8. methods: {
  9. updateTime() {
  10. this.$recompute('currentTime')
  11. },
  12. },
  13. }

License

MIT