]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
wip: handle $root during hydration
authordaiwei <daiwei521@126.com>
Tue, 1 Jul 2025 06:25:11 +0000 (14:25 +0800)
committerdaiwei <daiwei521@126.com>
Tue, 1 Jul 2025 06:25:11 +0000 (14:25 +0800)
packages/runtime-vapor/src/dom/template.ts

index a987f2149439bbeee3d3d4130ca6909661239f68..3bd446aff56685dc2fd3dbac9727788d3540e453 100644 (file)
@@ -15,6 +15,7 @@ export function template(html: string, root?: boolean) {
       node = adoptTemplate(currentHydrationNode!, html)!
       // dynamic node position, default is 0
       ;(node as any).$dp = n || 0
+      if (root) (node as any).$root = true
       return node
     }
     // fast path for text nodes