Fix Votes loading issue

This commit is contained in:
liangping 2021-09-11 21:05:23 +08:00
parent 08ecad1c27
commit 87aed10821

View File

@ -345,9 +345,10 @@ export default {
methods: {
loadVotes() {
if (this.next) {
this.next = null
const pid = this.$route.params.proposalid
this.$http.getGovernanceVotes(pid, this.next).then(res => {
const { next } = this
this.next = null
this.$http.getGovernanceVotes(pid, next).then(res => {
this.$set(this.votes, 'votes', this.votes.votes.concat(res.votes))
this.next = res.pagination ? res.pagination.next_key : null
})