[toc]
## pre
```
.left-enter{
transform:translateX(100%);
}
```
可以省略,默认即为0
```
.left-enter-to{
transoform:translateX(0%);
}
```
```
.left-enter-active,.left-enter-active{
transition:1s;
}
```
可以省略,默认即为0
```
.left-leave{
transoform:translateX(0%);
}
```
```
.left-leave-to{
transform:translateX(-100%);
}
```
```
<transition name="left">
<router-view class="enter"></router-view>
</transition>
```
## 左右切换
```
{
path:''
,name:''
,component:''
,meta:{
index:1
}
}
```
```
data(){
return {
name:'left'
}
}
```
```
watch:{
$route(to,from){
if(to.meta.index<from.meta.index){
this.name = 'right';
}else{
this.name = 'left';
}
}
}
```
- 空白目录
- vue-cli
- runtime-only
- Vue对比React
- 组件与实例
- data-binding
- computed的set和get
- scoped
- 事件
- 自定义指令
- 插件
- keep-alive
- $nextTick与生命周期
- 路由
- Vue.use(Router)
- this.$router编程式导航
- this.$route
- new Router
- routes
- mode
- linkClass
- scrollBehavior
- query
- fallback
- base
- router-view
- router-link
- 路由守卫
- 左右切换
- 滚动
- FAQ
- vuex
- 适用
- new Vuex.Store
- state
- mutations
- getters
- actions
- strict
- plugins
- modules
- namespace
- this.$store
- commit
- dispatch
- mapXX
- eventBus
- Vue工程相关
- 引用路径的简化
- css-module
- vue-loader
- 异步加载
- 支持jsx
- 让webpack支持对vuex的热替换
- .eslintrc