vue create test //创建项目
配置
image.png
安装elementUI
npm i element-ui -S
安装 babel-plugin-component,实现按需引入
npm install babel-plugin-component -D
//新建 .babelrc 配置按需引入
{
"presets": [["@babel/preset-env", { "modules": false }]],
"plugins": [
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}
使用
import { Button,} from 'element-ui';
components:{
[Button.name]:Button
}
安装wowjs
npm install wowjs
//main.js引入
import 'wowjs/css/libs/animate.css'
//需要添加动画的页面文件使用
import { WOW } from "wowjs";
new WOW({ live: true, offset: 120 }).init();
<section class="wow slideInLeft" data-wow-duration="2s" data-wow-delay="5s"></section>
<section class="wow slideInRight" data-wow-offset="10" data-wow-iteration="10"></section>