mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-01-23 09:40:22 +08:00
fix(form): allow the setFieldsValue method to be null or undefined close #320
This commit is contained in:
parent
e696089660
commit
8f76ef4e70
@ -11,6 +11,7 @@
|
||||
- 修复`BasicTree`下 ActionItem 的 show 属性逻辑问题
|
||||
- 修复树组件 demo 示例样式错误
|
||||
- 修复账号管理新增未清空旧数据
|
||||
- form 组件应允许 setFieldsValue 方法值为 null 或者 undefined
|
||||
|
||||
## 2.0.2 (2021-03-04)
|
||||
|
||||
|
@ -59,9 +59,11 @@ export function useFormEvents({
|
||||
const schema = unref(getSchema).find((item) => item.field === key);
|
||||
let value = values[key];
|
||||
|
||||
const hasKey = Reflect.has(values, key);
|
||||
|
||||
value = handleInputNumberValue(schema?.component, value);
|
||||
// 0| '' is allow
|
||||
if (value !== undefined && value !== null && fields.includes(key)) {
|
||||
if (hasKey && fields.includes(key)) {
|
||||
// time type
|
||||
if (itemIsDateType(key)) {
|
||||
if (Array.isArray(value)) {
|
||||
|
@ -91,7 +91,7 @@
|
||||
return true;
|
||||
}).filter((item) => !item.meta?.hideBreadcrumb || !item.meta?.hideMenu);
|
||||
|
||||
resultList = resultList.filter((item) => item.path !== PageEnum.BASE_HOME);
|
||||
// resultList = resultList.filter((item) => item.path !== PageEnum.BASE_HOME);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user