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

Function performLeave

static/vuejs/vue.runtime.esm.js:6135–6164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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