Mar*_*ube 2 webpack vue.js vue-cli anime.js
I installed Anime.js with npm as a dependencie to my project. Now i have a java script file "animate" where I have my anime code. How to link my component with my animate file to make the magic happen ? thanks for reading.
Anime.js在 NPM 上可用。要与 vue-cli 一起使用,请先安装它:
npm install --save animejs
Run Code Online (Sandbox Code Playgroud)
在您的.js或.vue文件中,导入anime函数:
npm install --save animejs
Run Code Online (Sandbox Code Playgroud)
在那之后,anime函数/对象将可以在该文件中使用。
例子:
使用import anime from 'animejs';(要获取对 DOM 元素的引用,可以使用refs)在您的组件中导入函数:
import anime from 'animejs';
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4226 次 |
| 最近记录: |