diff --git a/packages/ncform/examples/components/vue-ncform/_others.html b/packages/ncform/examples/components/vue-ncform/_others.html index ea648de..ed430a9 100644 --- a/packages/ncform/examples/components/vue-ncform/_others.html +++ b/packages/ncform/examples/components/vue-ncform/_others.html @@ -12,14 +12,17 @@ @@ -125,6 +128,56 @@ } } }, + { + id: md5('change paths'), + title: 'change paths', + isFormDirty: false, + formName: 'form_' + Math.random(), + formSchema: { + type: 'object', + properties: { + user: { + type: 'object', + properties: { + name: { + type: 'string' + } + } + }, + names: { + type: 'array', + items: { + type: 'string', + }, + ui: { + widgetConfig: { + showOneIfEmpty: true + } + } + }, + users: { + type: 'array', + items: { + type: 'object', + properties: { + firstname: { + type: 'string' + }, + lastname: { + type: 'string' + } + } + }, + ui: { + widgetConfig: { + showOneIfEmpty: true + } + } + + } + } + } + }, ] }, methods: { @@ -137,7 +190,7 @@ changeModel(formSchema) { formSchema.value = { user: { name: 'daniel' } }; }, - onChange({paths, itemValue, formValue, itemOldValue}) { + onChange({ paths, itemValue, formValue, itemOldValue }) { console.log('paths:', paths); console.log('itemValue:', itemValue); console.log('formValue:', JSON.stringify(formValue, null, 2)); diff --git a/packages/ncform/src/components/vue-ncform/form-item.vue b/packages/ncform/src/components/vue-ncform/form-item.vue index 54cfe1b..e7cab45 100755 --- a/packages/ncform/src/components/vue-ncform/form-item.vue +++ b/packages/ncform/src/components/vue-ncform/form-item.vue @@ -15,7 +15,7 @@