|
@@ -179,7 +179,7 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getUserInfo()
|
|
|
- this.getCharacterList()
|
|
|
+ this.initCharacterList()
|
|
|
},
|
|
|
methods: {
|
|
|
getUserInfo() {
|
|
@@ -252,7 +252,7 @@ export default {
|
|
|
message: '修改成功!'
|
|
|
});
|
|
|
this.dialogVisible = false
|
|
|
- this.getCharacterList()
|
|
|
+ this.initCharacterList()
|
|
|
})
|
|
|
} else if (this.selectObj.scene == 1) {
|
|
|
// 点击是场景
|
|
@@ -266,7 +266,7 @@ export default {
|
|
|
message: '修改成功!'
|
|
|
});
|
|
|
this.dialogVisible = false
|
|
|
- this.getCharacterList()
|
|
|
+ this.initCharacterList()
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -285,7 +285,7 @@ export default {
|
|
|
message: '删除成功!'
|
|
|
});
|
|
|
this.dialogVisible = false
|
|
|
- this.getCharacterList()
|
|
|
+ this.initCharacterList()
|
|
|
})
|
|
|
})
|
|
|
} else if (this.selectObj.scene == 1) {
|
|
@@ -301,16 +301,19 @@ export default {
|
|
|
message: '删除成功!'
|
|
|
});
|
|
|
this.dialogVisible = false
|
|
|
- this.getCharacterList()
|
|
|
+ this.initCharacterList()
|
|
|
})
|
|
|
})
|
|
|
|
|
|
}
|
|
|
},
|
|
|
tabChange(index) {
|
|
|
- this.query.pageNum = 1
|
|
|
- this.characterList = []
|
|
|
this.query.type = index
|
|
|
+ this.initCharacterList()
|
|
|
+ },
|
|
|
+ initCharacterList() {
|
|
|
+ this.characterList = []
|
|
|
+ this.query.pageNum = 1
|
|
|
this.getCharacterList()
|
|
|
},
|
|
|
load() {
|
|
@@ -336,7 +339,7 @@ export default {
|
|
|
this.noMore = true
|
|
|
}
|
|
|
this.characterList = [...this.characterList, ...res.rows]
|
|
|
- if (this.characterList.length >= res.total) {
|
|
|
+ if ((this.query.pageNum * this.query.pageSize) >= res.total) {
|
|
|
this.noMore = true
|
|
|
}
|
|
|
this.total = res.total
|