浏览代码

Merge branch 'master' of http://192.168.1.41:3000/outaozhen/cldV2react

outaozhen 5 年之前
父节点
当前提交
76edf1accd
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/pages/Customer/Contact/components/CustomerModal/index.jsx

+ 4 - 2
src/pages/Customer/Contact/components/CustomerModal/index.jsx

@@ -34,7 +34,7 @@ const SearchModal = ({ clientId, onSelect }) => {
           customer: state.customer.concat(customer),
           total,
           laoding: false,
-          pageSize: params?.pageSize || 1
+          current: params?.current || 1
         })
       }
     }
@@ -86,7 +86,9 @@ const SearchModal = ({ clientId, onSelect }) => {
       scrollRef.current.scrollTop
     ) {
       // 已到底部
-      initData({ current: state.current + 1, pageSize: state.pageSize })
+
+      state.current * state.pageSize < state.total &&
+        initData({ current: state.current + 1, pageSize: state.pageSize })
     }
   }
   // const { run: listScroller } = useThrottleFn(handleListScroll)