fix(v-memo): ensure track block when returning cached vnode (#4270)
fix #4253
This commit is contained in:
@@ -37,7 +37,7 @@ export function render(_ctx, _cache) {
|
||||
return (_openBlock(), _createElementBlock(\\"div\\", null, [
|
||||
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.list, ({ x, y }, __, ___, _cached) => {
|
||||
const _memo = ([x, y === z])
|
||||
if (_cached && _cached.key === x && _isMemoSame(_cached.memo, _memo)) return _cached
|
||||
if (_cached && _cached.key === x && _isMemoSame(_cached, _memo)) return _cached
|
||||
const _item = (_openBlock(), _createElementBlock(\\"span\\", { key: x }, \\"foobar\\"))
|
||||
_item.memo = _memo
|
||||
return _item
|
||||
@@ -53,7 +53,7 @@ export function render(_ctx, _cache) {
|
||||
return (_openBlock(), _createElementBlock(\\"div\\", null, [
|
||||
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.list, ({ x, y }, __, ___, _cached) => {
|
||||
const _memo = ([x, y === _ctx.z])
|
||||
if (_cached && _cached.key === x && _isMemoSame(_cached.memo, _memo)) return _cached
|
||||
if (_cached && _cached.key === x && _isMemoSame(_cached, _memo)) return _cached
|
||||
const _item = (_openBlock(), _createElementBlock(\\"div\\", { key: x }, [
|
||||
_createElementVNode(\\"span\\", null, \\"foobar\\")
|
||||
]))
|
||||
|
||||
Reference in New Issue
Block a user