[O] Hit enter to login
This commit is contained in:
@@ -4,6 +4,7 @@ import {HttpUtils} from '@/utils/http-utils';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This component handles user login, and obtains data from the server.
|
* This component handles user login, and obtains data from the server.
|
||||||
|
* TODO: Press enter to login
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
components: {},
|
components: {},
|
||||||
@@ -70,4 +71,12 @@ export default class Login extends Vue
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is called when the user hits enter in the input boxes.
|
||||||
|
*/
|
||||||
|
public onEnter()
|
||||||
|
{
|
||||||
|
this.onLoginClick();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,15 @@
|
|||||||
|
|
||||||
<el-input v-model="username"
|
<el-input v-model="username"
|
||||||
placeholder="School Username"
|
placeholder="School Username"
|
||||||
:class="{'input-error': error !== ''}">
|
:class="{'input-error': error !== ''}"
|
||||||
|
@keyup.enter.native="onEnter">
|
||||||
</el-input>
|
</el-input>
|
||||||
|
|
||||||
<el-input v-model="password"
|
<el-input v-model="password"
|
||||||
placeholder="Veracross Password"
|
placeholder="Veracross Password"
|
||||||
show-password=""
|
show-password=""
|
||||||
:class="{'input-error': error !== ''}">
|
:class="{'input-error': error !== ''}"
|
||||||
|
@keyup.enter.native="onEnter">
|
||||||
</el-input>
|
</el-input>
|
||||||
|
|
||||||
<div class="el-form-item__error custom">{{error}}</div>
|
<div class="el-form-item__error custom">{{error}}</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user