Sha256: 4e8c71122ab1e3ddca5372aa7e127c52824284de790968562c91166b2cc9a9a6

Contents?: true

Size: 587 Bytes

Versions: 6

Compression:

Stored size: 587 Bytes

Contents

var _ = require('../util')
var Transition = require('../transition/transition')

module.exports = {

  priority: 1000,
  isLiteral: true,

  bind: function () {
    if (!this._isDynamicLiteral) {
      this.update(this.expression)
    }
  },

  update: function (id, oldId) {
    var el = this.el
    var vm = this.el.__vue__ || this.vm
    var hooks = _.resolveAsset(vm.$options, 'transitions', id)
    id = id || 'v'
    el.__v_trans = new Transition(el, id, hooks, vm)
    if (oldId) {
      _.removeClass(el, oldId + '-transition')
    }
    _.addClass(el, id + '-transition')
  }
}

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
statixite-1.0.2 vendor/assets/bower_components/vue/src/directives/transition.js
statixite-1.0.1 vendor/assets/bower_components/vue/src/directives/transition.js
statixite-1.0.0 vendor/assets/bower_components/vue/src/directives/transition.js
plate-lang-0.1.2 skeleton/vendor/vue/src/directives/transition.js
plate-lang-0.1.1 skeleton/vendor/vue/src/directives/transition.js
plate-lang-0.1.0 skeleton/vendor/vue/src/directives/transition.js