]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: tweaks
authordaiwei <daiwei521@126.com>
Thu, 14 Aug 2025 13:01:12 +0000 (21:01 +0800)
committerdaiwei <daiwei521@126.com>
Thu, 14 Aug 2025 13:01:12 +0000 (21:01 +0800)
packages/compiler-ssr/src/transforms/ssrTransformComponent.ts
packages/runtime-vapor/src/dom/hydration.ts
packages/runtime-vapor/src/insertionState.ts

index 55ae8e453466f4f65ab9d5d59f00c825c42c0ecd..94492449e7bf8127b5b8946ca2793307e24032ad 100644 (file)
@@ -456,7 +456,6 @@ function injectVaporAnchors(
       }
     }
 
-    // inject anchor before and after the child
     if (insertionAnchor) {
       newChildren.push(createAnchor(`[${insertionAnchor}`))
     }
@@ -467,7 +466,6 @@ function injectVaporAnchors(
     const blockAnchorLabel = getBlockAnchorLabel(child)
     if (blockAnchorLabel) newChildren.push(createAnchor(blockAnchorLabel))
 
-    // inject insertion anchor
     if (insertionAnchor) {
       newChildren.push(createAnchor(`${insertionAnchor}]`))
     }
@@ -485,7 +483,6 @@ function injectIfAnchors(
   lastBranchIndex: number,
   children: TemplateChildNode[],
 ) {
-  // inject anchor before if node
   if (insertionAnchor) {
     newChildren.push(createAnchor(`[${insertionAnchor}`))
   }
@@ -525,7 +522,6 @@ function injectIfAnchors(
     }
     newChildren.push(wrapperNode)
 
-    // inject block anchor
     if (blockAnchorLabel) {
       const repeatCount = j - i - (isElse ? 1 : 0) + 1
       wrapperNode.children.push(
@@ -535,7 +531,6 @@ function injectIfAnchors(
     node.children = injectVaporAnchors(node.children, node)
   }
 
-  // inject anchor after branch nodes
   if (insertionAnchor) {
     newChildren.push(createAnchor(`${insertionAnchor}]`))
   }
index 04b19d64d42c9a9cb2e00a4e2d79f881471ed4d9..47b6a698667462cff2742ab9f527d6783f078bcb 100644 (file)
@@ -34,6 +34,7 @@ function performHydration<T>(
     locateHydrationNode = locateHydrationNodeImpl
     // optimize anchor cache lookup
     ;(Comment.prototype as any).$fe = undefined
+    ;(Node.prototype as any).$ps = undefined
     ;(Node.prototype as any).$pa = undefined
     ;(Node.prototype as any).$ia = undefined
     ;(Node.prototype as any).$aa = undefined
index 006b4196c26f7db1eeea750cb276ac9dd8727a7f..553187374bebfb17f57d64b074dd915b2493ff5f 100644 (file)
@@ -1,5 +1,6 @@
 export let insertionParent:
   | (ParentNode & {
+      $ps?: Node
       $pa?: Node
       $ia?: Node
       $aa?: Node