Optimize: Use $Message to hint error

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
This commit is contained in:
Jianhui Zhao
2018-01-22 22:37:30 +08:00
parent 384c696105
commit 9cb3eba89a
2 changed files with 3 additions and 6 deletions
+2 -5
View File
@@ -8,7 +8,6 @@
<Icon type="social-tux" slot="prepend"></Icon>
</Input>
</FormItem>
<Alert v-show="errmsg" type="error">{{errmsg}}</Alert>
<FormItem>
<Button type="primary" long size="large" icon="log-in" @click="handleSubmit">Login</Button>
</FormItem>
@@ -55,7 +54,6 @@ export default {
filePos: 0,
fileStep: 512,
ws: null,
errmsg: '',
sid: '',
recvCnt: 0,
username: '',
@@ -191,7 +189,7 @@ export default {
this.terminal_loading = false;
if (resp.err) {
this.errmsg = resp.err;
this.$Message.error(resp.err);
this.logout(null, term);
return;
}
@@ -228,7 +226,6 @@ export default {
})
},
handleSubmit() {
this.errmsg = '';
this.$refs['form'].validate((valid) => {
if (valid) {
this.terminal_loading = true;
@@ -273,7 +270,7 @@ export default {
.login-container {
width: 400px;
height: 240px;
height: 200px;
top: 50%;
left: 50%;
margin-left: -200px;
+1 -1
View File
File diff suppressed because one or more lines are too long