From: 三咲智子 Kevin Deng Date: Thu, 14 Nov 2024 20:10:59 +0000 (+0800) Subject: fix(runtime-vapor): add scope id for fallback component X-Git-Tag: v3.6.0-alpha.1~16^2~279 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3da5ecfb5f6671dbcc12a455f6facad80905539e;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-vapor): add scope id for fallback component --- diff --git a/packages/runtime-vapor/src/apiCreateComponent.ts b/packages/runtime-vapor/src/apiCreateComponent.ts index df67f17360..0d81b41ac9 100644 --- a/packages/runtime-vapor/src/apiCreateComponent.ts +++ b/packages/runtime-vapor/src/apiCreateComponent.ts @@ -96,7 +96,14 @@ function fallbackComponent( if (singleRoot) { instance.dynamicAttrs = true + for (let i = 0; i < instance.scopeIds.length; i++) { + const id = instance.scopeIds[i] + el.setAttribute(id, '') + } } + const scopeId = instance.type.__scopeId + if (scopeId) el.setAttribute(scopeId, '') + return el }