File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 12
12
<h2 >
13
13
<% - type === ' api' ? ' API' : (type .charAt (0 ).toUpperCase () + type .slice (1 )) %>
14
14
<select class =" version-select" >
15
- <option value =" rc " >2.0-rc </option >
16
- <option selected >1.0</option >
17
- <option >0.12</option >
18
- <option >0.11</option >
15
+ <option value =" " >2.0</option >
16
+ <option selected value = " SELF " >1.0</option >
17
+ <option value = " 012 " >0.12</option >
18
+ <option value = " 011 " >0.11</option >
19
19
</select >
20
20
</h2 >
21
21
<ul class =" menu-root" >
Original file line number Diff line number Diff line change 54
54
// version select
55
55
document . querySelector ( '.version-select' ) . addEventListener ( 'change' , function ( e ) {
56
56
var version = e . target . value
57
- if ( version . indexOf ( '1.' ) !== 0 ) {
58
- version = version . replace ( '.' , '' )
57
+ if ( version !== 'SELF' ) {
59
58
var section = window . location . pathname . match ( / \/ ( \w + ?) \/ / ) [ 1 ]
60
- window . location . assign ( 'http://' + version + '.vuejs.org/' + section + '/' )
61
- } else {
62
- // TODO when 1.x is out
59
+ window . location . assign ( 'http://' + ( version ? version + '.' : '' ) + 'vuejs.org/' + section + '/' )
63
60
}
64
61
} )
65
62
}
You can’t perform that action at this time.
0 commit comments