Adds textarea support
This commit is contained in:
parent
da1786db8c
commit
dde830dbd0
10
dist/index.js
vendored
10
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -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)
|
||||
},
|
||||
|
@ -88,5 +88,8 @@ export const inputTypes = {
|
||||
box: [
|
||||
'radio',
|
||||
'checkbox'
|
||||
],
|
||||
textarea: [
|
||||
'textarea'
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user