Skip to content

Commit

Permalink
fix(lib): 修复默认schema生成formData和默认值相等时导致可能不能及时更新的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lljj-x committed Nov 24, 2020
1 parent 323889e commit 590e37d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/lib/src/JsonSchemaForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ export default {
data() {
const formData = this.getStateFromData(this.$props.schema, this.$props.value);

// 计算form默认值和用户传入的值不相等
// 保持v-model双向数据及时性
if (!deepEquals(formData, this.value)) {
this.handlerFormDataChange(formData, this.value);
}
this.handlerFormDataChange(formData, this.value);

return {
formData
Expand Down

0 comments on commit 590e37d

Please sign in to comment.