task#13769,答题完成返回页面执行自动刷新11
This commit is contained in:
@ -92,6 +92,9 @@ export default {
|
|||||||
// 每次回答完问题之后返回需重新加结果
|
// 每次回答完问题之后返回需重新加结果
|
||||||
|
|
||||||
},
|
},
|
||||||
|
async activated() {
|
||||||
|
await this.getList()
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
onRefresh() {
|
onRefresh() {
|
||||||
this.getList()
|
this.getList()
|
||||||
@ -100,13 +103,7 @@ export default {
|
|||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
beforeRouteUpdate(to, from, next) {
|
|
||||||
// 在当前路由改变,但是该组件被复用时调用
|
|
||||||
// 举例来说,对于带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候,
|
|
||||||
// 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用。
|
|
||||||
this.getList();
|
|
||||||
next();
|
|
||||||
},
|
|
||||||
async getList(){
|
async getList(){
|
||||||
let res= await pageList({
|
let res= await pageList({
|
||||||
pageNum:this.pageNum,
|
pageNum:this.pageNum,
|
||||||
|
Reference in New Issue
Block a user