mirror of https://github.com/vuejs/core.git
fix(runtime-vapor): stale memo cache
This commit is contained in:
parent
3d487184ea
commit
3867942ddb
|
@ -266,15 +266,18 @@ export const createFor = (
|
||||||
block.nodes = scope.run(() => {
|
block.nodes = scope.run(() => {
|
||||||
if (getMemo) {
|
if (getMemo) {
|
||||||
return withMemo(
|
return withMemo(
|
||||||
() => block.memo!,
|
() =>
|
||||||
|
getMemo(
|
||||||
|
block.state[0].value,
|
||||||
|
block.state[1].value,
|
||||||
|
block.state[2].value,
|
||||||
|
),
|
||||||
() => renderItem(state),
|
() => renderItem(state),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return renderItem(state)
|
return renderItem(state)
|
||||||
})!
|
})!
|
||||||
|
|
||||||
// TODO v-memo
|
|
||||||
// if (getMemo) block.update()
|
|
||||||
if (parent) insert(block.nodes, parent, anchor)
|
if (parent) insert(block.nodes, parent, anchor)
|
||||||
|
|
||||||
return block
|
return block
|
||||||
|
|
Loading…
Reference in New Issue