1.0.5 • Published 6 years ago

@laragle/input v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

Laragle Input

Vue input component

npm.io

Installation

npm install @laragle/input

Usage

import input from '@laragle/input';

Vue.use(input);

In your vue component

<template>
    <div style="padding: 20px;width:500px;border:1px solid #ccc;margin: auto;">
        <h2>Register</h2>
        <laragle-input placeholder="Name" focus v-model="name"/>
        <laragle-input placeholder="Email" type="email" :error="emailError" @updated="handleEmailUpdated" v-model="email"/>
        <laragle-input placeholder="Password" type="password" helpText="Password must be at least 6 characters." v-model="password"/>
        <div style="margin-top: 30px;text-align: right;"><button>Create Account</button></div>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                name: '',
                email: '',
                password: '',
                emailError: 'Invalid email address'
            }
        },
        methods: {
            handleEmailUpdated() {
                this.emailError = null;
            }
        }
    }
</script>
1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago