我一直在试着让TimePicker正常工作。由于某种原因,时钟指针不与时钟上的数字对齐。
Minute hand pointing at 15 but clock reads 16
这是TestPage:
import React from 'react';
import TimePicker from 'material-ui/TimePicker';
import RaisedButton from 'material-ui/RaisedButton';
require('styles/base/pages/myPage/TestPage.scss');
const TestPage = () => (
<div>
<RaisedButton label="Default" primary />
<TimePicker hintText="test" />
</div>
);
export default TestPage;
这是应用程序的index.js:
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
render(
<MuiThemeProvider muiTheme={getMuiTheme()}>
...
</MuiThemeProvider>,
document.getElementById('app')
);
TestPage正在index.js中的一条路线上呈现。
如果你我做错了,请告诉我。