非法涉猎(首页8条及按钮位置)

pull/3/head
wjl61901 1 year ago
parent 38404275fa
commit c699fe28c5

@ -1,14 +1,11 @@
<template>
<div class="pagination">
<div>
{{ total }}条记录当前显示第{{ (pageNum - 1) * pageSize + 1 }}-{{
pageNum * pageSize
}}
</div>
<div>{{ total }}条记录当前显示第{{ (pageNum - 1) * pageSize + 1 }}-{{ pageNum * pageSize }}</div>
<el-pagination
background
layout="sizes, prev, pager, next"
:total="total"
:pageSizes="pageSizes"
@size-change="handleSizeChange"
@current-change="handlePageChange"
>
@ -18,11 +15,12 @@
<script>
export default {
props: {
total: Number
total: Number,
pageSizes: Array
},
data() {
return {
pageSize: 10,
pageSize: this.pageSizes ? this.pageSizes[0] : 10,
pageNum: 1
}
},

@ -38,12 +38,12 @@
<img-button icon="el-icon-edit" @click="handleAdd"> </img-button>
</div>
<div class="fy-center">
<img-button icon="el-icon-search" @click="handleQuery"> </img-button>
<img-button icon="el-icon-search" @click="handleReset"> </img-button>
<img v-if="listType == 0" src="@/assets/hunting/record-list-active.png" @click="listType = 0" />
<img v-else src="@/assets/hunting/record-list.png" @click="listType = 0" />
<img v-if="listType == 1" src="@/assets/hunting/card-list-active.png" @click="listType = 1" />
<img v-else src="@/assets/hunting/card-list.png" @click="listType = 1" />
<img-button icon="el-icon-search" @click="handleQuery"> </img-button>
<img-button icon="el-icon-search" @click="handleReset"> </img-button>
</div>
</div>
<card-table v-if="listType == 1" :rows="rows" @select="handleSelections" @click="toDetail"></card-table>
@ -68,7 +68,7 @@
<el-button type="warning" size="mini">撤控</el-button>
</el-table-column>
</el-table>
<pagination style="margin-top: 2vh" :total="total" @change="handleQuery"></pagination>
<pagination :pageSizes="[8, 20, 30, 40, 50, 100]" style="margin-top: 2vh" :total="total" @change="handleQuery"></pagination>
</card>
</template>
@ -101,7 +101,7 @@ export default {
}
},
created() {
this.handleQuery()
this.handleQuery({ pageSize: 8, pageNum: 1 })
},
mounted() {},
methods: {

@ -128,7 +128,7 @@ export default {
}
},
created() {
this.handleQuery()
this.handleQuery({ pageSize: 10, pageNum: 1 })
},
mounted() {},
methods: {

Loading…
Cancel
Save