Skip to content

Commit

Permalink
update docs for 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 17, 2017
1 parent a739552 commit 952fb68
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
16 changes: 13 additions & 3 deletions docs/en/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,19 @@
- [Scroll Behavior](advanced/scroll-behavior.md)
- [Lazy Loading](advanced/lazy-loading.md)
- API Reference
- [router-link](api/router-link.md)
- [router-view](api/router-view.md)
- [The Route Object](api/route-object.md)
- [Router Constructor Options](api/options.md)
- [routes](api/options.md#routes)
- [mode](api/options.md#mode)
- [base](api/options.md#base)
- [linkActiveClass](api/options.md#linkactiveclass)
- [linkExactActiveClass](api/options.md#linkexactactiveclass)
- [scrollBehavior](api/options.md#scrollbehavior)
- [parseQuery / stringifyQuery](api/options.md#parsequery--stringifyquery)
- [fallback](api/options.md#fallback)
- [Router Instance](api/router-instance.md)
- [Properties](api/router-instance.md#properties)
- [Methods](api/router-instance.md#methods)
- [The Route Object](api/route-object.md)
- [Component Injections](api/component-injections.md)
- [router-link](api/router-link.md)
- [router-view](api/router-view.md)
3 changes: 2 additions & 1 deletion docs/en/advanced/scroll-behavior.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The `scrollBehavior` function receives the `to` and `from` route objects. The th
The function can return a scroll position object. The object could be in the form of:

- `{ x: number, y: number }`
- `{ selector: string }`
- `{ selector: string, offset? : { x: number, y: number }}` (offset only supported in 2.6.0+)

If a falsy value or an empty object is returned, no scrolling will happen.

Expand Down Expand Up @@ -53,6 +53,7 @@ scrollBehavior (to, from, savedPosition) {
if (to.hash) {
return {
selector: to.hash
// , offset: { x: 0, y: 10 }
}
}
}
Expand Down
14 changes: 14 additions & 0 deletions docs/en/api/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
children?: Array<RouteConfig>; // for nested routes
beforeEnter?: (to: Route, from: Route, next: Function) => void;
meta?: any;

// 2.6.0+
caseSensitive?: boolean; // use case sensitive match? (default: false)
pathToRegexpOptions?: Object; // path-to-regexp options for compiling regex
}
```

Expand Down Expand Up @@ -86,3 +90,13 @@
- type: `Function`

Provide custom query string parse / stringify functions. Overrides the default.

### fallback

> 2.6.0+
- type: `boolean`

Controls whether the router should fallback to `hash` mode when the browser does not support `history.pushState`. Defaults to `true`.

Setting this to `false` essentially makes every `router-link` navigation a full page refresh in IE9. This is useful when the app is server-rendered and needs to work in IE9, because a hash mode URL does not work with SSR.

0 comments on commit 952fb68

Please sign in to comment.