Commit 53b7a4b9 by jianglong

修改列表分页

parent 36f4701b
......@@ -58,7 +58,7 @@
</c-table-column>
<slot></slot>
</el-table>
<c-col :span="16">
<c-col :span="16" v-if="tableData.length>10">
<el-pagination
v-if="paginationShow"
class="eContainer-pagination"
......@@ -71,7 +71,7 @@
@current-change="currentChange"
></el-pagination>
</c-col>
<c-col :span="8">
<c-col :span="8" style="float:right">
<div class="paginationLable" v-if="paginationShow">
当前显示第 {{ (currentPage - 1) * pageSize + 1 }}-{{
currentPage * pageSize > tableData.length
......
......@@ -85,7 +85,7 @@
<el-button type="primary" @click="saveColumnEvent" style="margin-left:10px;">保存</el-button>
</span>
</el-dialog>
<c-col :span="16">
<c-col :span="16" v-if="tableData.length>10">
<el-pagination
v-if="paginationShow"
class="eContainer-pagination"
......@@ -98,7 +98,7 @@
@current-change="currentChange"
></el-pagination>
</c-col>
<c-col :span="8">
<c-col :span="8" style="float:right">
<div class="paginationLable" v-if="paginationShow">
当前显示第 {{ (currentPage - 1) * pageSize + 1 }}-{{
currentPage * pageSize > tableData.length
......
......@@ -16,21 +16,21 @@
></el-table-column>
<slot></slot>
</el-table>
<c-col :span="16">
<el-pagination
class="eContainer-pagination"
layout="prev, pager, next, jumper"
:page-sizes="pageSizes"
:page-size="pageSize"
:current-page="currentPage"
:total="tableData.length"
@size-change="sizeChange"
@current-change="currentChange"
></el-pagination>
<c-col :span="16" v-if="tableData.length>10">
<el-pagination
class="eContainer-pagination"
layout="prev, pager, next, jumper"
:page-sizes="pageSizes"
:page-size="pageSize"
:current-page="currentPage"
:total="tableData.length"
@size-change="sizeChange"
@current-change="currentChange"
></el-pagination>
</c-col>
<c-col :span="8" style="float:right">
<div class="paginationLable">当前显示第 {{(currentPage - 1) * pageSize + 1}}-{{currentPage * pageSize > tableData.length ? tableData.length : currentPage * pageSize}} 条,共 {{tableData.length}}</div>
</c-col>
<c-col :span="8">
<div class="paginationLable">当前显示第 {{(currentPage - 1) * pageSize + 1}}-{{currentPage * pageSize > tableData.length ? tableData.length : currentPage * pageSize}} 条,共 {{tableData.length}}</div>
</c-col>
</div>
</template>
......
......@@ -22,7 +22,7 @@
<c-col :span="16" style="text-align:left">
<el-pagination
class="eContainer-pagination"
v-if="paginationShow"
v-if="paginationShow && total>10"
:background="type == 'small' ? false : true"
small
layout="prev, pager, next, jumper"
......@@ -32,7 +32,7 @@
v-on="$listeners"
></el-pagination>
</c-col>
<c-col :span="8">
<c-col :span="8" style="float:right">
<div class="paginationLable" v-if="paginationShow">
当前显示第 {{ page1 }}-{{ page2 }} 条,共 {{ total }}
</div>
......
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