当前位置:网站首页>keep-alive缓存组件
keep-alive缓存组件
2022-07-31 01:29:00 【cc&】
说明:
作用:用来缓存页面
用法:一般与路由出口配合使用
<keep-alive>
<router-view></router-view>
</keep-alive>
与之相关的生命周期函数(只在缓存过的组件中的触发):
`activated`:当缓存的组件被打开时会触发
`deactivated`:当缓存的组件被隐藏时会触发
注意点:
`keep-alive` 一般不会单独使用,它会配合其它两个组件来使用:
`<component :is="将来要成为的组件名"></component>`
*`<router-view></router-view>`
边栏推荐
猜你喜欢
Shell变量与赋值、变量运算、特殊变量
射频器件的基本参数1
Set the browser scrollbar style
The level of ShardingSphere depots in actual combat (4)
RTL8720DN开发笔记一 环境搭建与mqtt实例
Rocky/GNU之Zabbix部署(1)
Responsive layout vs px/em/rem
设置浏览器滚动条样式
The difference between 4G communication module CAT1 and CAT4
Parameter introduction and selection points of wireless module
随机推荐
MySql的安装配置超详细教程与简单的建库建表方法
Know what DTU is 4GDTU equipment
Multiplication, DFS order
1782. Count the number of point pairs Double pointer
87. 把字符串转换成整数
VSCode插件:嵌套注释
TiDB 在长银五八消费金融核心系统适配经验分享
《实战》基于电商领域的词性提取及其决策树模型建模
内网渗透——提权
查看zabbix-release-5.0-1.el8.noarch.rpm包内容
PDF 拆分/合并
蓝牙mesh系统开发三 Ble Mesh 配网器 Provisioner
射频器件的基本参数1
Bert usage and word prediction based on Keras_bert model
Dispatch Center xxl-Job
Huawei's "genius boy" Zhihui Jun has made a new work, creating a "customized" smart keyboard from scratch
软件测试工作3年了,谈谈我是如何从刚入门进阶到自动化测试的?
prometheus 监控概述
Responsive layout vs px/em/rem
图像处理工具设计