Commit 367a4196a4e1e997fbdd9e5215ae6db3a2344a15
1 parent
af6e81cd
update Table
Showing
3 changed files
with
7 additions
and
2 deletions
Show diff stats
examples/routers/table.vue
1 | <template> | 1 | <template> |
2 | - <Table :columns="columns7" :data="data6" @on-expand="expand"></Table> | 2 | + <Table border :columns="columns7" :data="data6" @on-expand="expand"></Table> |
3 | </template> | 3 | </template> |
4 | <script> | 4 | <script> |
5 | import etable from '../components/table.vue'; | 5 | import etable from '../components/table.vue'; |
src/components/table/table-body.vue
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | </td> | 27 | </td> |
28 | </tr> | 28 | </tr> |
29 | <tr v-if="rowExpanded(row._index)"> | 29 | <tr v-if="rowExpanded(row._index)"> |
30 | - <td :colspan="columns.length"> | 30 | + <td :colspan="columns.length" :class="prefixCls + '-expanded-cell'"> |
31 | <Expand :row="row" :render="expandRender" :index="row._index"></Expand> | 31 | <Expand :row="row" :render="expandRender" :index="row._index"></Expand> |
32 | </td> | 32 | </td> |
33 | </tr> | 33 | </tr> |
src/styles/components/table.less
@@ -174,6 +174,11 @@ | @@ -174,6 +174,11 @@ | ||
174 | vertical-align: middle; | 174 | vertical-align: middle; |
175 | } | 175 | } |
176 | 176 | ||
177 | + td&-expanded-cell{ | ||
178 | + padding: 20px 50px; | ||
179 | + background: @table-thead-bg; | ||
180 | + } | ||
181 | + | ||
177 | &-stripe &-body, | 182 | &-stripe &-body, |
178 | &-stripe &-fixed-body | 183 | &-stripe &-fixed-body |
179 | { | 184 | { |