]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
wip: save
authordaiwei <daiwei521@126.com>
Thu, 31 Jul 2025 00:18:30 +0000 (08:18 +0800)
committerdaiwei <daiwei521@126.com>
Thu, 31 Jul 2025 00:18:30 +0000 (08:18 +0800)
packages/runtime-vapor/src/dom/hydration.ts
packages/runtime-vapor/src/dom/template.ts

index 68c6687f961eca6cb868c6e5d88074c656366ce1..e551d93938b5a3059286389ee70dbbd6fde569a9 100644 (file)
@@ -137,13 +137,13 @@ function locateHydrationNodeImpl(isFragment?: boolean): void {
     }
 
     // locate slot fragment start anchor
-    if (isFragment && node && !isComment(node, '[')) {
-      node = locateVaporFragmentAnchor(node, '[')!
-    } else {
-      while (node && isNonHydrationNode(node)) {
-        node = node.nextSibling!
-      }
-    }
+    // if (isFragment && node && !isComment(node, '[')) {
+    //   node = locateVaporFragmentAnchor(node, '[')!
+    // } else {
+    //   while (node && isNonHydrationNode(node)) {
+    //     node = node.nextSibling!
+    //   }
+    // }
 
     if (insertionParent && node) {
       const nextNode = node.nextSibling
index 809314111099b75a36a3a095f4f92af91187bd5e..6423b626416083d929d714642aeaf7a97ec6cd86 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