Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bkunyun
Commits
ea845316
Commit
ea845316
authored
Sep 13, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表格相关最小高度调整
parent
af42433b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
MyTableNew.tsx
src/components/mui/MyTableNew.tsx
+15
-5
No files found.
src/components/mui/MyTableNew.tsx
View file @
ea845316
...
...
@@ -120,7 +120,7 @@ const MyTable = (props: IMyTableProps) => {
MuiPaper
:
{
styleOverrides
:
{
root
:
{
minHeight
:
"200px"
,
//
minHeight: "200px",
position
:
"relative"
,
"&.MuiTableContainer-root"
:
{
boxShadow
:
"none"
,
...
...
@@ -142,6 +142,7 @@ const MyTable = (props: IMyTableProps) => {
MuiTableBody
:
{
styleOverrides
:
{
root
:
{
minHeight
:
"200px"
,
position
:
"relative"
,
"& .MuiTableRow-root:nth-last-of-type(1) .MuiTableCell-root"
:
{
// 有分页的话 表格最后一行就不要下边框
...
...
@@ -316,7 +317,13 @@ const MyTable = (props: IMyTableProps) => {
const
randerTableBody
=
useMemo
(()
=>
{
if
(
rows
.
length
===
0
)
{
if
(
loading
)
{
return
null
;
return
(
<
tbody
>
<
tr
>
<
td
></
td
>
</
tr
>
</
tbody
>
);
}
return
(
<
tbody
>
...
...
@@ -437,7 +444,7 @@ const MyTable = (props: IMyTableProps) => {
<
ThemeProvider
theme=
{
theme
}
>
{
!
fixedHead
&&
(
<>
<
TableContainer
component=
{
Paper
}
>
<
TableContainer
component=
{
Paper
}
sx=
{
{
minHeight
:
"200px"
}
}
>
{
randerCircularProgress
}
<
Table
>
{
randerTableHead
}
...
...
@@ -456,10 +463,13 @@ const MyTable = (props: IMyTableProps) => {
position
:
"relative"
,
}
}
>
<
TableContainer
component=
{
Paper
}
>
<
TableContainer
component=
{
Paper
}
sx=
{
{
minHeight
:
"45px"
}
}
>
<
Table
>
{
randerTableHead
}
</
Table
>
</
TableContainer
>
<
TableContainer
component=
{
Paper
}
sx=
{
{
flex
:
1
}
}
>
<
TableContainer
component=
{
Paper
}
sx=
{
{
flex
:
1
,
minHeight
:
"200px"
}
}
>
<
Table
>
{
randerTableBody
}
</
Table
>
</
TableContainer
>
{
randerTableFooter
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment