Skip to content

Decorator for building Vue2 & TypeScript2 Component.

License

Notifications You must be signed in to change notification settings

chenjiahan/vue-class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue Class

Decorator for building Vue2 & TypeScript2 Component.

Install

npm

npm i vue-class --save

yarn

yarn add vue-class

Usage

app.ts

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