1.解决屏幕闪动
用v-cloak可以解决
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200818101110679.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2h1aHVodWph,size_16,color_FFFFFF,t_70#pic_center)
2.keep-alive实现页面缓存
在router中设置meta属性,然后设置keepAlive为true,代表这个页面需要进行缓存。
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200818101409295.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2h1aHVodWph,size_16,color_FFFFFF,t_70#pic_center)
去到app.vue中修改代码:
3.滚轮到最底部
this.$nextTick(()=>{
document.documentElement.scrollTOP=10000;
})
4.打开新窗口页面
const {href} =this.$router.resolve({
name:"pydt",
params:{
id:id,
studentStatus:0
}
});
window,open(href,"_blank")
解决办法
window.open(window.location.oringin+'/#pydt?id='+id)