cli3创建vue项目+elementUI+wow动画

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>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容