From: Evan You Date: Mon, 2 Dec 2024 16:30:33 +0000 (+0800) Subject: wip: inheritAttrs X-Git-Tag: v3.6.0-alpha.1~16^2~253 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1636dce7883df3a7dfeddcefcb76e9a2611ff517;p=thirdparty%2Fvuejs%2Fcore.git wip: inheritAttrs --- diff --git a/packages/runtime-vapor/src/apiCreateComponentSimple.ts b/packages/runtime-vapor/src/apiCreateComponentSimple.ts index edcd778759..562fdd640b 100644 --- a/packages/runtime-vapor/src/apiCreateComponentSimple.ts +++ b/packages/runtime-vapor/src/apiCreateComponentSimple.ts @@ -48,14 +48,16 @@ export function createComponentSimple( ) as Block // single root, inherit attrs - // let i - // if (component.inheritAttrs !== false && node instanceof Element) { - // renderEffectSimple(() => { - // // for (const key in instance.attrs) { - // // i = key - // // } - // }) - // } + if ( + rawProps && + component.inheritAttrs !== false && + node instanceof Element && + Object.keys(instance.attrs).length + ) { + renderEffectSimple(() => { + // TODO + }) + } instance.scope.off() currentInstance = prevInstance