修改分页错误
This commit is contained in:
@@ -137,7 +137,7 @@
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination style="position: relative" :page="searchForm.page" :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
<pagination style="position: relative" :auto-size="true" :page-size="searchForm.pageSize" :page="searchForm.page" :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
<loading :loading="loading">数据获取中...</loading>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
@@ -163,7 +163,10 @@ export default {
|
||||
]
|
||||
return {
|
||||
show: false,
|
||||
searchForm: {},
|
||||
searchForm: {
|
||||
pageSize:20,
|
||||
page:1
|
||||
},
|
||||
api: {
|
||||
page: 'lawss/sarLawsTopic/page'
|
||||
},
|
||||
@@ -177,7 +180,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getData () {
|
||||
this.searchForm.pageSize = this.searchForm.pageSize || this.$store.getters.userInfo.configContent
|
||||
this.searchForm.pageSize = this.searchForm.pageSize
|
||||
this.searchForm.page = this.searchForm.page || 1
|
||||
let params = { ...this.searchForm }
|
||||
const res = await this.$http._getData(this.api.page, params, {_this:this,loading: 'loading'})
|
||||
@@ -187,7 +190,10 @@ export default {
|
||||
}
|
||||
},
|
||||
open () {
|
||||
this.$set(this, 'searchForm', {})
|
||||
this.$set(this, 'searchForm', {
|
||||
pageSize:20,
|
||||
page:1
|
||||
})
|
||||
this.getData()
|
||||
this.show = true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user