diff --git a/scripts/demo.js b/scripts/demo.js index 767e5d8503..a95d9efb35 100644 --- a/scripts/demo.js +++ b/scripts/demo.js @@ -52,6 +52,8 @@ InstantClickChangeFns.push(function () { }); InstantClickChangeFns.push(function () { + var Select = antd.Select; + var Option = Select.Option; var versionsHistory = { '0.9.2': '09x.ant.design' }; @@ -62,17 +64,19 @@ InstantClickChangeFns.push(function () { }); var options = versions.map(function (version) { var link = versionsHistory[version]; - return ; + return ; }); - function onChange(e) { - if (versionsHistory[e.target.value]) { - location.href = location.href.replace(location.host, versionsHistory[e.target.value]); + function onChange(value) { + if (versionsHistory[value]) { + location.href = location.href.replace(location.host, versionsHistory[value]); } } - ReactDOM.render(, document.getElementById('versions-select')); + ReactDOM.render( + + , document.getElementById('versions-select')); }); module.exports = antd; diff --git a/site/static/style.css b/site/static/style.css index 4ec49bb1dd..96cb576d4f 100644 --- a/site/static/style.css +++ b/site/static/style.css @@ -1996,3 +1996,8 @@ a.entry-link:hover .anticon-smile { #instantclick-bar { background: #6EB4E0; } + +#versions-select { + position: relative; + top: -2px; +}