element ui

VUX---移动端Vue组件库html

Element---一套基于Vue 2.0的桌面端组件库前端

============================================vue

11-29开启项目(version 2.0)node

Element官网连接:http://element-cn.eleme.io/#/zh-CNnpm

============================================sass

在项目中安装sass须要【注意】的是:spa

npm install sass-loader --save-devcomponent

以后还要安装node-sass,缘由是sass-loader依赖于node-sassrouter

npm install node-sass --save-devhtm

 

============================================

【 2017-12-1】

1.引入组件的时候,须要注意:

import header from './components/header'

  不能用小写的header,由于会跟h5的header重复,而后报错

import Header from './components/header'

  不能直接大写Header开头,由于大写在html会变成-

 【2017-01-12】

使用前端路由,当切换到新路由时,想要页面滚到顶部:

scrollBehavior (to, from, savedPosition) {

  if (savedPosition) {
    return savedPosition
  } else {
    return { x: 0, y: 0 }
  }

},//跳转路由的时候,页面会停留在顶端,而不是在以前页面停下来的位置(切换页面的时候滚动条没有自动到顶部解决方法)

https://router.vuejs.org/zh-cn/advanced/scroll-behavior.html

相关文章
相关标签/搜索