You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
请问这几个属性之间有什么区别呢,可不可以只填写一个就具有彼此的功能。比如我传递了 cacheKey,就不需要写 name 也可以
The text was updated successfully, but these errors were encountered:
akai-cn
changed the title
what's different with <KeepAlive /> attrs 'id' 'name' 'cacheKey'.
what different with <KeepAlive /> attrs 'id' 'name' 'cacheKey'.
Mar 27, 2023
cacheKey: 当前 KeepAlive 在整个应用中的唯一标识,有且仅有一个,类似 DOM 节点中的 id
id: 当前 KeepAlive 在当前节点位置上的唯一标识,用来在同一个节点位置上划分出不同的缓存,类似路由中的参数 /item/:id
name: 主要是用来方便用户找到某个节点并控制这个节点的缓存,类似 DOM 节点中的 class
请问这几个属性之间有什么区别呢,可不可以只填写一个就具有彼此的功能。比如我传递了 cacheKey,就不需要写 name 也可以
The text was updated successfully, but these errors were encountered: