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
c20a36dc
Commit
c20a36dc
authored
Jun 24, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改表格操作栏样式
parent
8ad20434
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
29 deletions
+49
-29
index.less
components/apolloTable/component/index.less
+7
-1
index.tsx
components/apolloTable/component/index.tsx
+41
-28
interface.tsx
components/apolloTable/component/interface.tsx
+1
-0
No files found.
components/apolloTable/component/index.less
View file @
c20a36dc
...
...
@@ -18,10 +18,16 @@
//min-height: 600px;
&.scroll {
flex: 1;
display: flex;
flex-direction: column;
}
.tableOperateContainer {
height: 58px;
overflow: hidden;
}
.tableC {
padding: 0 16px
;
flex: 1
;
}
.rowClassName {
border: 1px solid black;
...
...
components/apolloTable/component/index.tsx
View file @
c20a36dc
...
...
@@ -57,6 +57,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
render
()
{
const
{
columns
,
dataSource
}
=
this
.
state
;
const
{
className
,
rowStyle
,
rowClassName
,
distanceToLoad
,
...
...
@@ -89,38 +90,50 @@ class AirTable extends React.Component<CommonProps, CommonState> {
});
return
(
<
Provider
value=
{
{
locale
:
this
.
getContext
()
}
}
>
<
div
className=
{
onScroll
?
classNames
(
styles
.
container
,
styles
.
scroll
)
:
styles
.
container
}
>
<
div
className=
{
onScroll
?
classNames
(
styles
.
container
,
styles
.
scroll
,
className
)
:
classNames
(
styles
.
container
,
className
)
}
>
{
operateConfig
&&
<
OperateConfig
columns=
{
columns
}
operateConfig=
{
operateConfig
}
/>
}
<
div
className=
{
onScroll
?
classNames
(
styles
.
tableContainer
,
styles
.
scroll
)
:
styles
.
tableContainer
}
>
{
tableOperateConfig
&&
<
TableOperateConfig
operateConfig=
{
tableOperateConfig
}
/>
}
<
Table
columns=
{
columns
}
dataSource=
{
dataSource
}
onScroll=
{
this
.
onScroll
}
rowStyle=
{
rowStyle
}
rowClassName=
{
rowClassName
}
distanceToLoad=
{
distanceToLoad
}
emitChangeCell=
{
emitChangeCell
}
bordered=
{
bordered
}
width=
{
width
}
height=
{
height
}
sortConfig=
{
sortConfig
}
paginationConfig=
{
paginationConfig
}
showIndex=
{
showIndex
}
showExpand=
{
showExpand
}
emptyPlaceholder=
{
emptyPlaceholder
}
cellEditable=
{
cellEditable
}
rowHeight=
{
rowHeight
}
headerHeight=
{
headerHeight
}
columnWidth=
{
columnWidth
}
loading=
{
loading
}
rowSelection=
{
rowSelection
}
noDataPlaceholder=
{
noDataPlaceholder
}
contentMenu=
{
contentMenu
}
loadComp=
{
loadComp
}
/>
{
tableOperateConfig
&&
(
<
div
className=
{
styles
.
tableOperateContainer
}
>
<
TableOperateConfig
operateConfig=
{
tableOperateConfig
}
/>
</
div
>
)
}
<
div
className=
{
styles
.
tableC
}
>
<
Table
columns=
{
columns
}
dataSource=
{
dataSource
}
onScroll=
{
this
.
onScroll
}
rowStyle=
{
rowStyle
}
rowClassName=
{
rowClassName
}
distanceToLoad=
{
distanceToLoad
}
emitChangeCell=
{
emitChangeCell
}
bordered=
{
bordered
}
width=
{
width
}
height=
{
height
}
sortConfig=
{
sortConfig
}
paginationConfig=
{
paginationConfig
}
showIndex=
{
showIndex
}
showExpand=
{
showExpand
}
emptyPlaceholder=
{
emptyPlaceholder
}
cellEditable=
{
cellEditable
}
rowHeight=
{
rowHeight
}
headerHeight=
{
headerHeight
}
columnWidth=
{
columnWidth
}
loading=
{
loading
}
rowSelection=
{
rowSelection
}
noDataPlaceholder=
{
noDataPlaceholder
}
contentMenu=
{
contentMenu
}
loadComp=
{
loadComp
}
/>
</
div
>
</
div
>
{
paginationConfig
&&
<
Pagination
{
...
paginationConfig
}
/>
}
</
div
>
...
...
components/apolloTable/component/interface.tsx
View file @
c20a36dc
...
...
@@ -86,6 +86,7 @@ export interface CommonProps extends TableProps {
tableOperateConfig
?:
OperateConfigProps
;
paginationConfig
?:
any
;
locale
?:
any
;
className
?:
string
;
}
export
interface
CommonState
extends
TableState
{}
...
...
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