Add IsDisabled prop to FormField component

This commit is contained in:
Bubka 2022-07-07 11:46:25 +02:00
parent 23ddb3b054
commit 4a69bdb615

View File

@ -2,7 +2,7 @@
<div class="field" :class="{ 'with-offset' : hasOffset }">
<label class="label" v-html="label"></label>
<div class="control">
<input :id="fieldName" :type="inputType" class="input" v-model="form[fieldName]" :placeholder="placeholder" v-bind="$attrs" />
<input :disabled="isDisabled" :id="fieldName" :type="inputType" class="input" v-model="form[fieldName]" :placeholder="placeholder" v-bind="$attrs" />
</div>
<field-error :form="form" :field="fieldName" />
<p class="help" v-html="help" v-if="help"></p>
@ -55,6 +55,11 @@
hasOffset: {
type: Boolean,
default: false
},
isDisabled: {
type: Boolean,
default: false
}
}
}