]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: comment on slot optimization hint [ci skip]
authorEvan You <yyx990803@gmail.com>
Tue, 30 Jun 2020 16:01:05 +0000 (12:01 -0400)
committerEvan You <yyx990803@gmail.com>
Tue, 30 Jun 2020 16:01:05 +0000 (12:01 -0400)
packages/runtime-core/src/componentSlots.ts

index 28f6ab1ef484c67eaa294376f3895320f47e5734..1ab6a0c27200838fdb028706375d30af8f0cd3e5 100644 (file)
@@ -36,6 +36,10 @@ export type RawSlots = {
   // normalizeChildren when the component vnode is created.
   _ctx?: ComponentInternalInstance | null
   // internal, indicates compiler generated slots
+  // we use a reserved property instead of a vnode patchFlag because the slots
+  // object may be directly passed down to a child component in a manual
+  // render funciton, and the optimization hint need to be on the slot object
+  // itself to be preserved.
   _?: 1
 }