Skip to content

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

Open
wants to merge 859 commits into
base: minor
Choose a base branch
from

Conversation

@@ -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 }),
Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

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

  1. Use a symbol instead of __interop (which can also be used for other cases if needed)
  2. Directly assign the symbol instead of using extend
Copy link
Member Author

Choose a reason for hiding this comment

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

Updated via 56cb3b0

@edison1105 edison1105 force-pushed the edison/fix/emitVdomInterop branch from bb08ce3 to 26dbd3c Compare June 20, 2025 01:20
@@ -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 }),
Copy link
Member

Choose a reason for hiding this comment

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

  1. Use a symbol instead of __interop (which can also be used for other cases if needed)
  2. Directly assign the symbol instead of using extend
@edison1105 edison1105 requested a review from yyx990803 July 3, 2025 08:48
@@ -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 }
Copy link
Member

Choose a reason for hiding this comment

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

This should be updated?

Copy link
Member Author

Choose a reason for hiding this comment

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

done 035d935

Base automatically changed from vapor to minor July 7, 2025 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: vapor related to vapor mode
6 participants