mirror of https://github.com/vuejs/core.git
fix(runtime-vapor): ensure props are shallow reactive in VDOM component (#13502)
This commit is contained in:
parent
2074d66c90
commit
280829bf73
|
@ -16,6 +16,7 @@ import {
|
|||
isEmitListener,
|
||||
onScopeDispose,
|
||||
renderSlot,
|
||||
shallowReactive,
|
||||
shallowRef,
|
||||
simpleSetCurrentInstance,
|
||||
} from '@vue/runtime-dom'
|
||||
|
@ -163,7 +164,8 @@ function createVDOMComponent(
|
|||
|
||||
// overwrite how the vdom instance handles props
|
||||
vnode.vi = (instance: ComponentInternalInstance) => {
|
||||
instance.props = wrapper.props
|
||||
// ensure props are shallow reactive to align with VDOM behavior.
|
||||
instance.props = shallowReactive(wrapper.props)
|
||||
|
||||
const attrs = (instance.attrs = createInternalObject())
|
||||
for (const key in wrapper.attrs) {
|
||||
|
|
Loading…
Reference in New Issue