Vue Mixin
Currently deprecated, Vue 2 onlyUse vuito with Vue.js or Nuxt.js like a breeze!
Installation
NPM
npm i @vuito/vue
Usage
Using the template defined here.
pages/signin.vue
<template>
<span>{{ errors.username }}</span>
<input type="text" id="username"
:class="{error: !!errors.username}"
v-model="fields.username" @input.capture="onInput"
>
<span>{{ errors.password }}</span>
<input type="password" id="password"
:class="{error: !!errors.password}"
v-model="fields.password" @input.capture="onInput"
>
</template>
<script>
import { signIn } from '~/validations/auth';
import Vuito from '@vuito/vue';
export default {
mixins: [Vuito(signIn)]
}
</script>
Table of Contents