A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://stackoverflow.com/questions/61779066/velocity-is-not-defined-vuejs below:

vue.js - Velocity is not defined: VUEJS

I am trying to use Velocity.js with my Vuejs but it gives me the error Velocity not defined:

This is my Vuejs Code:

<div class="anim_container">
    <transition @before-enter="beforeEnter" @enter="enter" appear>
      <div class="icon icon_phone" delay="0" left="100"></div>
    </transition>
</div>

and

methods: {
    beforeEnter(el) {
      el.style.left = "-200px";
      el.style.opacity = 0;
    },
    enter(el, done) {
      let delay = parseInt(el.getAttribute("delay"));
      let left = parseInt(el.getAttribute("left"));
      console.log(el);
      Velocity(
        el,
        { opacity: 1, left },
        { delay, duration: 2000, complete: done }
      );
    }
  }

I've also tried to use it through npm package

import Velocity from 'velocity-animate';

Vue.use(Velocity);

It does not work either.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4