fix:解决 创建新项目编辑-描述输入框无法换行 (#1225)

This commit is contained in:
Coooder-X 2021-01-20 20:46:25 +08:00 committed by GitHub
parent 930a0a83a0
commit 89b6edf5c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions

View File

@ -271,7 +271,18 @@
this.$refs.environmentConfig.open(project.id);
},
handleEvent(event) {
if (event.keyCode === 13) {
let enter = event.keyCode;
let ctrl = event.ctrlKey;
let shift = event.shiftKey;
let alt = event.altKey;
if(enter === 13 && ctrl && !shift && !alt) {
//ctrl + enter
this.form.description += '\n';
}
if(enter === 13 && !ctrl && shift && !alt) {
//shift + enter
}
if(enter === 13 && !ctrl && !shift && !alt) {
this.submit('form')
}
},