<Form-Item class="formBtn">
<i-button type="primary" @click="handleSubmit('formInline')"
class="confirm" :disabled="isDisable">登录</i-button>
</Form-Item>
methods: {
handleSubmit(name) {
this.$refs[name].validate((valid) => {
if (valid) {
this.isDisable = true
let data= this.$qs.stringify(predata)
this.$http.post('/user/login',data)
.then(res => {
this.$Message.success("登录成功");
this.isDisable = false
}).catch(error => {
this.isDisable = false
this.$Message.error("请重试");
})
} else {
this.$Message.error("输入有误,请重新输入");
}
})
},
}