|
|
|
@ -47,7 +47,7 @@ const five_min = 5 * 60 * 1000;
|
|
|
|
|
倒计时为0时,出现“重启”按钮
|
|
|
|
|
*/
|
|
|
|
|
const isSSHInIframe = false;
|
|
|
|
|
class WebSSHTimer extends React.PureComponent {
|
|
|
|
|
class WebSSHTimer extends Component {
|
|
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props)
|
|
|
|
@ -165,7 +165,6 @@ class WebSSHTimer extends React.PureComponent {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
|
|
|
console.log('======',prevProps, this.state, this.startTimeRemain);
|
|
|
|
|
// 仅初始化一次
|
|
|
|
|
if (prevProps.showTimerProp === false && this.props.showTimerProp === true) {
|
|
|
|
|
if (this.intervalHandler) {
|
|
|
|
@ -199,8 +198,8 @@ class WebSSHTimer extends React.PureComponent {
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
} else if (e.data.tp === "sshWorking") {
|
|
|
|
|
this.startTimeRemain = 60;
|
|
|
|
|
this.forceUpdate()
|
|
|
|
|
// this.startTimeRemain = 60;
|
|
|
|
|
// this.forceUpdate();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// } else {
|
|
|
|
|