【发布时间】:2020-01-12 22:44:03
【问题描述】:
当clicked 状态为true 时,我正在使用 React 和 Material UI 来显示 Running check...。
否则,我将使用react-moment 显示时间戳。
<Typography gutterBottom variant="caption">
{this.state.clicked
? "Running check..."
: <Moment local format={dateFormat}>{lastCheckedDateTime}</Moment> }
</Typography>
如何在时间戳前面加上 Last checked: 这样的字符串?
【问题讨论】:
标签: javascript reactjs material-ui momentjs