Skip to content

Commit

Permalink
fix: 修复默认值的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Aug 5, 2021
1 parent ac70016 commit f8de8f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/fast-crud/src/components/crud/fs-form.vue
Expand Up @@ -233,13 +233,13 @@ export default {
// 初始数据赋值
_.each(computedColumns.value, (item, key) => {
form[key] = undefined;
if (initialForm[key] !== undefined) {
form[key] = initialForm[key];
}
const defValue = unref(item.value);
if (defValue !== undefined) {
form[key] = defValue;
}
if (initialForm && initialForm[key] !== undefined) {
form[key] = initialForm[key];
}
});
//form.valueBuilder
_.each(computedColumns.value, (item, key) => {
Expand Down

0 comments on commit f8de8f6

Please sign in to comment.