-
- Notifications
You must be signed in to change notification settings - Fork 8.8k
fix(runtime-vapor): component emits vdom interop #13498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: minor
Are you sure you want to change the base?
Conversation
edison1105 commented Jun 19, 2025
- Playground with vapor branch
…y watching props (#13384)
@@ -52,7 +52,7 @@ const vaporInteropImpl: Omit< | |||
const instance = (vnode.component = createComponent( | |||
vnode.type as any as VaporComponent, | |||
{ | |||
$: [() => propsRef.value], | |||
$: extend([() => propsRef.value], { __interop: true }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add __interop
flag to the $
to mark props that are passed from vdom component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Use a symbol instead of
__interop
(which can also be used for other cases if needed) - Directly assign the symbol instead of using
extend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated via 56cb3b0
bb08ce3
to 26dbd3c
Compare @@ -52,7 +52,7 @@ const vaporInteropImpl: Omit< | |||
const instance = (vnode.component = createComponent( | |||
vnode.type as any as VaporComponent, | |||
{ | |||
$: [() => propsRef.value], | |||
$: extend([() => propsRef.value], { __interop: true }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Use a symbol instead of
__interop
(which can also be used for other cases if needed) - Directly assign the symbol instead of using
extend
@@ -26,7 +26,7 @@ import { renderEffect } from './renderEffect' | |||
| |||
export type RawProps = Record<string, () => unknown> & { | |||
// generated by compiler for :[key]="x" or v-bind="x" | |||
$?: DynamicPropsSource[] | |||
$?: DynamicPropsSource[] & { __interop?: boolean } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 035d935