mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-05 23:46:28 +08:00
remove unused code in demo
This commit is contained in:
parent
2260701865
commit
a8c4f53922
@ -36,12 +36,6 @@ const columns = [{
|
|||||||
dataIndex: 'age',
|
dataIndex: 'age',
|
||||||
}];
|
}];
|
||||||
|
|
||||||
const customLocale = {
|
|
||||||
timezoneOffset: 8 * 60,
|
|
||||||
firstDayOfWeek: 1,
|
|
||||||
minimalDaysInFirstWeek: 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
const Page = React.createClass({
|
const Page = React.createClass({
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
return {
|
return {
|
||||||
@ -127,10 +121,6 @@ const App = React.createClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
const locale = { ...this.state.locale };
|
|
||||||
if (locale.DatePicker) {
|
|
||||||
locale.DatePicker = { ...locale.DatePicker, ...customLocale };
|
|
||||||
}
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="change-locale">
|
<div className="change-locale">
|
||||||
@ -140,7 +130,7 @@ const App = React.createClass({
|
|||||||
<Radio.Button key="cn">中文</Radio.Button>
|
<Radio.Button key="cn">中文</Radio.Button>
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</div>
|
</div>
|
||||||
<LocaleProvider locale={locale}><Page /></LocaleProvider>
|
<LocaleProvider locale={this.state.locale}><Page /></LocaleProvider>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user