MCPcopy Create free account
hub / github.com/TruthHun/BookStack / performLeave

Function performLeave

static/vuejs/vue.js:6579–6608  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6577 }
6578
6579 function performLeave () {
6580 // the delayed leave may have already been cancelled
6581 if (cb.cancelled) {
6582 return
6583 }
6584 // record leaving element
6585 if (!vnode.data.show) {
6586 (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;
6587 }
6588 beforeLeave && beforeLeave(el);
6589 if (expectsCSS) {
6590 addTransitionClass(el, leaveClass);
6591 addTransitionClass(el, leaveActiveClass);
6592 nextFrame(function () {
6593 addTransitionClass(el, leaveToClass);
6594 removeTransitionClass(el, leaveClass);
6595 if (!cb.cancelled && !userWantsControl) {
6596 if (isValidDuration(explicitLeaveDuration)) {
6597 setTimeout(cb, explicitLeaveDuration);
6598 } else {
6599 whenTransitionEnds(el, type, cb);
6600 }
6601 }
6602 });
6603 }
6604 leave && leave(el, cb);
6605 if (!expectsCSS && !userWantsControl) {
6606 cb();
6607 }
6608 }
6609}
6610
6611// only used in dev mode

Callers 1

leaveFunction · 0.70

Calls 7

addTransitionClassFunction · 0.70
nextFrameFunction · 0.70
removeTransitionClassFunction · 0.70
isValidDurationFunction · 0.70
whenTransitionEndsFunction · 0.70
leaveFunction · 0.70
cbFunction · 0.70

Tested by

no test coverage detected