mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-03 04:27:41 +08:00
fix: table pagination deep watch
This commit is contained in:
parent
2e1c19471e
commit
c65e1def1b
@ -86,17 +86,20 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
pagination (val) {
|
||||
this.setState(previousState => {
|
||||
const newPagination = {
|
||||
...defaultPagination,
|
||||
...previousState.sPagination,
|
||||
...val,
|
||||
}
|
||||
newPagination.current = newPagination.current || 1
|
||||
newPagination.pageSize = newPagination.pageSize || 10
|
||||
return { sPagination: val !== false ? newPagination : emptyObject }
|
||||
})
|
||||
pagination: {
|
||||
handler (val) {
|
||||
this.setState(previousState => {
|
||||
const newPagination = {
|
||||
...defaultPagination,
|
||||
...previousState.sPagination,
|
||||
...val,
|
||||
}
|
||||
newPagination.current = newPagination.current || 1
|
||||
newPagination.pageSize = newPagination.pageSize || 10
|
||||
return { sPagination: val !== false ? newPagination : emptyObject }
|
||||
})
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
rowSelection: {
|
||||
handler (val) {
|
||||
|
Loading…
Reference in New Issue
Block a user