Subscribe on changes!

通过createVNode创建的vnode,在template中,无法具备响应性

avatar
Jun 21st 2022

Vue version

3.2.27

Link to minimal reproduction

https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cD5cbmltcG9ydCB7IHJlZiB9IGZyb20gJ3Z1ZSdcbmltcG9ydCBjcmVhdGUgZnJvbSAnLi9jcmVhdGUudHMnXG5jb25zdCBDb21wVk5vZGUgPSBjcmVhdGUoKVxuXG5jb25zdCBtc2cgPSByZWYoJ2luaXQgbXNnJylcblxuPC9zY3JpcHQ+XG5cbjx0ZW1wbGF0ZT5cbiAgPGgxPuWklumDqG1zZzp7eyBtc2cgfX08L2gxPlxuIFx0PENvbXBWTm9kZSA6bXNnPVwibXNnXCIgLz5cbiAgPGlucHV0IHYtbW9kZWw9XCJtc2dcIiAvPlxuPC90ZW1wbGF0ZT4iLCJpbXBvcnQtbWFwLmpzb24iOiJ7XG4gIFwiaW1wb3J0c1wiOiB7XG4gICAgXCJ2dWVcIjogXCJodHRwczovL3NmYy52dWVqcy5vcmcvdnVlLnJ1bnRpbWUuZXNtLWJyb3dzZXIuanNcIixcbiAgICBcInZ1ZS9zZXJ2ZXItcmVuZGVyZXJcIjogXCJodHRwczovL3NmYy52dWVqcy5vcmcvc2VydmVyLXJlbmRlcmVyLmVzbS1icm93c2VyLmpzXCJcbiAgfVxufSIsIkNvbXAudnVlIjoiPHNjcmlwdCBzZXR1cCBsYW5nPVwidHNcIj5cbiAgZGVmaW5lUHJvcHM8e1xuICAgIG1zZzogc3RyaW5nXG4gIH0+KClcbjwvc2NyaXB0PlxuXG48dGVtcGxhdGU+XG5cdDxoMT7nu4Tku7Ztc2c6e3sgbXNnIH19PC9oMT5cbjwvdGVtcGxhdGU+XG5cbiIsImNyZWF0ZS50cyI6ImltcG9ydCB7IGNyZWF0ZVZOb2RlIH0gZnJvbSAndnVlJ1xuaW1wb3J0IENvbXAgZnJvbSAnLi9Db21wLnZ1ZSdcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gY3JlYXRlKCkge1xuXHRyZXR1cm4gY3JlYXRlVk5vZGUoQ29tcClcbn0ifQ==

Steps to reproduce

通过createVNode创建的VNode,添加到template上,传入的响应式变量,在其变动后,组件未刷新; 如果通过component组件挂载该VNode,则不存在该问题。

What is expected?

template中的VNode具备响应性

What is actually happening?

template中的VNode未具备响应性

System Info

No response

Any additional comments?

No response

avatar
Jun 21st 2022

请先确保minimal reproduction能运行。

avatar
Jun 21st 2022

请先确保minimal reproduction能运行。

非常抱歉,已修复能运行了。 问题如 @liulinboyi 所反馈一致,修复结果也达到预期。