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
95873264
Commit
95873264
authored
Jul 03, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加可固定参数
parent
66a718df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
Table.tsx
components/apolloTable/component/Table.tsx
+13
-11
index.tsx
components/apolloTable/component/index.tsx
+2
-0
No files found.
components/apolloTable/component/Table.tsx
View file @
95873264
...
...
@@ -433,7 +433,7 @@ export default class AirTable extends Component<TableProps, TableState> {
};
render
()
{
const
{
loading
,
noDataPlaceholder
,
loadComp
}
=
this
.
props
;
const
{
loading
,
noDataPlaceholder
,
loadComp
,
canFixed
}
=
this
.
props
;
const
{
columns
,
dataSource
,
tableWidth
=
0
,
tableHeight
=
0
}
=
this
.
state
;
const
{
overscanColumnCount
,
overscanRowCount
,
rowHeight
,
headerHeight
,
columnWidth
}
=
this
.
config
;
const
scrollbarWidth
=
scrollbarSize
()
||
0
;
...
...
@@ -559,16 +559,18 @@ export default class AirTable extends Component<TableProps, TableState> {
}
</
div
>
)
}
<
LeftDragFixed
initLeft=
{
leftWidth
}
initTop=
{
headerHeight
}
tableWidth=
{
tableWidth
}
showColumns=
{
showColumns
}
columnWidth=
{
columnWidth
}
columns=
{
columns
}
onResizeStart=
{
this
.
onResizeStartLeftDragFixed
}
onResizeStop=
{
this
.
onResizeStopLeftDragFixed
}
/>
{
canFixed
&&
(
<
LeftDragFixed
initLeft=
{
leftWidth
}
initTop=
{
headerHeight
}
tableWidth=
{
tableWidth
}
showColumns=
{
showColumns
}
columnWidth=
{
columnWidth
}
columns=
{
columns
}
onResizeStart=
{
this
.
onResizeStartLeftDragFixed
}
onResizeStop=
{
this
.
onResizeStopLeftDragFixed
}
/>
)
}
<
div
className=
{
styles
.
centerContainer
}
>
<
AutoSizer
onResize=
{
this
.
onResize
}
>
{
({
width
,
height
}:
any
)
=>
{
...
...
components/apolloTable/component/index.tsx
View file @
95873264
...
...
@@ -82,6 +82,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
onScroll
,
loadComp
,
showCondition
,
canFixed
,
}
=
this
.
props
;
const
sortConfig
=
operateConfig
&&
...
...
@@ -135,6 +136,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
noDataPlaceholder=
{
noDataPlaceholder
}
contentMenu=
{
contentMenu
}
loadComp=
{
loadComp
}
canFixed=
{
canFixed
}
/>
</
div
>
</
div
>
...
...
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