当前位置:网站首页>Cache page keepalive use in Vue
Cache page keepalive use in Vue
2022-06-26 15:05:00 【A Taurus cub】
- Configure... In the route
{
path: '',
name: 'xx',
meta: {
keepAlive: true },
component: xx
},
- stay App.vue Middle configuration
<keep-alive>
<router-view v-if="$route.meta.keepAlive"></router-view>
</keep-alive>
<router-view v-if="!$route.meta.keepAlive" :key="key">
</router-view>
computed: {
key() {
return this.$route.path + Math.random();
},
},
- Unique life cycle
// Triggered on entry
activated() {
}
// Trigger on exit
deactivated() {
}
keepAlive It also supports many functions , You need to check it yourself
边栏推荐
猜你喜欢

Talk about the RPA direction planning: stick to simple and valuable things for a long time

Detailed explanation of C language programming problem: can any three sides form a triangle, output the area of the triangle and judge its type

The engine "node" is inconsistent with this module

Authoritative announcement on the recruitment of teachers in Yan'an University in 2022

【使用yarn运行报错】The engine “node“ is incompatible with this module.

权威发布 | 延安大学2022年教师岗位招聘公告

Mark: unity3d cannot select resources in the inspector, that is, project locking

Common operation and Principle Exploration of stream

Unity 利用Skybox Panoramic着色器制作全景图预览有条缝隙问题解决办法

Attention meets geometry: geometry guided spatiotemporal attention consistency self supervised monocular depth estimation
随机推荐
vue中缓存页面 keepAlive使用
R语言使用epiDisplay包的aggregate函数将数值变量基于因子变量拆分为不同的子集,计算每个子集的汇总统计信息、使用aggregate.data.frame函数计算分组汇总统计信息
使用 Abp.Zero 搭建第三方登录模块(一):原理篇
nvidia-smi 报错
获取两个dataframe的交并差集
Sikuli 基于图形识别的自动化测试技术
R语言使用glm函数构建泊松对数线性回归模型处理三维列联表数据构建饱和模型、使用step函数基于AIC指标实现逐步回归筛选最佳模型、使用summary函数查看简单模型的汇总统计信息
Sharing ideas for a quick switch to an underlying implementation
The heavyweight white paper was released. Huawei continues to lead the new model of smart park construction in the future
The engine "node" is inconsistent with this module
Unity uses skybox panoramic shader to make panorama preview. There is a gap. Solution
Numpy basic use
【soloπ】adb连接单个多个手机
About selenium common. exceptions. Webdriverexception: message: an unknown server side error solution (resolved)
券商经理给的开户链接办理股票开户安全吗?我想开个户
shell脚本多进程并发写法实例(高阶修炼)
IP certificate application process of sectigo
印尼投资部长:鸿海考虑在其新首都建立电动公交系统、城市物联网
Deploy the flask environment using the pagoda panel
小程序:uniapp解决 vendor.js 体积过大的问题