Browse Source

fix(table): global configuration accidentally modified

修复table的全局配置可能被意外修改的问题
无木 3 years ago
parent
commit
b4a3f936cd
2 changed files with 2 additions and 0 deletions
  1. 1 0
      CHANGELOG.zh_CN.md
  2. 1 0
      src/components/Table/src/hooks/useDataSource.ts

+ 1 - 0
CHANGELOG.zh_CN.md

@@ -18,6 +18,7 @@
 - **Menu** 修复路由映射模式下,单级菜单刷新不会激活
 - 修复`ROLE`权限模式下`hasPermission`不工作的问题
 - **Table** 修复启用`clickToRowSelect`时,点击行不会触发`selection-change`事件的问题
+- **Table** 修复全局配置`fetchSetting`可能会被局部配置意外修改的问题
 
 ## 2.5.2(2021-06-27)
 

+ 1 - 0
src/components/Table/src/hooks/useDataSource.ts

@@ -176,6 +176,7 @@ export function useDataSource(
     try {
       setLoading(true);
       const { pageField, sizeField, listField, totalField } = Object.assign(
+        {},
         FETCH_SETTING,
         fetchSetting
       );