fix(runtime-vapor): add scope id for fallback component

This commit is contained in:
三咲智子 Kevin Deng 2024-11-15 04:10:59 +08:00
parent c223eb2684
commit 3da5ecfb5f
No known key found for this signature in database
1 changed files with 7 additions and 0 deletions

View File

@ -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
}