Skip to content

Instantly share code, notes, and snippets.

@QETHAN
Created November 2, 2017 06:38
Show Gist options
  • Save QETHAN/8c99a58d2a67379fada2f897d102964f to your computer and use it in GitHub Desktop.
Save QETHAN/8c99a58d2a67379fada2f897d102964f to your computer and use it in GitHub Desktop.
submitForm (formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
DetectorService.setSSHConfig(this.formData).then(
(res) => {
if (res.errcode === '0') {
this.$message({
message: 'SSH配置成功',
type: 'success',
duration: '1500'
})
} else {
this.$message({
message: 'SSH配置失败',
type: 'error',
duration: '1500'
})
}
},
(_) => {
this.$message({
message: '请求失败',
type: 'error',
duration: '1500'
})
}
)
}
})
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment