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

Function enter

static/vuejs/vue.common.js:6367–6513  ·  view source on GitHub ↗
(vnode, toggleDisplay)

Source from the content-addressed store, hash-verified

6365/* */
6366
6367function enter (vnode, toggleDisplay) {
6368 var el = vnode.elm;
6369
6370 // call leave callback now
6371 if (el._leaveCb) {
6372 el._leaveCb.cancelled = true;
6373 el._leaveCb();
6374 }
6375
6376 var data = resolveTransition(vnode.data.transition);
6377 if (!data) {
6378 return
6379 }
6380
6381 /* istanbul ignore if */
6382 if (el._enterCb || el.nodeType !== 1) {
6383 return
6384 }
6385
6386 var css = data.css;
6387 var type = data.type;
6388 var enterClass = data.enterClass;
6389 var enterToClass = data.enterToClass;
6390 var enterActiveClass = data.enterActiveClass;
6391 var appearClass = data.appearClass;
6392 var appearToClass = data.appearToClass;
6393 var appearActiveClass = data.appearActiveClass;
6394 var beforeEnter = data.beforeEnter;
6395 var enter = data.enter;
6396 var afterEnter = data.afterEnter;
6397 var enterCancelled = data.enterCancelled;
6398 var beforeAppear = data.beforeAppear;
6399 var appear = data.appear;
6400 var afterAppear = data.afterAppear;
6401 var appearCancelled = data.appearCancelled;
6402 var duration = data.duration;
6403
6404 // activeInstance will always be the <transition> component managing this
6405 // transition. One edge case to check is when the <transition> is placed
6406 // as the root node of a child component. In that case we need to check
6407 // <transition>'s parent for appear check.
6408 var context = activeInstance;
6409 var transitionNode = activeInstance.$vnode;
6410 while (transitionNode && transitionNode.parent) {
6411 transitionNode = transitionNode.parent;
6412 context = transitionNode.context;
6413 }
6414
6415 var isAppear = !context._isMounted || !vnode.isRootInsert;
6416
6417 if (isAppear && !appear && appear !== '') {
6418 return
6419 }
6420
6421 var startClass = isAppear && appearClass
6422 ? appearClass
6423 : enterClass;
6424 var activeClass = isAppear && appearActiveClass

Callers 2

_enterFunction · 0.70
vue.common.jsFile · 0.70

Calls 13

resolveTransitionFunction · 0.70
toNumberFunction · 0.70
isObjectFunction · 0.70
checkDurationFunction · 0.70
getHookArgumentsLengthFunction · 0.70
onceFunction · 0.70
removeTransitionClassFunction · 0.70
mergeVNodeHookFunction · 0.70
addTransitionClassFunction · 0.70
nextFrameFunction · 0.70
isValidDurationFunction · 0.70
whenTransitionEndsFunction · 0.70

Tested by

no test coverage detected