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
5af2d397
Commit
5af2d397
authored
Jan 13, 2017
by
baiyaaaaa
Committed by
GitHub
Jan 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2396 from QingWei-Li/fix/table/nodata-width
Table: fix body width when no data
parents
ef06717f
8e36cee3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
packages/table/src/table.vue
packages/table/src/table.vue
+7
-2
No files found.
packages/table/src/table.vue
View file @
5af2d397
...
...
@@ -31,9 +31,9 @@
:row-class-name=
"rowClassName"
:row-style=
"rowStyle"
:highlight=
"highlightCurrentRow"
:style=
"
{ width:
layout.bodyWidth ? layout.bodyWidth - (layout.scrollY ? layout.gutterWidth : 0 ) + 'px' : ''
}">
:style=
"
{ width:
bodyWidth
}">
</table-body>
<div
class=
"el-table__empty-block"
v-if=
"!data || data.length === 0"
>
<div
:style=
"
{ width: bodyWidth }"
class="el-table__empty-block" v-if="!data || data.length === 0">
<span
class=
"el-table__empty-text"
><slot
name=
"empty"
>
{{
emptyText
||
t
(
'
el.table.emptyText
'
)
}}
</slot></span>
</div>
</div>
...
...
@@ -297,6 +297,11 @@
return
style
;
},
bodyWidth
()
{
const
{
bodyWidth
,
scrollY
,
gutterWidth
}
=
this
.
layout
;
return
bodyWidth
?
bodyWidth
-
(
scrollY
?
gutterWidth
:
0
)
+
'
px
'
:
''
;
},
fixedBodyHeight
()
{
let
style
=
{};
...
...
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