File tree Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * vue-router v2.0.0-rc.1
3
+ * (c) 2016 Evan You
4
+ * @license MIT
5
+ */
1
6
( function ( global , factory ) {
2
7
typeof exports === 'object' && typeof module !== 'undefined' ? module . exports = factory ( ) :
3
8
typeof define === 'function' && define . amd ? define ( factory ) :
1353
1358
return isNumber ( obj . x ) || isNumber ( obj . y )
1354
1359
}
1355
1360
1356
- function normalizePosotion ( obj ) {
1361
+ function normalizePosition ( obj ) {
1357
1362
return {
1358
1363
x : isNumber ( obj . x ) ? obj . x : window . pageXOffset ,
1359
1364
y : isNumber ( obj . y ) ? obj . y : window . pageYOffset
1456
1461
if ( el ) {
1457
1462
position = getElementPosition ( el )
1458
1463
} else if ( isValidPosition ( shouldScroll ) ) {
1459
- position = normalizePosotion ( shouldScroll )
1464
+ position = normalizePosition ( shouldScroll )
1460
1465
}
1461
1466
} else if ( isObject && isValidPosition ( shouldScroll ) ) {
1462
- position = normalizePosotion ( shouldScroll )
1467
+ position = normalizePosition ( shouldScroll )
1463
1468
}
1464
1469
1465
1470
if ( position ) {
1649
1654
this . index = 0
1650
1655
} ;
1651
1656
1657
+ AbstractHistory . prototype . getLocation = function getLocation ( ) {
1658
+ return '/'
1659
+ } ;
1660
+
1652
1661
return AbstractHistory ;
1653
1662
} ( History ) ) ;
1654
1663
1734
1743
} ;
1735
1744
1736
1745
VueRouter . prototype . setInitialLocation = function setInitialLocation ( location ) {
1746
+ var route = this . match ( location )
1737
1747
if ( this . history instanceof AbstractHistory ) {
1738
- this . history . setInitialRoute ( this . match ( location ) )
1748
+ this . history . setInitialRoute ( route )
1749
+ }
1750
+ if ( this . app ) {
1751
+ this . app . _route = route
1739
1752
}
1740
1753
} ;
1741
1754
You can’t perform that action at this time.
0 commit comments