Parcourir la source

fix: perlabel组件内存溢出的问题

lanjianrong il y a 5 ans
Parent
commit
4feac262b2

+ 0 - 1
src/components/Modal/src/BasicDrawer.jsx

@@ -30,6 +30,5 @@ const BasicDrawer = props => {
 
 export default connect(({ single }) => ({
   visible: single.drawer.visible,
-  drawer: single.drawer,
   config: single.drawer.config
 }))(BasicDrawer)

+ 0 - 1
src/components/Modal/src/BasicModal.jsx

@@ -19,6 +19,5 @@ const BasicModal = props => {
 
 export default connect(({ single }) => ({
   visible: single.modal.visible,
-  modal: single.modal,
   config: single.modal.config
 }))(BasicModal)

+ 0 - 2
src/hooks/useAutoTable.js

@@ -72,8 +72,6 @@ export function useTableScroll(columnsRef, selectKeysRef) {
         // TODO First fix 24
         paginationHeight += 24
       }
-    } else {
-      paginationHeight = -32
     }
 
     let footerHeight = 0

+ 8 - 4
src/pages/Customer/Company/components/PersonLabel/index.jsx

@@ -47,10 +47,11 @@ const PersonLabel = props => {
 
   const [checkedIds, setCheckedIds] = useState([])
   useEffect(() => {
+    // console.log('111')
     if (modeType === LabelModeType.column) {
       setCheckedIds(tagIds)
     }
-  }, [tagIds, dataId])
+  }, [])
 
   const [showOkBtn, setShowOkBtn] = useState(false)
   const initData = () => {
@@ -102,9 +103,12 @@ const PersonLabel = props => {
             ) : null}
           </div>
         ) : (
-          <>
-            <Button onClick={() => setDropdownType(DropdownTypeEnum.check)}>返回</Button>
-          </>
+          <Button
+            size="small"
+            className="ml-5px"
+            onClick={() => setDropdownType(DropdownTypeEnum.check)}>
+            返回
+          </Button>
         )}
       </div>
     </div>

+ 1 - 1
src/pages/Customer/Company/components/PersonLabel/index.scss

@@ -1,6 +1,6 @@
 .dropdownMenu {
   :global(.ant-popover-inner-content) {
-    padding: 0;
+    padding: 5px;
   }
 }
 .labelContent {