1
0
mirror of synced 2024-11-22 13:26:06 +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"
@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
:type="type"
@ -199,6 +209,9 @@ export default {
isTextInput () {
return !this.hasCustomInput && inputTypes.text.includes(this.type)
},
isTextareaInput () {
return !this.hasCustomInput && inputTypes.textarea.includes(this.type)
},
isButtonInput () {
return !this.hasCustomInput && inputTypes.button.includes(this.type)
},

View File

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