Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
1568f7c4
Commit
1568f7c4
authored
Sep 12, 2016
by
杨奕
Committed by
GitHub
Sep 12, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #61 from spademan/master
Table : 解决固定某一列的时候滚动条在冻结列不能被拖动的问题
parents
b79691c8
8e45ee85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
packages/table/src/table.vue
packages/table/src/table.vue
+3
-4
No files found.
packages/table/src/table.vue
View file @
1568f7c4
...
...
@@ -227,7 +227,6 @@
if
(
this
.
fixedColumnCount
>
0
)
{
let
fixedBodyWidth
=
0
;
let
fixedColumnCount
=
this
.
fixedColumnCount
;
columns
.
forEach
(
function
(
column
,
index
)
{
if
(
index
<
fixedColumnCount
)
{
fixedBodyWidth
+=
column
.
realWidth
;
...
...
@@ -252,7 +251,6 @@
const
bodyHeight
=
(
height
-
headerHeight
);
const
gridWrapper
=
this
.
$el
.
querySelector
(
'
.el-table__body-wrapper
'
);
gridWrapper
.
style
.
height
=
bodyHeight
+
'
px
'
;
this
.
$el
.
style
.
height
=
height
+
'
px
'
;
if
(
this
.
$refs
.
fixed
)
{
this
.
$refs
.
fixed
.
style
.
height
=
height
+
'
px
'
;
...
...
@@ -420,8 +418,9 @@
this
.
$nextTick
(()
=>
{
const
style
=
this
.
$refs
.
fixed
.
style
;
if
(
!
style
)
return
;
style
.
height
=
this
.
$el
.
clientHeight
+
'
px
'
;
// style.height = this.$el.clientHeight + 'px';
// 存在横向滚动条的时候应该要减去滚动条的高度
style
.
height
=
(
this
.
showHScrollBar
?
this
.
$el
.
clientHeight
-
this
.
currentGutterWidth
:
this
.
$el
.
clientHeight
)
+
'
px
'
;
// 若非固定列中的某行内容被撑高, 需要固定列中对应行高度与其保持一致
let
bodyHeight
=
this
.
$el
.
querySelector
(
'
.el-table__body-wrapper
'
).
offsetHeight
;
let
fixedBodyHeight
=
this
.
$el
.
querySelector
(
'
.el-table__fixed-body-wrapper
'
).
offsetHeight
;
...
...
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