vue-component-decorator

Vue component decorator with typescript

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
vue-component-decorator
0.0.54 years ago4 years agoMinified + gzip package size for vue-component-decorator in KB

Readme

vue-component-decorator
Vue component decorator with typescript
// npm install vue-component-decorator
import { VueComponent, Component, CreateElement, Props } from 'vue-component-decorator'

@Component
export class TestComponent extends VueComponent<{ id: string, className?: string }> {
        @Props() props = { // 自定義標籤屬性之默認值
                id: '',
                className: ''
        }

        public render(h: CreateElement): any {
                return (
                        <h1 id={this.$props.id} class={this.$props.className}>
                                Hello World
                        </h1>
                )
        }
}