10 2017 档案

摘要:可以用于滚动到一定距离以后让他实现定位效果。 比如滚动到50px的时候让导航栏固定定位。 用法:给最外层的div设置绝对定位 然后要固定的div设置position:sticky; top:0; 这样就实现了滚动到一定距离固定定位的效果。 阅读全文
posted @ 2017-10-31 11:58 一只吱吱侠 阅读(435) 评论(0) 推荐(0)
摘要:首先通过npm i vue-awesome-swiper --save 来在vue中下载插件 然后再main.js中引入 require('swiper/dist/css/swiper.css')import VueAwesomeSwiper from 'vue-awesome-swiper'Vue 阅读全文
posted @ 2017-10-24 15:29 一只吱吱侠 阅读(17383) 评论(2) 推荐(0)
摘要://钩子 登录拦截 router.beforeEach((to, from, next) => { const sessionToken = window.sessionStorage.getItem("token"); if(to.path === '/' || to.path === '/Login') { next(); } else {//在这里可以做一些路由判断哦 i... 阅读全文
posted @ 2017-10-24 12:00 一只吱吱侠 阅读(326) 评论(0) 推荐(0)