Commit b432a9ce by liushikai

table优化

parent d8abe43e
......@@ -2,7 +2,7 @@
<div class="eContainer-table-block">
<el-table :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
style="width: 100%"
class="eContainer-table"
:class="{'eContainer-table':this.tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize).length>0}"
@selection-change="handleSelectionChange"
:row-key="getRowKey"
:header-cell-style="{background: 'eef1f6', color: '#606266'}"
......
......@@ -3,7 +3,7 @@
<el-table
:data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
style="width: 100%"
class="eContainer-table"
:class="{'eContainer-table':this.tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize).length>0}"
:row-class-name="tableRowClassName"
:header-cell-style="{background: 'eef1f6', color: '#606266'}"
:border="true">
......@@ -116,4 +116,5 @@ export default {
.el-table .success-row {
background: #f0f9eb;
}
</style>
\ No newline at end of file
<template>
<div class="eContainer-table-block">
<el-table :id="tableRef" :data="list" ref="table" style="width: 100%" class="eContainer-table" :header-cell-style="{background: 'eef1f6', color: '#606266'}"
<el-table :id="tableRef" :data="list" ref="table" style="width: 100%" :class="{'eContainer-table':this.list.length>0}" :header-cell-style="{background: 'eef1f6', color: '#606266'}"
v-bind="$attrs" v-on="tableListeners" v-loading="loading" :row-class-name="tableRowClass" :max-height="maxHeight"
>
<el-table-column
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment