Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages-private/vapor-e2e-test/interop/VaporComp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const slotProp = ref('slot prop')
change slot prop
</button>
<div class="vdom-slot-in-vapor-default">
#default: <slot :foo="slotProp" />
#default:
<slot :foo="slotProp" />
</div>
<div class="vdom-slot-in-vapor-test">
#test: <slot name="test">fallback content</slot>
Expand All @@ -40,7 +41,7 @@ const slotProp = ref('slot prop')
>
Toggle default slot to vdom
</button>
<VdomComp :msg="msg">
<VdomComp :msg="msg" class="foo">
<template #default="{ foo }" v-if="passSlot">
<div>slot prop: {{ foo }}</div>
<div>component prop: {{ msg }}</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime-vapor/src/vdomInterop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function createVDOMComponent(
const frag = new VaporFragment([])
const vnode = createVNode(
component,
rawProps && new Proxy(rawProps, rawPropsProxyHandlers),
rawProps && extend({}, new Proxy(rawProps, rawPropsProxyHandlers)),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass a plain object instead of a Proxy one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another solution is to add a set trap to rawPropsProxyHandlers

)
const wrapper = new VaporComponentInstance(
{ props: component.props },
Expand Down