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"
|
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)
|
||||||
},
|
},
|
||||||
|
@ -88,5 +88,8 @@ export const inputTypes = {
|
|||||||
box: [
|
box: [
|
||||||
'radio',
|
'radio',
|
||||||
'checkbox'
|
'checkbox'
|
||||||
|
],
|
||||||
|
textarea: [
|
||||||
|
'textarea'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user