File tree Expand file tree Collapse file tree 5 files changed +426
-359
lines changed
Filter options
Expand file tree Collapse file tree 5 files changed +426
-359
lines changed
Original file line number Diff line number Diff line change
1
+ declare var document: Document ;
2
+
1
3
declare module 'path-to-regexp' {
2
4
declare var exports: {
3
5
( path : string , keys : Array < ?{ name : string } > ) : RegExp ;
Original file line number Diff line number Diff line change 53
53
"eslint" : " ^3.0.1" ,
54
54
"eslint-config-vue" : " ^2.0.1" ,
55
55
"eslint-plugin-flow-vars" : " ^0.5.0" ,
56
- "eslint-plugin-vue" : " ^1 .0.0 " ,
56
+ "eslint-plugin-vue" : " ^2 .0.1 " ,
57
57
"express" : " ^4.14.0" ,
58
58
"express-urlrewrite" : " ^1.2.0" ,
59
- "flow-bin" : " ^0.33 .0" ,
59
+ "flow-bin" : " ^0.40 .0" ,
60
60
"gitbook-plugin-edit-link" : " ^2.0.2" ,
61
- "gitbook-plugin-github" : " ^2 .0.0" ,
61
+ "gitbook-plugin-github" : " ^3 .0.0" ,
62
62
"jasmine" : " 2.5.3" ,
63
63
"nightwatch" : " ^0.9.5" ,
64
64
"nightwatch-helpers" : " ^1.0.0" ,
75
75
"typescript" : " ^2.0.3" ,
76
76
"uglify-js" : " ^2.7.0" ,
77
77
"vue" : " ^2.1.0" ,
78
- "vue-loader" : " ^10 .0.0" ,
78
+ "vue-loader" : " ^11 .0.0" ,
79
79
"vue-template-compiler" : " ^2.1.0" ,
80
80
"webpack" : " ^2.2.0" ,
81
81
"webpack-dev-middleware" : " ^1.9.0"
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ export class History {
17
17
readyCbs: Array < Function > ;
18
18
19
19
// implemented by sub-classes
20
- go: ( n : number ) => void ;
21
- push: ( loc : RawLocation ) => void ;
22
- replace: ( loc : RawLocation ) => void ;
23
- ensureURL: ( push ? : boolean ) => void ;
24
- getCurrentLocation: ( ) => string ;
20
+ + go : ( n : number ) = > void ;
21
+ + push : ( loc : RawLocation ) = > void ;
22
+ + replace : ( loc : RawLocation ) = > void ;
23
+ + ensureURL : ( push ? : boolean ) = > void ;
24
+ + getCurrentLocation : ( ) = > string ;
25
25
26
26
constructor ( router : Router , base : ?string ) {
27
27
this . router = router
@@ -150,7 +150,7 @@ function normalizeBase (base: ?string): string {
150
150
if ( inBrowser ) {
151
151
// respect <base> tag
152
152
const baseEl = document . querySelector ( 'base' )
153
- base = baseEl ? baseEl . getAttribute ( 'href' ) : '/'
153
+ base = ( baseEl && baseEl . getAttribute ( 'href' ) ) || '/'
154
154
} else {
155
155
base = '/'
156
156
}
Original file line number Diff line number Diff line change @@ -77,7 +77,8 @@ function getScrollPosition (): ?Object {
77
77
}
78
78
79
79
function getElementPosition ( el : Element ) : Object {
80
- const docRect = document . documentElement . getBoundingClientRect ( )
80
+ const docEl : any = document . documentElement
81
+ const docRect = docEl . getBoundingClientRect ( )
81
82
const elRect = el . getBoundingClientRect ( )
82
83
return {
83
84
x : elRect . left - docRect . left ,
You can’t perform that action at this time.
0 commit comments