Przeglądaj źródła

游戏列表修复,桌面弹窗修复

zhejiushizhuce 2 lat temu
rodzic
commit
8034b73ab0

+ 6 - 2
src/components/GameList/index.jsx

@@ -289,6 +289,7 @@ const GameList=({data,status,reqMore,user})=>{
         )
     }
     const renderShowMore=()=>{
+        let isNomore=Number(data.page)===Number(data.totalPage);
         let moreStyle={};
         if (roomRow&&roomRow.row!=null){
             let row=roomRow.row;
@@ -297,6 +298,10 @@ const GameList=({data,status,reqMore,user})=>{
                 moreStyle.marginBottom=rowTop+"rem";
             }
         }
+        if (isNomore){
+            if (isMobile()) return (<div className={`${styles.page_con} ${styles.page_nomore}`} style={moreStyle}></div>)
+            else return (<></>);
+        }
         return (
             <div className={styles.page_con} style={moreStyle}>
                 {renderProgress()}
@@ -304,11 +309,10 @@ const GameList=({data,status,reqMore,user})=>{
             </div>
         )
     }
-    let isNomore=Number(data.page)===Number(data.totalPage);
     return (
         <div className={`w-100 ${styles.list_container}`}>
             {renderGameList()}
-            {isNomore?null:renderShowMore()}
+            {renderShowMore()}
         </div>
     )
 }

+ 3 - 0
src/components/GameList/styles.module.scss

@@ -24,6 +24,9 @@
       margin-bottom: .75rem;
     }
   }
+  & .page_nomore{
+    margin-top: -0.75rem;
+  }
   & .page_con{
     display: flex;
     flex-direction: column;

+ 2 - 2
src/components/Popup.jsx

@@ -15,7 +15,7 @@ const Popup = ({open, onClose, children, popupClass}) => {
         <Modal open={open} onClose={onClose} closeAfterTransition>
             <Fade in={open} timeout={500}>
                 <div className="popup-container">
-                    <ClickAwayListener onClickAway={onClose}>
+                    {/*<ClickAwayListener onClickAway={onClose}>*/}
                         <Grow in={open} timeout={500}>
                             <div className={`${popupClass || ''} popup card card-padded`} style={{minHeight: 'unset'}}>
                                 <button className="popup_close" onClick={onClose} aria-label="Close popup">
@@ -24,7 +24,7 @@ const Popup = ({open, onClose, children, popupClass}) => {
                                 {children}
                             </div>
                         </Grow>
-                    </ClickAwayListener>
+                    {/*</ClickAwayListener>*/}
                 </div>
             </Fade>
         </Modal>

+ 9 - 4
src/layout/Routes/RouteContainer.jsx

@@ -4,6 +4,7 @@ import Popup from "@components/Popup";
 import SubScreen from "@components/SubScreen";
 import {useNavigate} from "react-router-dom";
 import {useThemeProvider} from "@contexts/themeContext";
+import CSSTransition from "react-transition-group/CSSTransition";
 
 const RouteContainer=(props)=>{
     const { children, route,open} = props;
@@ -18,9 +19,11 @@ const RouteContainer=(props)=>{
     }
     const renderPop=()=>{
         return(
-            <Popup {...props} popupClass={`${isMobile()?'':'popup-big'}`}>
-                {children}
-            </Popup>
+            <CSSTransition {...props} timeout={500}>
+                <Popup {...props} popupClass={`${isMobile()?'':'popup-big'}`}>
+                    {children}
+                </Popup>
+            </CSSTransition>
         )
     }
     const renderSub=()=>{
@@ -42,7 +45,9 @@ const RouteContainer=(props)=>{
     const renderCustom=()=>{
         return (
             <>
-                {children}
+                <CSSTransition {...props} timeout={500}>
+                    {children}
+                </CSSTransition>
             </>
         );
     }

+ 2 - 1
src/styles/_elements.scss

@@ -480,13 +480,14 @@ a {
     width: 100%;
     position: relative;
     max-height: calc(100vh - 80px);
-
+    pointer-events: auto;
     &-container {
         display: flex;
         align-items: center;
         justify-content: center;
         height: 100%;
         padding: 20px;
+        pointer-events: none;
     }
 
     &_close {

+ 1 - 0
src/styles/_global.scss

@@ -90,6 +90,7 @@ body {
 }
 .app-top{
     position: fixed;
+    //position: absolute;
     inset: 0px;
     z-index: var(--zindex-in);
     transition: transform var(--transition),opacity var(--transition);

+ 1 - 1
src/widgets/WWithdraw/WWithdrawRecord/styles.module.scss

@@ -1,6 +1,6 @@
 .container{
   width: 100%;
-  height: 100%;
+  min-height: 100%;
   background-color: var(--widget-bg);
   padding: 1rem 1rem;
 }