Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 3da5ecf

Browse files
committed
fix(runtime-vapor): add scope id for fallback component
1 parent c223eb2 commit 3da5ecf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/runtime-vapor/src/apiCreateComponent.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,14 @@ function fallbackComponent(
9696

9797
if (singleRoot) {
9898
instance.dynamicAttrs = true
99+
for (let i = 0; i < instance.scopeIds.length; i++) {
100+
const id = instance.scopeIds[i]
101+
el.setAttribute(id, '')
102+
}
99103
}
100104

105+
const scopeId = instance.type.__scopeId
106+
if (scopeId) el.setAttribute(scopeId, '')
107+
101108
return el
102109
}

0 commit comments

Comments
 (0)