mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-04-01 19:53:24 +08:00
fix: 为时间范围选择器设置默认值为null以修复表单重置问题
修复多个查询表单中时间范围选择器在表单重置时无法正常清空的问题。 为所有使用RangePicker的查询表单字段添加defaultValue: [null, null], 确保调用formReset时能正确重置时间选择器状态。
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
- Switch的value只能是boolean值 之前可以为 string/number/boolean (antd组件变化)
|
- Switch的value只能是boolean值 之前可以为 string/number/boolean (antd组件变化)
|
||||||
- Popconfirm不再需要 `:get-popup-container="getVxePopupContainer"` antd已经支持滚动跟随 故`getVxePopupContainer`已经移除
|
- Popconfirm不再需要 `:get-popup-container="getVxePopupContainer"` antd已经支持滚动跟随 故`getVxePopupContainer`已经移除
|
||||||
- 离线(菜单)图标方案重构 在`scripts/generate-offline-icons.js`添加图标名称 在根目录执行`pnpm generate-offline-icons`即可生成离线图标
|
- 离线(菜单)图标方案重构 在`scripts/generate-offline-icons.js`添加图标名称 在根目录执行`pnpm generate-offline-icons`即可生成离线图标
|
||||||
|
- 表格上方搜索表单(或者需要调用formReset的场景) -> 时间相关组件必须设置`defaultValue`为`null`(区间时间组件需要设置为[null, null]的元组) **否则不会正常重置**
|
||||||
|
|
||||||
## 已知问题
|
## 已知问题
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
fieldName: 'dateTime',
|
fieldName: 'dateTime',
|
||||||
label: '登录日期',
|
label: '登录日期',
|
||||||
|
defaultValue: [null, null],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
|
defaultValue: [null, null],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
|
defaultValue: [null, null],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
|
defaultValue: [null, null],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
|
defaultValue: [null, null],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
|
defaultValue: [null, null],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
|
defaultValue: [null, null],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user