mirror of https://github.com/vuejs/core.git
refactor: memoIndex -> cacheIndex
This commit is contained in:
parent
aef807746a
commit
2815531fd5
|
@ -15,7 +15,7 @@ export function withMemo(
|
|||
|
||||
// shallow clone
|
||||
ret.memo = memo.slice()
|
||||
ret.memoIndex = index
|
||||
ret.cacheIndex = index
|
||||
|
||||
return (cache[index] = ret)
|
||||
}
|
||||
|
|
|
@ -2109,7 +2109,7 @@ function baseCreateRenderer(
|
|||
shapeFlag,
|
||||
patchFlag,
|
||||
dirs,
|
||||
memoIndex,
|
||||
cacheIndex,
|
||||
} = vnode
|
||||
|
||||
if (patchFlag === PatchFlags.BAIL) {
|
||||
|
@ -2122,8 +2122,8 @@ function baseCreateRenderer(
|
|||
}
|
||||
|
||||
// #6593 should clean memo cache when unmount
|
||||
if (memoIndex != null) {
|
||||
parentComponent!.renderCache[memoIndex] = undefined
|
||||
if (cacheIndex != null) {
|
||||
parentComponent!.renderCache[cacheIndex] = undefined
|
||||
}
|
||||
|
||||
if (shapeFlag & ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE) {
|
||||
|
|
|
@ -243,7 +243,7 @@ export interface VNode<
|
|||
/**
|
||||
* @internal index for cleaning v-memo cache
|
||||
*/
|
||||
memoIndex?: number
|
||||
cacheIndex?: number
|
||||
/**
|
||||
* @internal __COMPAT__ only
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue