File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 18
18
例
19
19
< % } %>
20
20
<select class =" version-select" >
21
+ <option value =" rc" >2.0-rc</option >
21
22
<option selected >1.0</option >
22
23
<option >0.12</option >
23
24
</select >
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 ) {
57
+ if ( version . indexOf ( 'rc' ) === 0 ) {
58
+ var section = window . location . pathname . match ( / \/ ( \w + ?) \/ / ) [ 1 ]
59
+ window . location . assign ( 'http://rc.vuejs.org/' + section + '/' )
60
+ } else if ( version . indexOf ( '1.' ) !== 0 ) {
58
61
version = version . replace ( '.' , '' )
59
62
var section = window . location . pathname . match ( / \/ ( \w + ?) \/ / ) [ 1 ]
60
63
window . location . assign ( 'http://' + version + '-jp.vuejs.org/' + section + '/' )
You can’t perform that action at this time.
0 commit comments