Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
submodule
Project
Project
Details
Activity
Releases
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
web_component
submodule
Commits
f2fbe67d
Commit
f2fbe67d
authored
Oct 15, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容分页
parent
cd9565a6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
38 deletions
+17
-38
Table.less
components/apolloTable/component/Table.less
+6
-8
Table.tsx
components/apolloTable/component/Table.tsx
+2
-6
index.less
components/apolloTable/component/index.less
+6
-13
index.tsx
components/apolloTable/component/index.tsx
+3
-11
No files found.
components/apolloTable/component/Table.less
View file @
f2fbe67d
...
...
@@ -6,14 +6,12 @@
flex-direction: row;
border: 1px solid @borderColor;
overflow: hidden;
&.scroll {
height: 100%;
.loading {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10;
}
height: 100%;
.loading {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10;
}
.leftSideContainer {
box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);
...
...
components/apolloTable/component/Table.tsx
View file @
f2fbe67d
...
...
@@ -449,13 +449,9 @@ export default class AirTable extends Component<TableProps, TableState> {
{
({
onScroll
,
scrollLeft
,
scrollTop
}:
any
)
=>
{
return
(
<
div
className=
{
this
.
props
.
onScroll
?
classNames
(
styles
.
tableContainer
,
styles
.
scroll
)
:
styles
.
tableContainer
}
className=
{
styles
.
tableContainer
}
style=
{
{
paddingRight
:
this
.
props
.
onScroll
?
paddingRight
:
0
,
paddingRight
,
}
}
id=
{
`apolloTable_${tableId}`
}
>
...
...
components/apolloTable/component/index.less
View file @
f2fbe67d
@import '../common';
.container {
//overflow: hidden;
//height: 100%;
width: 100%;
position: relative;
&.scroll {
display: flex;
flex-direction: column;
height: calc(100vh - 92px);
}
display: flex;
flex-direction: column;
height: calc(100vh - 92px);
.operateContainer {
}
.tableContainer {
position: relative;
box-shadow: @boxShadow;
//min-height: 600px;
&.scroll {
flex: 1;
display: flex;
flex-direction: column;
}
flex: 1;
display: flex;
flex-direction: column;
.tableOperateContainer {
height: 38px;
overflow: hidden;
...
...
components/apolloTable/component/index.tsx
View file @
f2fbe67d
...
...
@@ -102,19 +102,11 @@ class AirTable extends React.Component<CommonProps, CommonState> {
return
(
<
Provider
value=
{
{
locale
:
this
.
getContext
()
}
}
>
<
div
className=
{
onScroll
?
classNames
(
styles
.
container
,
styles
.
scroll
,
className
)
:
classNames
(
styles
.
container
,
className
)
}
className=
{
classNames
(
styles
.
container
,
className
)
}
>
{
operateConfig
&&
<
OperateConfig
columns=
{
columns
}
operateConfig=
{
operateConfig
}
/>
}
<
div
className=
{
onScroll
?
classNames
(
styles
.
tableContainer
,
styles
.
scroll
,
tableClassName
)
:
classNames
(
styles
.
tableContainer
,
tableClassName
)
}
className=
{
classNames
(
styles
.
tableContainer
,
tableClassName
)
}
>
{
tableOperateConfig
&&
(
<
div
className=
{
styles
.
tableOperateContainer
}
>
...
...
@@ -128,7 +120,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
dataSource=
{
dataSource
}
rowStyle=
{
rowStyle
}
rowClassName=
{
rowClassName
}
onScroll=
{
this
.
onScroll
}
onScroll=
{
onScroll
?
this
.
onScroll
:
undefined
}
distanceToLoad=
{
distanceToLoad
}
cellEditable=
{
cellEditable
}
emitChangeCell=
{
emitChangeCell
}
...
...
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