MCPcopy Index your code
hub / github.com/keepfool/vue-tutorials / Transition

Function Transition

06.Router/basic/js/vue.js:6493–6517  ·  view source on GitHub ↗

* A Transition object that encapsulates the state and logic * of the transition. * * @param {Element} el * @param {String} id * @param {Object} hooks * @param {Vue} vm

(el, id, hooks, vm)

Source from the content-addressed store, hash-verified

6491 * @param {Vue} vm
6492 */
6493 function Transition(el, id, hooks, vm) {
6494 this.id = id;
6495 this.el = el;
6496 this.enterClass = hooks && hooks.enterClass || id + '-enter';
6497 this.leaveClass = hooks && hooks.leaveClass || id + '-leave';
6498 this.hooks = hooks;
6499 this.vm = vm;
6500 // async state
6501 this.pendingCssEvent = this.pendingCssCb = this.cancel = this.pendingJsCb = this.op = this.cb = null;
6502 this.justEntered = false;
6503 this.entered = this.left = false;
6504 this.typeCache = {};
6505 // check css transition type
6506 this.type = hooks && hooks.type;
6507 /* istanbul ignore if */
6508 if ('development' !== 'production') {
6509 if (this.type && this.type !== TYPE_TRANSITION && this.type !== TYPE_ANIMATION) {
6510 warn('invalid CSS transition type for transition="' + this.id + '": ' + this.type, vm);
6511 }
6512 }
6513 // bind
6514 var self = this;['enterNextTick', 'enterDone', 'leaveNextTick', 'leaveDone'].forEach(function (m) {
6515 self[m] = bind(self[m], self);
6516 });
6517 }
6518
6519 var p$1 = Transition.prototype;
6520

Callers

nothing calls this directly

Calls 2

warnFunction · 0.70
bindFunction · 0.70

Tested by

no test coverage detected