1.Stylus是一个CSS预处理器。

npm install stylus --save-dev
npm install stylus-loader --save-dev

使用

<style lang="stylus" rel="stylesheet/stylus">
@import "./header/header.styl"
</style>

2.animate.css 动画库

npm install animate.css --save

使用

<transition enter-active-class="animated fadeInRight">
<router-view></router-view>
</transition>

控制时间快慢, 覆盖animation-duration

<style lang="stylus" scoped>
.animated {animation-duration: 0.5s;}
</style>

3.better-scroll 滚动

npm install better-scroll --save

引用

import BScroll from 'better-scroll'
const wrapper = document.querySelector('.wrapper')
const scroll = new BScroll(wrapper)

在vue中

import BScroll from 'better-scroll';
export default {
data(){
return { }
}, mounted(){
this.$nextTick(() => {
const scroll = new BScroll(this.$el);
});
}
}

4.vue-awesome-swiper轮播图

npm install vue-awesome-swiper --save

全局使用

import Vue from 'vue'
import VueAwesomeSwiper from 'vue-awesome-swiper' import 'swiper/dist/css/swiper.css' Vue.use(VueAwesomeSwiper, /* { default global options } */)

组件使用

// require styles
import 'swiper/dist/css/swiper.css' import { swiper, swiperSlide } from 'vue-awesome-swiper' export default {
components: {
swiper,
swiperSlide
}
}

  

5.vue-lazyload图片懒加载

npm install vue-lazyload --save

在main.js使用

import Vue from 'vue'
import App from './App.vue'
import VueLazyload from 'vue-lazyload' // 引入图片懒加载模块 // error,loading是图片路径, 用require引入
Vue.use(VueLazyload, {
error: require('./assets/404.png'),
loading: require('./assets/loading.gif'),
attempt: 1
});

组件

<template>
<img v-lazy="src" />
<img v-lazy="'/static/images/index/Index-2.jpg'" alt="">
</template>

  

vue 项目要使用的库的更多相关文章

  1. 关于vue项目font字体图标库导入未显示的问题

    运行项目时,弹出以下信息:

  2. Vue项目中使用基于Vue.js的移动组件库cube-ui

    cube-ui 是滴滴公司的技术团队基于 Vue.js 实现的精致移动端组件库.很赞,基本场景是够用了,感谢开源!感谢默默奉献的你们. 刚爬完坑,就来总结啦!!希望对需要的朋友有小小的帮助. (一)创 ...

  3. vue项目使用阿里巴巴矢量图标库教程

    前言:element-ui自带的图标库还是不够全,还是需要需要引入第三方icon,自己在用的时候一直有些问题,参考了些教程,详细地记录补充下. 对于我们来说,首选的当然是阿里icon库 地址:http ...

  4. python 全栈开发,Day58(bootstrap组件,bootstrap JavaScript 插件,后台模板,图表插件,jQuery插件库,Animate.css,swiper,运行vue项目)

    一.bootstrap组件 无数可复用的组件,包括字体图标.下拉菜单.导航.警告框.弹出框等更多功能. 组件和插件的区别? 插件:一个功能,比如js文件 组件:html css js 组件包含插件 面 ...

  5. vue 项目中使用阿里巴巴矢量图标库iconfont

    原文:https://www.jianshu.com/p/38262f18eee2 1.打开iconfont阿里巴巴官网https://www.iconfont.cn 2.新建项目(这样方便后期维护图 ...

  6. 【vue.js】vue项目使用Iconfont(阿里图标库)

    vue项目使用Iconfont(阿里图标库) 2019-11-12  19:07:02  by冲冲 1.操作步骤 ① 登录阿里巴巴矢量图标库 https://www.iconfont.cn ,注册账号 ...

  7. vue - 搭建 webapp 自适应项目-使用 vant 组件库 并 可自动调节大小

    1.创建个vue 项目,这里不详细写怎么创建,参考 vue - 指令创建 vue工程 - 岑惜 - 博客园 (cnblogs.com) https://www.cnblogs.com/c2g52013 ...

  8. 简单vue项目脚手架(vue+webpack2.0+vuex+vue-router)

    github地址 使用技术栈 webpack(^2.6.1) webpack-dev-server(^2.4.5) vue(^2.3.3) vuex(^2.3.1) vue-router(^2.5.3 ...

  9. vue项目的骨架及常用组件介绍

    vue项目基础结构 一个vue的项目,我觉得最小的子集其实就是{vue,vue-router,component},vue作为基础库,为我们提供双向绑定等功能.vue-router连接不同的" ...

随机推荐

  1. linux 下启动tomca慢问题

    编辑文件vim /etc/profile 后面加入一句:export JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom" 设置立 ...

  2. Java基础之深入理解Class对象与反射机制

    深入理解Class对象 RRIT及Class对象的概念 RRIT(Run-Time Type Identification)运行时类型识别.在<Thinking in Java>一书第十四 ...

  3. Nine-patch

    http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch   This NinePatch defi ...

  4. Mapper method 'com.autoyol.mapper.trans.AccountLogMapper.getTotalIncomByMemNoLastest attempted to return null from a method with a primitive return type (int).解决方法

    1.打开日志输出,降低日志级别. <AppenderRef ref="console" level="trace"></AppenderRef ...

  5. python 类属性 、实例属性,可变数据结构作为类属性需要注意的地方

    1.一些经典的python错误不去阅读和不重视,就会把错误的做法带入到实际项目中来,甚至造成难以排查问题. 2.有一个大笨猪,按java写观察者模式,java写得是直接在类名下声明一个实例属性(不加s ...

  6. iOS 解决UIScrollView布局问题(布局受statusBar和NavigationBar影响)

    iOS APP中有一个非常好用的功能,那就是当我们在滚动一个UIScrollView滚动了很远很远的时候,假如我们想让UIScrollView回到顶部,我们绝大多数人的做法就是慢慢慢慢的滚动UIScr ...

  7. 查看本地RF版本号

    在CMD下执行:pybot --version

  8. Android开发-- The content of the adapter has changed but ListView did not receive a notification - With AsyncTask

    最近在联系开发DaysMatter时遇到一个问题: app中使用ListView来展示所有事件,每次添加完事件后使用下面代码来更新ListView. toDoListView.refreshDrawa ...

  9. 嵌入式ROOTFS transplantation

    作一个嵌入式Linux rootfs,并且实现 web 服务 1. 文件系统简介 •理论上说一个嵌入式设备如果内核能够运行起来,且不需要运行用户进程的话,是不需要文件系统的,文件系统简单的说就是一种目 ...

  10. C++中class与struct的区别(struct的类型名同时可以作为变量名)

    通常我们知道的区别: (一)默认继承权限.如果不明确指定,来自class的继承按照private继承处理,来自struct的继承按照public继承处理: (二)成员的默认访问权限.class的成员默 ...