https://github.com/foxbenjaminfox/vue-async-computed-decorator
A vue-class-component decorator for vue-async-computed
https://github.com/foxbenjaminfox/vue-async-computed-decorator
decorator vue
Last synced: 7 months ago
JSON representation
A vue-class-component decorator for vue-async-computed
- Host: GitHub
- URL: https://github.com/foxbenjaminfox/vue-async-computed-decorator
- Owner: foxbenjaminfox
- License: mit
- Created: 2019-12-27T12:07:47.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T13:13:20.000Z (about 3 years ago)
- Last Synced: 2025-06-09T13:24:00.653Z (7 months ago)
- Topics: decorator, vue
- Language: JavaScript
- Size: 360 KB
- Stars: 16
- Watchers: 1
- Forks: 7
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vue-async-computed-decorator
This package provides a [`vue-class-component`](https://github.com/vuejs/vue-class-component/) decorator for [`vue-async-computed`](https://github.com/foxbenjaminfox/vue-async-computed). This allows you to use `vue-async-computed` in your class-style Vie components easily.
## Usage Example:
```javascript
import Vue from 'vue'
import AsyncComputedPlugin from 'vue-async-computed'
import AsyncComputed from 'vue-async-computed-decorator'
import Component from 'vue-class-component'
Vue.use(AsyncComputedPlugin)
@Component
class MyComponent extends Vue {
@AsyncComputed()
async someComputedProp() {
...
}
}
```
## Credits
Thanks to [@TheNoim](https://github.com/TheNoim), [@saraedum](https://github.com/saraedum), and [@nwtgck](https://github.com/nwtgck) for the implementation of this decorator.