diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 820451525..146582f76 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -135,7 +135,18 @@ export function TPMIndexHOC(WrappedComponent) { }) } + keyupListener = (e) => { + if (e.key === "Escape") { + this.setState({ slowDownloading: false }) + } + } + componentWillUnmount() { + window.removeEventListener('keyup', this.keyupListener) + } + componentDidMount() { + window.addEventListener('keyup', this.keyupListener) + if(this.props.match.path==="/"){ document.title="创新源于实践"; }else if(this.props.match.path==="/403"){