Vue Input with multiple functionality
npm i @simpli/vue-input moment class-transformer vue-multiselect
import Vue from 'vue'
import VueInput from '@simpli/vue-input'
Vue.use(VueInput)
On your Scss:
@import "~@simpli/vue-input/scss/input";
Type can be 'text', 'mask', 'currency', 'textarea' or any other HTML's input type
<input-text
v-model="myValue"
type="text"
/>
<input-text
v-model="myValue"
type="text"
label="Input Label"
name="input-name"
:required="ifTrueWillShowAnAsterisk"
:selectall="ifTrueWillSelectTheTextOnFocus"
inputClass="aClassToDecorateTheInput"
mask="###/###.###-###"
validation="required|email"
@focus="focusEvent"
@blur="BlurEvent"
/>
You can define the label as a Slot aswell
Use one of the following on the property maskPreset
:
- cnpj
- cpf
- date
- datetime
- phone
- phoneAlt
- rg
- zipcode
- zipcodeAlt
<input-text
v-model="myValue"
type="text"
maskPreset="phone"
/>
<input-checkbox
v-model="myValue"
/>
<input-checkbox
v-model="myValue"
label="Checkbox Label"
labelClass="aClassForTheLabel"
inputClass="aClassForTheInput"
radio="ifTrueTheInputWillBeARadioButton"
@focus="focusEvent"
@blur="BlurEvent"
/>
You can define the label as a Slot aswell
TODO documentation
TODO documentation