components
Provide locally registered components
<template>
<vue-form-json-schema
v-model="model"
:schema="schema"
:ui-schema="uiSchema"
:components="$options.components"
/>
</template>
<script>
import MyComponent from "./MyComponent"
export default {
components: {
"my-component": MyComponent
},
data() {
return {
model: {
firstName: "John",
},
schema: {
type: 'object',
properties: {
firstName: 'string'
}
},
uiSchema: [{
component: "my-component",
model: 'firstName',
fieldOptions: {
on: ['input']
}
}]
}
}
}
</script>Use components directly without registering them
Last updated