Commit 53b7a4b9 by jianglong

修改列表分页

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