1
0
mirror of synced 2024-11-22 21:36:04 +03:00

Adds textarea support

This commit is contained in:
Justin Schroeder 2018-03-30 14:51:47 -04:00
parent da1786db8c
commit dde830dbd0
3 changed files with 21 additions and 5 deletions

10
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -21,6 +21,16 @@
v-if="isTextInput" v-if="isTextInput"
@blur="errorBlurState = true" @blur="errorBlurState = true"
> >
<textarea
ref="textarea"
:class="elementClasses"
:type="type"
:name="name"
v-model="val"
v-bind="attributes"
v-if="isTextareaInput"
@blur="errorBlurState = true"
/>
<!-- BUTTON INPUTS --> <!-- BUTTON INPUTS -->
<button <button
:type="type" :type="type"
@ -199,6 +209,9 @@ export default {
isTextInput () { isTextInput () {
return !this.hasCustomInput && inputTypes.text.includes(this.type) return !this.hasCustomInput && inputTypes.text.includes(this.type)
}, },
isTextareaInput () {
return !this.hasCustomInput && inputTypes.textarea.includes(this.type)
},
isButtonInput () { isButtonInput () {
return !this.hasCustomInput && inputTypes.button.includes(this.type) return !this.hasCustomInput && inputTypes.button.includes(this.type)
}, },

View File

@ -88,5 +88,8 @@ export const inputTypes = {
box: [ box: [
'radio', 'radio',
'checkbox' 'checkbox'
],
textarea: [
'textarea'
] ]
} }