MCPcopy
hub / github.com/vuejs/core / performLeave

Function performLeave

packages/runtime-core/src/renderer.ts:2111–2129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2109 }
2110 }
2111 const performLeave = () => {
2112 // #13153 move kept-alive node before v-show transition leave finishes
2113 // it needs to call the leaving callback to ensure element's `display`
2114 // is `none`
2115 const wasLeaving = el!._isLeaving || !!el![leaveCbKey]
2116 if (el!._isLeaving) {
2117 el![leaveCbKey](true /* cancelled */)
2118 }
2119 // #14031 without a pending leave, persisted transitions should skip
2120 // directive-owned leave hooks and just relocate.
2121 if (transition!.persisted && !wasLeaving) {
2122 remove()
2123 } else {
2124 leave(el!, () => {
2125 remove()
2126 afterLeave && afterLeave()
2127 })
2128 }
2129 }
2130 if (delayLeave) {
2131 delayLeave(el!, remove, performLeave)
2132 } else {

Callers 2

moveFunction · 0.85
removeFunction · 0.85

Calls 2

removeFunction · 0.70
leaveFunction · 0.50

Tested by

no test coverage detected