Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
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
ReactWeb5
wisdom-components
Commits
dcf8ae65
Commit
dcf8ae65
authored
Apr 08, 2021
by
涂茜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update table
parent
a834a2fe
Pipeline
#25681
passed with stages
in 4 minutes 11 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
17 deletions
+21
-17
Basic.tsx
packages/BasicTable/src/demos/Basic.tsx
+1
-1
index.js
packages/BasicTable/src/index.js
+1
-1
index.less
packages/BasicTable/src/index.less
+19
-15
No files found.
packages/BasicTable/src/demos/Basic.tsx
View file @
dcf8ae65
...
...
@@ -45,7 +45,7 @@ const Demo = () => {
return
(
<
div
style=
{
{
height
:
'400px'
}
}
>
{
!!
dataSource
.
length
&&
(
<
BasicTable
dataSource=
{
dataSource
}
columns=
{
columns
}
scroll=
{
{
y
:
294
}
}
/>
<
BasicTable
dataSource=
{
dataSource
}
columns=
{
columns
}
bordered=
{
true
}
/>
)
}
{
!
dataSource
.
length
&&
<
Empty
description=
{
'暂无数据'
}
/>
}
</
div
>
...
...
packages/BasicTable/src/index.js
View file @
dcf8ae65
...
...
@@ -8,7 +8,7 @@ const BasicTable = (props) => {
const
{
getPrefixCls
}
=
useContext
(
ConfigProvider
.
ConfigContext
);
const
prefixCls
=
getPrefixCls
(
'basic-table'
);
return
<
Table
className
=
{
classNames
(
prefixCls
)}
{...
props
}
bordered
/>
;
return
<
Table
className
=
{
classNames
(
prefixCls
)}
scroll
=
{{
y
:
'calc(100% - 40px)'
}}
{...
props
}
/>
;
};
BasicTable
.
defaultProps
=
{
...
...
packages/BasicTable/src/index.less
View file @
dcf8ae65
...
...
@@ -2,16 +2,21 @@
@basic-table-prefix-cls: ~'@{ant-prefix}-basic-table';
.@{basic-table-prefix-cls} {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
.ant-table-wrapper,
.ant-spin-nested-loading,
.ant-spin-container {
height: 100%;
}
.ant-table.ant-table-bordered {
height: calc(100% - 64px);
.ant-spin-container,
.ant-table,
.ant-table-container,
.ant-table-content {
display: flex;
flex: 1;
flex-direction: column;
overflow: hidden;
}
.ant-table-tbody > tr {
...
...
@@ -22,10 +27,6 @@
background: rgba(255, 255, 255, 0);
}
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td {
background: rgba(255, 255, 255, 0);
}
.ant-table-thead > tr > th {
font-weight: 600;
background: white;
...
...
@@ -37,7 +38,10 @@
.ant-table tfoot > tr > th,
.ant-table tfoot > tr > td {
padding: 8px 8px;
border-right: 1px solid #dbe7fb;
}
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td {
background: rgba(255, 255, 255, 0);
}
.ant-table-tbody > tr:nth-child(2n-1) {
...
...
@@ -48,6 +52,10 @@
background: #edf2ff;
}
.ant-table-tbody > tr > td {
border-bottom: 1px solid #dbe7fb;
}
.ant-table.ant-table-bordered
> .ant-table-container
> .ant-table-content
...
...
@@ -116,8 +124,4 @@
border-right: 0;
border-bottom: 0;
}
.ant-table-tbody > tr > td {
border-bottom: 1px solid #dbe7fb;
}
}
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