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

Function performLeave

static/vuejs/vue.runtime.common.js:6137–6166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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