Commit 791b323dbd30acd7fabfe9c3fb6e528916311ffd

Authored by 无木
1 parent 49f39de7

fix(table): param of `handleSearchInfoFn`

修复`handleSearchInfoFn`的参数会有多余的空白键
CHANGELOG.zh_CN.md
@@ -10,9 +10,9 @@ @@ -10,9 +10,9 @@
10 10
11 ### 🐛 Bug Fixes 11 ### 🐛 Bug Fixes
12 12
13 -- **Modal** 修复点击遮罩不能关闭  
14 -- **Table** 修复 `editComponentProps` 不支持 `onChange`  
15 -- **Modal** 修复 `setModalProps` 不支持设置 `defaultFullscreen` 13 +- **Modal** 修复点击遮罩不能关闭的问题
  14 +- **Table** 修复 `editComponentProps` 不支持 `onChange`的问题
  15 +- **Modal** 修复 `setModalProps` 不支持设置 `defaultFullscreen` 的问题
16 - **Sider** 修复侧边菜单底部的折叠自定义失效的问题 16 - **Sider** 修复侧边菜单底部的折叠自定义失效的问题
17 - **Table** 修复为 table 提供 rowSelection.onChange 时,无法手动变更 table 的选中项的问题 17 - **Table** 修复为 table 提供 rowSelection.onChange 时,无法手动变更 table 的选中项的问题
18 - **Icon** 修复 SvgIcon 缺少部分样式的问题 18 - **Icon** 修复 SvgIcon 缺少部分样式的问题
@@ -24,6 +24,8 @@ @@ -24,6 +24,8 @@
24 - **Table** 修复全局配置`fetchSetting`可能会被局部配置意外修改的问题 24 - **Table** 修复全局配置`fetchSetting`可能会被局部配置意外修改的问题
25 - **Form** 修复`submitButtonOptions`和`resetButtonOptions`的类型定义 25 - **Form** 修复`submitButtonOptions`和`resetButtonOptions`的类型定义
26 - **PopconfirmButton** 移除`Button`上多余的`title` 26 - **PopconfirmButton** 移除`Button`上多余的`title`
  27 +- **Axios** 修复非`GET`请求时,无法同时提交`params`和`data`数据的问题
  28 +- **Table** 修复`handleSearchInfoFn`的参数包含多余空白键的问题
27 29
28 ## 2.5.2(2021-06-27) 30 ## 2.5.2(2021-06-27)
29 31
src/components/Form/src/hooks/useFormValues.ts
@@ -26,7 +26,7 @@ export function useFormValues({ @@ -26,7 +26,7 @@ export function useFormValues({
26 for (const item of Object.entries(values)) { 26 for (const item of Object.entries(values)) {
27 let [, value] = item; 27 let [, value] = item;
28 const [key] = item; 28 const [key] = item;
29 - if ((isArray(value) && value.length === 0) || isFunction(value)) { 29 + if (!key || (isArray(value) && value.length === 0) || isFunction(value)) {
30 continue; 30 continue;
31 } 31 }
32 const transformDateFunc = unref(getProps).transformDateFunc; 32 const transformDateFunc = unref(getProps).transformDateFunc;
src/views/demo/system/account/index.vue
@@ -63,10 +63,15 @@ @@ -63,10 +63,15 @@
63 formConfig: { 63 formConfig: {
64 labelWidth: 120, 64 labelWidth: 120,
65 schemas: searchFormSchema, 65 schemas: searchFormSchema,
  66 + autoSubmitOnEnter: true,
66 }, 67 },
67 useSearchForm: true, 68 useSearchForm: true,
68 showTableSetting: true, 69 showTableSetting: true,
69 bordered: true, 70 bordered: true,
  71 + handleSearchInfoFn(info) {
  72 + console.log('handleSearchInfoFn', info);
  73 + return info;
  74 + },
70 actionColumn: { 75 actionColumn: {
71 width: 120, 76 width: 120,
72 title: '操作', 77 title: '操作',