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

Function performLeave

static/vuejs/vue.esm.js:6583–6612  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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