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

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

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

@ -38,12 +38,12 @@
<img-button icon="el-icon-edit" @click="handleAdd"> </img-button> <img-button icon="el-icon-edit" @click="handleAdd"> </img-button>
</div> </div>
<div class="fy-center"> <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-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-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-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 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>
</div> </div>
<card-table v-if="listType == 1" :rows="rows" @select="handleSelections" @click="toDetail"></card-table> <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-button type="warning" size="mini">撤控</el-button>
</el-table-column> </el-table-column>
</el-table> </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> </card>
</template> </template>
@ -101,7 +101,7 @@ export default {
} }
}, },
created() { created() {
this.handleQuery() this.handleQuery({ pageSize: 8, pageNum: 1 })
}, },
mounted() {}, mounted() {},
methods: { methods: {

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

Loading…
Cancel
Save