|
@@ -126,6 +126,7 @@ const GameSmallList=({data,user})=>{
|
|
|
let gap=0;
|
|
let gap=0;
|
|
|
if (gridList.children&&gridList.children.length>0){
|
|
if (gridList.children&&gridList.children.length>0){
|
|
|
let first=gridList.children[0];
|
|
let first=gridList.children[0];
|
|
|
|
|
+ if (first&&first.children.length>0)first=first.children[0];
|
|
|
let cB=rect.top+first.clientHeight;
|
|
let cB=rect.top+first.clientHeight;
|
|
|
let cH = document.documentElement.clientHeight;
|
|
let cH = document.documentElement.clientHeight;
|
|
|
if (cH-cB>90){
|
|
if (cH-cB>90){
|
|
@@ -308,7 +309,7 @@ const GameSmallList=({data,user})=>{
|
|
|
{
|
|
{
|
|
|
list.map((item, index) => {
|
|
list.map((item, index) => {
|
|
|
let gridNum=item.gridNum!=null?item.gridNum:1;
|
|
let gridNum=item.gridNum!=null?item.gridNum:1;
|
|
|
- gridNum=Math.floor(Math.random()*3)+1;
|
|
|
|
|
|
|
+ // gridNum=Math.floor(Math.random()*3)+1;
|
|
|
let whStyle=gridInfo[gridNum];
|
|
let whStyle=gridInfo[gridNum];
|
|
|
if (whStyle==null)return (<></>);
|
|
if (whStyle==null)return (<></>);
|
|
|
return (
|
|
return (
|
|
@@ -339,18 +340,17 @@ const GameSmallList=({data,user})=>{
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- if (len<5){
|
|
|
|
|
|
|
+ if (len<=3){
|
|
|
gridStyle.paddingBottom=`${roomHeight+rowGap}rem`;
|
|
gridStyle.paddingBottom=`${roomHeight+rowGap}rem`;
|
|
|
}
|
|
}
|
|
|
- else gridStyle.rowGap=`${rowTop}rem`;
|
|
|
|
|
|
|
+ else gridStyle.gap=`${rowTop}rem`;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
let rowlist=formatMList(list);
|
|
let rowlist=formatMList(list);
|
|
|
- console.log(rowlist);
|
|
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
|
- <div className={`${styles.grid_list_m}`} ref={gridListMRef} style={gridStyle}>
|
|
|
|
|
- <div className={styles.grid_row_con}>
|
|
|
|
|
|
|
+ <div className={`${styles.grid_list_m}`} ref={gridListMRef}>
|
|
|
|
|
+ <div className={styles.grid_row_con} style={gridStyle}>
|
|
|
{
|
|
{
|
|
|
rowlist.map((ritem,rindex)=>{
|
|
rowlist.map((ritem,rindex)=>{
|
|
|
if (ritem==null)return (<></>);
|
|
if (ritem==null)return (<></>);
|
|
@@ -370,7 +370,7 @@ const GameSmallList=({data,user})=>{
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
let gridNum=item.gridNum!=null?item.gridNum:1;
|
|
let gridNum=item.gridNum!=null?item.gridNum:1;
|
|
|
- gridNum=Math.floor(Math.random()*3)+1;
|
|
|
|
|
|
|
+ // gridNum=Math.floor(Math.random()*3)+1;
|
|
|
let whStyle=gridInfo[gridNum];
|
|
let whStyle=gridInfo[gridNum];
|
|
|
if (whStyle==null)return (<></>);
|
|
if (whStyle==null)return (<></>);
|
|
|
return (
|
|
return (
|