mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-21 06:53:47 +00:00
pagination
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ module.exports = {
|
||||
|
||||
'GET /api/users' (req, res) {
|
||||
const page = qs.parse(req.query)
|
||||
const pageSize = page.pageSize || 20
|
||||
const pageSize = page.pageSize || 10
|
||||
const currentPage = page.page || 1
|
||||
|
||||
let data
|
||||
|
||||
+8
-1
@@ -106,7 +106,14 @@ export default {
|
||||
return { ...state, loading: true }
|
||||
},
|
||||
querySuccess (state, action) {
|
||||
return { ...state, ...action.payload, loading: false }
|
||||
const {list, pagination} = action.payload
|
||||
return { ...state,
|
||||
list,
|
||||
loading: false,
|
||||
pagination: {
|
||||
...state.pagination,
|
||||
...pagination
|
||||
}}
|
||||
},
|
||||
showModal (state, action) {
|
||||
return { ...state, ...action.payload, modalVisible: true }
|
||||
|
||||
Reference in New Issue
Block a user