Commit 8f76ef4e70de58ba5c4497d8b10a036a54a9ac87
1 parent
e6960896
fix(form): allow the setFieldsValue method to be null or undefined close #320
Showing
3 changed files
with
5 additions
and
2 deletions
CHANGELOG.zh_CN.md
src/components/Form/src/hooks/useFormEvents.ts
... | ... | @@ -59,9 +59,11 @@ export function useFormEvents({ |
59 | 59 | const schema = unref(getSchema).find((item) => item.field === key); |
60 | 60 | let value = values[key]; |
61 | 61 | |
62 | + const hasKey = Reflect.has(values, key); | |
63 | + | |
62 | 64 | value = handleInputNumberValue(schema?.component, value); |
63 | 65 | // 0| '' is allow |
64 | - if (value !== undefined && value !== null && fields.includes(key)) { | |
66 | + if (hasKey && fields.includes(key)) { | |
65 | 67 | // time type |
66 | 68 | if (itemIsDateType(key)) { |
67 | 69 | if (Array.isArray(value)) { | ... | ... |
src/layouts/default/header/components/Breadcrumb.vue
... | ... | @@ -91,7 +91,7 @@ |
91 | 91 | return true; |
92 | 92 | }).filter((item) => !item.meta?.hideBreadcrumb || !item.meta?.hideMenu); |
93 | 93 | |
94 | - resultList = resultList.filter((item) => item.path !== PageEnum.BASE_HOME); | |
94 | + // resultList = resultList.filter((item) => item.path !== PageEnum.BASE_HOME); | |
95 | 95 | return resultList; |
96 | 96 | } |
97 | 97 | ... | ... |