slotFlags.d.ts 888 B

12345678910111213141516171819202122
  1. declare const enum SlotFlags {
  2. /**
  3. * Stable slots that only reference slot props or context state. The slot
  4. * can fully capture its own dependencies so when passed down the parent won't
  5. * need to force the child to update.
  6. */
  7. STABLE = 1,
  8. /**
  9. * Slots that reference scope variables (v-for or an outer slot prop), or
  10. * has conditional structure (v-if, v-for). The parent will need to force
  11. * the child to update because the slot does not fully capture its dependencies.
  12. */
  13. DYNAMIC = 2,
  14. /**
  15. * `<slot/>` being forwarded into a child component. Whether the parent needs
  16. * to update the child is dependent on what kind of slots the parent itself
  17. * received. This has to be refined at runtime, when the child's vnode
  18. * is being created (in `normalizeChildren`)
  19. */
  20. FORWARDED = 3
  21. }
  22. export default SlotFlags;