Skip to content

Commit 952fb68

Browse files
committed
update docs for 2.6
1 parent a739552 commit 952fb68

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

docs/en/SUMMARY.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,19 @@
2323
- [Scroll Behavior](advanced/scroll-behavior.md)
2424
- [Lazy Loading](advanced/lazy-loading.md)
2525
- API Reference
26-
- [router-link](api/router-link.md)
27-
- [router-view](api/router-view.md)
28-
- [The Route Object](api/route-object.md)
2926
- [Router Constructor Options](api/options.md)
27+
- [routes](api/options.md#routes)
28+
- [mode](api/options.md#mode)
29+
- [base](api/options.md#base)
30+
- [linkActiveClass](api/options.md#linkactiveclass)
31+
- [linkExactActiveClass](api/options.md#linkexactactiveclass)
32+
- [scrollBehavior](api/options.md#scrollbehavior)
33+
- [parseQuery / stringifyQuery](api/options.md#parsequery--stringifyquery)
34+
- [fallback](api/options.md#fallback)
3035
- [Router Instance](api/router-instance.md)
36+
- [Properties](api/router-instance.md#properties)
37+
- [Methods](api/router-instance.md#methods)
38+
- [The Route Object](api/route-object.md)
3139
- [Component Injections](api/component-injections.md)
40+
- [router-link](api/router-link.md)
41+
- [router-view](api/router-view.md)

docs/en/advanced/scroll-behavior.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The `scrollBehavior` function receives the `to` and `from` route objects. The th
2020
The function can return a scroll position object. The object could be in the form of:
2121

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

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

@@ -53,6 +53,7 @@ scrollBehavior (to, from, savedPosition) {
5353
if (to.hash) {
5454
return {
5555
selector: to.hash
56+
// , offset: { x: 0, y: 10 }
5657
}
5758
}
5859
}

docs/en/api/options.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
children?: Array<RouteConfig>; // for nested routes
1919
beforeEnter?: (to: Route, from: Route, next: Function) => void;
2020
meta?: any;
21+
22+
// 2.6.0+
23+
caseSensitive?: boolean; // use case sensitive match? (default: false)
24+
pathToRegexpOptions?: Object; // path-to-regexp options for compiling regex
2125
}
2226
```
2327

@@ -86,3 +90,13 @@
8690
- type: `Function`
8791

8892
Provide custom query string parse / stringify functions. Overrides the default.
93+
94+
### fallback
95+
96+
> 2.6.0+
97+
98+
- type: `boolean`
99+
100+
Controls whether the router should fallback to `hash` mode when the browser does not support `history.pushState`. Defaults to `true`.
101+
102+
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 commit comments

Comments
 (0)