2022-09-20 19:59:52 +00:00
|
|
|
<template>
|
|
|
|
<div :class="wrapperClass">
|
|
|
|
<label v-if="label" :for="id?id:name"
|
|
|
|
:class="[theme.default.label, {'uppercase text-xs':uppercaseLabels, 'text-sm':!uppercaseLabels}]"
|
|
|
|
>
|
|
|
|
{{ label }}
|
|
|
|
<span v-if="required" class="text-red-500 required-dot">*</span>
|
|
|
|
</label>
|
|
|
|
<textarea :id="id?id:name" v-model="compVal" :disabled="disabled"
|
|
|
|
:class="[theme.default.input,{ 'ring-red-500 ring-2': hasValidation && form.errors.has(name) }]"
|
|
|
|
class="resize-y"
|
|
|
|
:name="name" :style="inputStyle"
|
|
|
|
:placeholder="placeholder"
|
|
|
|
/>
|
|
|
|
<small v-if="help" :class="theme.default.help">
|
|
|
|
<slot name="help">{{ help }}</slot>
|
|
|
|
</small>
|
|
|
|
<has-error v-if="hasValidation" :form="form" :field="name" />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-01-21 11:57:37 +00:00
|
|
|
import inputMixin from '~/mixins/forms/input.js'
|
2022-09-20 19:59:52 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'TextAreaInput',
|
|
|
|
mixins: [inputMixin]
|
|
|
|
}
|
|
|
|
</script>
|