task#13769,答题完成返回页面执行自动刷新
This commit is contained in:
@ -88,7 +88,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
// this.getList();
|
||||||
// 每次回答完问题之后返回需重新加结果
|
// 每次回答完问题之后返回需重新加结果
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -100,6 +100,13 @@ 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