add keydown

master
Aaron Yu 2022-09-04 18:25:37 +08:00
parent 9a52b3dd47
commit 711c50c609
1 changed files with 2 additions and 0 deletions

View File

@ -199,6 +199,7 @@ class App extends React.Component {
value={loginForm.account}
variant="standard"
onChange={(e) => this.setLoginForm({ account: e.target.value })}
onKeyDown={(e) => e.keyCode == 13 && this.login()}
/>
<TextField
autoFocus
@ -210,6 +211,7 @@ class App extends React.Component {
value={loginForm.password}
variant="standard"
onChange={(e) => this.setLoginForm({ password: e.target.value })}
onKeyDown={(e) => e.keyCode == 13 && this.login()}
/>
</DialogContent>
<DialogActions>