Commit 916b9c45 authored by Jeanphilippe, Maxavier's avatar Jeanphilippe, Maxavier
Browse files

Upload New File

parent 771d3bef
Loading
Loading
Loading
Loading
+75 −0
Original line number Diff line number Diff line
const model = {}

const options =  {}

const schema = {
	type: 'object',
	'x-display': 'tabs',
	'x-props': {
		grow: true
	},
	description: 'I\'m an object with sections rendered as tabs.',
	allOf: [
		{
			title: 'I\'m a section',
			description: 'I\'m a description shown as a paragraph on top of section',
			type: 'object',
			properties: {
				stringProp1: {
					type: 'string',
					title: 'I\'m a property in section 1'
				}
			}
		},
		{
			title: 'I\'m another section',
			type: 'object',
			oneOf: [
				{
					properties: {
						key: {
							type: 'string',
							const: 'type1',
							title: 'type 1'
						},
						stringProp2: {
							type: 'string',
							title: 'I\'m a property in section 2 / type 1'
						}
					}
				},
				{
					properties: {
						key: {
							type: 'string',
							const: 'type2',
							title: 'type 2'
						},
						stringProp3: {
							type: 'string',
							title: 'I\'m a property in section 2 / type 2'
						}
					}
				}
			]
		}
	]
}

Vue.component('VJsf', VJsf.default)

new Vue({
  el: '#app',
  vuetify: new Vuetify(),
  data: {
    model,
    options,
    schema,
    valid: null
  },
  methods: {
    logEvent(key, $event) {
      console.log('vjsf event', key, $event)
    }
  }
})
 No newline at end of file