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>
>
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>
props: (Data & VNodeProps) | null,
): (Data & VNodeProps) | null {
if (!props) return null
- return isProxy(props) || isInternalObject(props) ? extend({}, props) : props
+ return isProxy(props) ||
+ isInternalObject(props) ||
+ // handling for vapor props
+ props.__vapor
+ ? extend({}, props)
+ : props
}
export function cloneVNode<T, U>(
export function getAttrFromRawProps(rawProps: RawProps, key: string): unknown {
if (key === '$') return
+ if (key === '__vapor') return true
// need special merging behavior for class & style
const merged = key === 'class' || key === 'style' ? ([] as any[]) : undefined
const dynamicSources = rawProps.$