Skip to content

Commit 64fbf7b

Browse files
committed
fix title
1 parent 4d926b7 commit 64fbf7b

38 files changed

+2
-75
lines changed

src/router/advanced/data-fetching.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 13
55
---
66

7-
# 数据获取
8-
97
有时候,进入某个路由后,需要从服务器获取数据。例如,在渲染用户信息时,你需要从服务器获取用户的数据。我们可以通过两种方式来实现:
108

119
- **导航完成之后获取**:先完成导航,然后在接下来的组件生命周期钩子中获取数据。在数据获取期间显示『加载中』之类的指示。

src/router/advanced/lazy-loading.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 15
55
---
66

7-
# 路由懒加载
8-
97
当打包构建应用时,Javascript 包会变得非常大,影响页面加载。如果我们能把不同路由对应的组件分割成不同的代码块,然后当路由被访问的时候才加载对应组件,这样就更加高效了。
108

119
结合 Vue 的 [异步组件](http://vuejs.org/guide/components.html#Async-Components) 和 Webpack 的 [code splitting feature](https://webpack.github.io/docs/code-splitting.html), 轻松实现路由组件的懒加载。

src/router/advanced/meta.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 11
55
---
66

7-
# 路由元信息
8-
97
定义路由的时候可以配置 `meta` 字段:
108

119
``` js

src/router/advanced/navigation-guards.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 10
55
---
66

7-
# 导航钩子
8-
97
>(译者:『导航』表示路由正在发生改变。)
108
119
正如其名,`vue-router` 提供的导航钩子主要用来拦截导航,让它完成跳转或取消。有多种方式可以在路由导航发生时执行钩子:全局的, 单个路由独享的, 或者组件级的。

src/router/advanced/scroll-behavior.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 14
55
---
66

7-
# 滚动行为
8-
97
使用前端路由,当切换到新路由时,想要页面滚到顶部,或者是保持原先的滚动位置,就像重新加载页面那样。 `vue-router` 能做到,而且更好,它让你可以自定义路由切换时页面如何滚动。
108

119
**注意: 这个功能只在 HTML5 history 模式下可用。**

src/router/advanced/transitions.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 12
55
---
66

7-
# 过渡动效
8-
97
`<router-view>` 是基本的动态组件,所以我们可以用 `<transition>` 组件给它添加一些过渡效果:
108

119

src/router/api/component-injections.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 21
55
---
66

7-
# 对组件注入
8-
97
### 注入的属性
108

119

src/router/api/options.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 19
55
---
66

7-
# Router 构造配置
8-
97
### routes
108

119
- 类型: `Array<RouteConfig>`

src/router/api/route-object.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 18
55
---
66

7-
# 路由信息对象
8-
97
一个 **route object(路由信息对象)** 表示当前激活的路由的状态信息,包含了当前 URL 解析得到的信息,还有 URL 匹配到的 **route records(路由记录)**
108

119

src/router/api/router-instance.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 20
55
---
66

7-
# Router 实例
8-
97
### 属性
108

119
#### router.app

src/router/api/router-link.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 16
55
---
66

7-
# `<router-link>`
8-
97
`<router-link>` 组件支持用户在具有路由功能的应用中(点击)导航。
108
通过 `to` 属性指定目标地址,默认渲染成带有正确链接的 `<a>` 标签,可以通过配置 `tag` 属性生成别的标签.。另外,当目标路由成功激活时,链接元素自动设置一个表示激活的 CSS 类名。
119

src/router/api/router-view.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 17
55
---
66

7-
# `<router-view>`
8-
97
`<router-view>` 组件是一个 functional 组件,渲染路径匹配到的视图组件。`<router-view>` 渲染的组件还可以内嵌自己的 `<router-view>`,根据嵌套路径,渲染嵌套组件。
108

119
### 属性

src/router/essentials/dynamic-matching.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 3
55
---
66

7-
# 动态路由匹配
8-
97
我们经常需要把某种模式匹配到的所有路由,全都映射到同个组件。例如,我们有一个 `User` 组件,对于所有 ID 各不相同的用户,都要使用这个组件来渲染。那么,我们可以在 `vue-router` 的路由路径中使用『动态路径参数』(dynamic segment)来达到这个效果:
108

119

src/router/essentials/getting-started.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 2
55
---
66

7-
# 起步
8-
97
> 教程中的案例代码将使用 [ES2015](https://github.com/lukehoban/es6features) 来编写。
108
119
用 Vue.js + vue-router 创建单页应用,是非常简单的。使用 Vue.js 时,我们就已经把组件组合成一个应用了,当你要把 vue-router 加进来,只需要配置组件和路由映射,然后告诉 vue-router 在哪里渲染它们。下面是个基本例子:

src/router/essentials/history-mode.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 9
55
---
66

7-
# HTML5 History 模式
8-
97
`vue-router` 默认 hash 模式 —— 使用 URL 的 hash 来模拟一个完整的 URL,于是当 URL 改变时,页面不会重新加载。
108

119
如果不想要很丑的 hash,我们可以用路由的 **history 模式**,这种模式充分利用 `history.pushState` API 来完成 URL 跳转而无须重新加载页面。

src/router/essentials/named-routes.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 6
55
---
66

7-
# 命名路由
8-
97
有时候,通过一个名称来标识一个路由显得更方便一些,特别是在链接一个路由,或者是执行一些跳转的时候。你可以在创建 Router 实例的时候,在 `routes` 配置中给某个路由设置名称。
108

119
``` js

src/router/essentials/named-views.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 7
55
---
66

7-
# 命名视图
8-
97
有时候想同时(同级)展示多个视图,而不是嵌套展示,例如创建一个布局,有 `sidebar`(侧导航) 和 `main`(主内容) 两个视图,这个时候命名视图就派上用场了。你可以在界面中拥有多个单独命名的视图,而不是只有一个单独的出口。如果 `router-view` 没有设置名字,那么默认为 `default`
108

119

src/router/essentials/navigation.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 5
55
---
66

7-
# 编程式的导航
8-
97
除了使用 `<router-link>` 创建 a 标签来定义导航链接,我们还可以借助 router 的实例方法,通过编写代码来实现。
108

119
#### `router.push(location)`

src/router/essentials/nested-routes.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 4
55
---
66

7-
# 嵌套路由
8-
97
实际生活中的应用界面,通常由多层嵌套的组件组合而成。同样地,URL 中各段动态路径也按某种结构对应嵌套的各层组件,例如:
108

119
```

src/router/essentials/redirect-and-alias.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 8
55
---
66

7-
# 重定向 和 别名
8-
97
### 重定向
108

119
重定向也是通过 `routes` 配置来完成,下面例子是从 `/a` 重定向到 `/b`

src/router/installation.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: router
44
order: 1
55
---
66

7-
# 安装
8-
97
### 直接下载 / CDN
108

119
[https://unpkg.com/vue-router](https://unpkg.com/vue-router)

src/vue-resource

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit bb56a4e3f03ca6d68e7c9450a56550b1362e6125
1+
Subproject commit ed200107d6db4e606c53940d87ae7628dab28435

src/vuex/actions.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 7
55
---
66

7-
# Actions
8-
97
Actions are similar to mutations, the difference being that:
108

119
- Instead of mutating the state, actions commit mutations.

src/vuex/api.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
2-
title: API
2+
title: API 参考
33
type: vuex
44
order: 15
55
---
66

7-
# API Reference
8-
97
### Vuex.Store
108

119
``` js

src/vuex/forms.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ type: vuex
44
order: 12
55
---
66

7-
# Form Handling
87

98
When using Vuex in strict mode, it could be a bit tricky to use `v-model` on a piece of state that belongs to Vuex:
109

src/vuex/getters.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 5
55
---
66

7-
# Getters
8-
97
Sometimes we may need to compute derived state based on store state, for example filtering through a list of items and counting them:
108

119
``` js

src/vuex/getting-started.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 3
55
---
66

7-
# Getting Started
8-
97
At the center of every Vuex application is the **store**. A "store" is basically a container that holds your application **state**. There are two things that makes a Vuex store different from a plain global object:
108

119
1. Vuex stores are reactive. When Vue components retrieve state from it, they will reactively and efficiently update if the store's state changes.

src/vuex/hot-reload.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 14
55
---
66

7-
# Hot Reloading
8-
97
Vuex supports hot-reloading mutations, modules, actions and getters during development, using Webpack's [Hot Module Replacement API](https://webpack.github.io/docs/hot-module-replacement.html). You can also use it in Browserify with the [browserify-hmr](https://github.com/AgentME/browserify-hmr/) plugin.
108

119
For mutations and modules, you need to use the `store.hotUpdate()` API method:

src/vuex/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 0
55
---
66

7-
# Vuex
8-
97
> 注意: 这是 vuex@2.x 文档。
108
119
- [查看 1.0 文档?](https://github.com/vuejs/vuex/tree/1.0/docs)

src/vuex/installation.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 1
55
---
66

7-
# 安装
8-
97
### 直接下载 / CDN
108

119
[https://unpkg.com/vuex](https://unpkg.com/vuex)

src/vuex/intro.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 2
55
---
66

7-
# Vuex 是什么?
8-
97
Vuex 是一个专门为 Vue.js 应用设计的 **状态管理模型 + 库**。它为应用内的所有组件提供集中式存储服务,其中的规则确保状态只能按预期方式变更。它可以与 Vue 官方[开发工具扩展(devtools extension)](https://github.com/vuejs/vue-devtools) 集成,提供高级特征,比如 零配置时空旅行般(基于时间轴)调试,以及状态快照 导出/导入。
108

119
### 什么是”状态管理模型“?

src/vuex/modules.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 8
55
---
66

7-
# Modules
8-
97
Due to using a single state tree, all state of our application is contained inside one big object. However, as our application grows in scale, the store can get really bloated.
108

119
To help with that, Vuex allows us to divide our store into **modules**. Each module can contain its own state, mutations, actions, getters, and even nested modules - it's fractal all the way down:

src/vuex/mutations.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 6
55
---
66

7-
# Mutations
8-
97
The only way to actually change state in a Vuex store is by committing a mutation. Vuex mutations are very similar to events: each mutation has a string **type** and a **handler**. The handler function is where we perform actual state modifications, and it will receive the state as the first argument:
108

119
``` js

src/vuex/plugins.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 10
55
---
66

7-
# Plugins
8-
97
Vuex 的 store 接收 `plugins` 选项,这个选项暴露出每个 mutation 的钩子。一个 Vuex 的插件就是一个简单的方法,接收 sotre 作为唯一参数:
108

119
``` js

src/vuex/state.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 4
55
---
66

7-
# State
8-
97
### 单一状态树
108

119
Vuex 使用 **单一状态树** - 是的,用一个对象就包含了全部的应用层级状态,然后作为一个『唯一数据源(SSOT)』而存在。这也意味着,每一个应用将只有一个 store 实例。单一状态树让我们能够直接地定位任一特定的状态片段,在调试的过程中也能轻易地取得整个当前应用状态的快照。

src/vuex/strict.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 11
55
---
66

7-
# 严格模式
8-
97
要启用严格模式,只需在创建 Vuex store 的时候简单地传入 `strict: true`
108

119
``` js

src/vuex/structure.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 9
55
---
66

7-
# Application Structure
8-
97
Vuex doesn't really restrict how you structure your code. Rather, it enforces a set of high-level principles:
108

119
1. Application-level state is centralized in the store.

src/vuex/testing.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ type: vuex
44
order: 13
55
---
66

7-
# Testing
8-
97
The main parts we want to unit test in Vuex are mutations and actions.
108

119
### Testing Mutations

0 commit comments

Comments
 (0)