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

Function performLeave

static/vuejs/vue.runtime.js:6131–6160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6129 }
6130
6131 function performLeave () {
6132 // the delayed leave may have already been cancelled
6133 if (cb.cancelled) {
6134 return
6135 }
6136 // record leaving element
6137 if (!vnode.data.show) {
6138 (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;
6139 }
6140 beforeLeave && beforeLeave(el);
6141 if (expectsCSS) {
6142 addTransitionClass(el, leaveClass);
6143 addTransitionClass(el, leaveActiveClass);
6144 nextFrame(function () {
6145 addTransitionClass(el, leaveToClass);
6146 removeTransitionClass(el, leaveClass);
6147 if (!cb.cancelled && !userWantsControl) {
6148 if (isValidDuration(explicitLeaveDuration)) {
6149 setTimeout(cb, explicitLeaveDuration);
6150 } else {
6151 whenTransitionEnds(el, type, cb);
6152 }
6153 }
6154 });
6155 }
6156 leave && leave(el, cb);
6157 if (!expectsCSS && !userWantsControl) {
6158 cb();
6159 }
6160 }
6161}
6162
6163// 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