div.input
v-text-field(
v-if="schema.type==='string' || schema.type==='text'"
:label="schema.title"
:hint="schema.description"
persistent-hint
:required="required"
v-model="local"
:rules='[rules.required,rules.schema]'
:id='id' :data-vv-name='id'
:textarea="schema.maxLength>'5001'"
:data-path="path"
@update:error="setValid"
auto-grow
:counter="schema.maxLength"
)
v-checkbox(
v-if="schema.type==='boolean'"
:label="schema.title"
:hint="schema.description"
persistent-hint
:required="required"
v-model="local"
:rules='[rules.required,rules.schema]'
:data-path="path"
@update:error="setValid"
)
div(v-if="schema.type==='array'")
.subheading {{schema.title}}
span {{schema.description}}
ul.pl-3
li(v-for="(item,index) in value" :key="index")
schema-input(
:ref="index"
:schema="schema.items"
v-model="value[index]"
:index="index"
:required="index===0"
:name="name"
:path="path+'['+index+']'"
style="display:inline-block;width:80%;"
@update:valid="isValid"
)
v-btn.delete(icon @click.native='remove(index)'
:id="path+'-remove-'+index"
tabindex='-1')
v-icon delete
v-btn.block(@click.native='add' tabindex='-1'
:id="path+'-add'"
) Add {{singularTitle}}
div(v-if="schema.type==='object'")
.subheading {{schema.title}}
span {{schema.description}}
ul
li(v-for="(property,index) in properties" :key="index")
schema-input(
:ref="property.name"
:required="ifRequired(property.name)"
:schema="property"
:name="property.name"
v-model="value[property.name]"
:path="path+'.'+property.name"
@update:valid="isValid"
style="margin-left:5%;"
)