mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-04 21:19:52 +08:00
fix: 修复输入项目名称,点击enter键,项目没有创建成功,页面没有提示
Closes 819
This commit is contained in:
parent
4122a81100
commit
4bd6c8ec71
@ -204,6 +204,7 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
@ -282,7 +283,18 @@ export default {
|
||||
},
|
||||
openEnvironmentConfig(project) {
|
||||
this.$refs.environmentConfig.open(project.id);
|
||||
}
|
||||
},
|
||||
handleEvent(event) {
|
||||
if (event.keyCode === 13) {
|
||||
this.submit('form')
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
document.addEventListener('keydown', this.handleEvent)
|
||||
},
|
||||
beforeDestroy() {
|
||||
document.removeEventListener('keydown', this.handleEvent);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user