首页
mac
it
登录
6mi
u
盘
搜
搜 索
it
keep-alive 使用
keep-alive 使用
mac
2024-11-03
52
<keep-alive exclude="Detail"> <router-view/> </keep-alive> activated () { if (this.lastCity !== this.city) { this.lastCity = this.city this.getHomeInfo() } }
加了<keep-alive> 后防止数据重复请求: created() mouted() 就只能加载一次,但是 activated() 可以重复、重新加载
转载请注明原文地址: https://mac.8miu.com/read-497324.html
最新回复
(
0
)