1.0.5 • Published 6 years ago
@laragle/input v1.0.5
Laragle Input
Vue input component
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>