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

Function performLeave

static/vuejs/vue.common.js:6585–6614  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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