VueTyped

vue-typed

VueTyped contains sets of ECMAScript / Typescript decorators that helps you write Vue component easily. It would be something like this:

import { Component } from 'vue-typed'

@Component({ 
    template: `
    <div>
        <input type="text" v-model="message">
        <button v-on:click="clear">Clear</button>
        <div>{{status}}</div>
    </div>`, 
}) 
class App {
    message:string = 'Hello!'

    get status() {
        return this.message.length < 15 ? 'Too short... type some more...' : 'Alright, stop typing now..'
    }

    clear() {
        this.message = ''
    }
}

See live demo here.

Thanks to vue-class-component for the inspiration! Vue-Typed adopted from this module.

results matching ""

    No results matching ""