Vue keep-alive的实现原理

使用vue的时候,想必你们都是用过keep-alive,其做用就是缓存页面以及其状态。使用了这么久vue只知道如何使用但不明白其中原理,昨天翻看实现代码,这里作个笔记。javascript 这里以vue3为例,整个组件的源码为:vue const KeepAliveImpl = { name: `KeepAlive`, // Marker for special handling ins
相关文章
相关标签/搜索