openfext / vue-form-builder

Build powerful vue form with JSON schema and composition api.
https://openfext.github.io/vue-form-builder
MIT License
386 stars 45 forks source link

Init with formValues #10

Closed Themesaul closed 4 years ago

Themesaul commented 4 years ago

When I pass in v-model formValues with values the library empties them. I would like to be able to pass formValues with data. I have used the input event to make this mechanism, but I think the library should admit it.

felixpy commented 4 years ago

Sorry for late response, can you provide some example code?

Zeppelinsaikou commented 4 years ago

`export default { name: 'ElFormBuilder',

props: { model: { type: Object, default () { return {} } }, ... ` 这里应该使用value字段接收而不是model,v-model指令的默认接受字段是value。 所以因为一直接收不到默认值,就会清空用户传入的默认值。