Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chenjiahan/vue-class
Decorator for building Vue2 & TypeScript2 Component.
https://github.com/chenjiahan/vue-class
class decorator typescript vue
Last synced: 3 months ago
JSON representation
Decorator for building Vue2 & TypeScript2 Component.
- Host: GitHub
- URL: https://github.com/chenjiahan/vue-class
- Owner: chenjiahan
- License: mit
- Created: 2017-02-07T06:01:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-24T07:19:51.000Z (almost 7 years ago)
- Last Synced: 2024-10-14T00:01:23.016Z (3 months ago)
- Topics: class, decorator, typescript, vue
- Language: TypeScript
- Homepage:
- Size: 30.3 KB
- Stars: 7
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vue Class
Decorator for building Vue2 & TypeScript2 Component.## Install
npm
```
npm i vue-class --save
```
yarn
```
yarn add vue-class
```## Usage
app.ts
``` typescript
import render from './app.html';
import { Vue, Component, Watch } from 'vue-class';@Component({
render,
name: 'app',
props: ['value']
})
class App extends Vue {
value: number;@Watch('value')
onValueChange(value: number): void {
console.log(value);
}
}
```## Dependences
- [vue-class-component](https://github.com/vuejs/vue-class-component)
- [vue-render-loader](https://github.com/chenjiahan/vue-render-loader)