feat: return itemOldValue on change event

re #135
This commit is contained in:
daniel.xiao
2020-05-01 23:20:30 +08:00
parent 9e37f3f6d2
commit d229aa4481
2 changed files with 4 additions and 2 deletions
@@ -137,10 +137,11 @@
changeModel(formSchema) {
formSchema.value = { user: { name: 'daniel' } };
},
onChange({paths, itemValue, formValue}) {
onChange({paths, itemValue, formValue, itemOldValue}) {
console.log('paths:', paths);
console.log('itemValue:', itemValue);
console.log('formValue:', JSON.stringify(formValue, null, 2));
console.log('itemOldValue', itemOldValue);
}
}
});
@@ -282,7 +282,8 @@ export default {
formVM.$emit('change', {
paths: this.paths,
itemValue: this.schema.value,
formValue: this.formData
formValue: this.formData,
itemOldValue: this.$data.itemValue
})
}