How to perform chain animation when using velocity.js animation in vue?

problem description

I introduced velocity.js animation in vue, where velocity.js documents say that chain animation can be used, like this

clipboard.png

the environmental background of the problems and what methods you have tried

I use it like this in vue, but I misreport
vue.esm.js?3153:1741 TypeError: this.$refs.rect.velocity is not a function

.

related codes

/ / Please paste the code text below (do not replace the code with pictures)

`

<div class="rect" ref="rect"></div>

`

`
mounted () {

this.$refs.rect.velocity({left: 200 }, { duration: 500 }).velocity("reverse", { duration: 2000 });

}
`

what result do you expect? What is the error message actually seen?


because you didn't introduce jq. This is the way jq is written. It is recommended that you take a look at the velocity documentation.
without jq:
Velocity (this.$refs.rect, {left: 200}, {duration: 500})
the first V pay attention to uppercase

Menu