Vuejs source code problem

look at the vuejs source code, this code is a little difficult to understand, please help to interpret it, thank you! The
code is in lines 7653-7661 of the Vue.js v2.5.16 source code
var startClass = isAppear & & appearClass

? appearClass
: enterClass;

var activeClass = isAppear & & appearActiveClass

? appearActiveClass
: enterActiveClass;

var toClass = isAppear & & appearToClass

? appearToClass
: enterToClass;

what does isAppear mean here? What kind of function does the code of this ternary operator achieve as a whole?

May.22,2021

The

& & operator has a property that returns the following if the preceding is true, and the preceding returns the preceding if the preceding is false,
tests under console

var isAppear 
var appearClass ="appearClass"
var startClass = isAppear && appearClass //undefined

isAppear ='isAppear'
var startClass = isAppear && appearClass //"appearClass"

isAppear =false
var startClass = isAppear && appearClass //"false"

var isAppear =! context._isMounted | |! vnode.isRootInsert;
determine whether the instance is mounted or inserted with a node. If both are true, isAppear is false,. Then startClass, activeClass, and toClass are all classes that start with enter and control the css transition of the component.

The code in the

dist directory is packaged. It is better to look at the source code or the code in the src directory. The above code corresponds to the official document of vue ide/transitions.html" rel=" nofollow noreferrer "> https://cn.vuejs.org/v2/guide.

.
Menu