lanjianrong пре 4 година
родитељ
комит
bf14181432

+ 1 - 1
src/pages/Customer/Company/components/ConnectCompany/index.less

@@ -2,7 +2,7 @@
   width: 95%;
 }
 .modalContainer {
-  // height: 50vh;
+  // height: 63vh;
   .modalContent {
     max-height: 63vh;
     padding: 0;

+ 8 - 30
src/pages/Product/Lock/LockStore/components/LockDetail/OpreateLock.jsx

@@ -30,17 +30,7 @@ const placeholderEnum = {
 }
 
 const OpreateLock = props => {
-  const {
-    onConfirm,
-    onCancel,
-    loading,
-    type,
-    longleId,
-    keyNum,
-    prodList,
-    upgradeProduct,
-    ...resetModalProps
-  } = props
+  const { onConfirm, onCancel, loading, type, longleId, keyNum, prodList, upgradeProduct, ...resetModalProps } = props
   const [form] = Form.useForm()
   const dispatch = useDispatch()
   const scrollRef = useRef()
@@ -226,10 +216,7 @@ const OpreateLock = props => {
 
   const handleListScroll = () => {
     // 未滚动到底部
-    if (
-      scrollRef.current.scrollHeight - scrollRef.current.clientHeight <=
-      scrollRef.current.scrollTop
-    ) {
+    if (scrollRef.current.scrollHeight - scrollRef.current.clientHeight <= scrollRef.current.scrollTop) {
       // 已到底部
       if (state.current * state.pageSize > state.total) {
         setState({ ...state, noMore: true })
@@ -271,8 +258,7 @@ const OpreateLock = props => {
             </Button>
           </div>
         )
-      }
-    >
+      }>
       {type === lockTypeEnum.SALE ? (
         <div className="text-center mb-6">
           <Radio.Group value={state.sellStatus} buttonStyle="solid" onChange={checkGroupOnChange}>
@@ -283,13 +269,8 @@ const OpreateLock = props => {
         </div>
       ) : null}
       {type === lockTypeEnum.CHANGE || type === lockTypeEnum.SALE ? (
-        <div
-          className={styles.modalContainer}
-          ref={scrollRef}
-          onScroll={handleListScroll}
-          style={{ paddingBottom: 0 }}
-        >
-          <div className={styles.modalContent}>
+        <div className={styles.modalContainer} style={{ paddingBottom: 0 }}>
+          <div className={styles.modalContent} ref={scrollRef} onScroll={handleListScroll}>
             <Spin spinning={state.loading}>
               {type === lockTypeEnum.SALE &&
                 state.client.map((item, index) => (
@@ -303,8 +284,7 @@ const OpreateLock = props => {
                         title="确认选择ta"
                         onConfirm={() => connectClient(item.id)}
                         okText="确认"
-                        cancelText="取消"
-                      >
+                        cancelText="取消">
                         <Button type="primary" size="small">
                           选择ta
                         </Button>
@@ -322,8 +302,7 @@ const OpreateLock = props => {
                         title="确认选择ta"
                         onConfirm={() => connectLongle(item.id)}
                         okText="确认"
-                        cancelText="取消"
-                      >
+                        cancelText="取消">
                         <Button type="primary" size="small">
                           更换
                         </Button>
@@ -356,8 +335,7 @@ const OpreateLock = props => {
                   return Promise.resolve(value)
                 }
               })
-            ]}
-          >
+            ]}>
             <Select
               placeholder="请选择产品"
               onDropdownVisibleChange={async e => {