fix(案例评审): 案例选择未通过时高亮显示编辑框

案例选择未通过时高亮显示编辑框
This commit is contained in:
song-tianyang 2021-07-29 18:11:31 +08:00 committed by 刘瑞斌
parent c45e532c20
commit 0054a5d6ea
2 changed files with 21 additions and 6 deletions

View File

@ -15,7 +15,7 @@
</div>
</div>
<div>
<div>
<div id="editorsDiv">
<mavon-editor v-if="showEditor" @imgAdd="imgAdd" :default-open="'edit'" class="mavon-editor" :imageFilter="imageFilter"
:toolbars="richDataToolbars" @imgDel="imgDel" v-model="textarea" ref="md"/>
</div>
@ -113,10 +113,22 @@ export default {
}
});
},
/* inputLight() {
this.$refs.md.focus();
},*/
inputLight() {
let textAreaDom = this.$refs.md.getTextareaDom();
let editorDivDom = document.getElementById("editorsDiv");
if(editorDivDom){
editorDivDom.setAttribute("style","-webkit-box-shadow: 0 0 8px rgb(205,51,43);");
}
textAreaDom.focus();
},
resetInputLight(){
let editorDivDom = document.getElementById("editorsDiv");
if(editorDivDom){
editorDivDom.setAttribute("style","-webkit-box-shadow: 0 0 0px rgb(-1,0,0);");
}
},
refresh() {
this.resetInputLight();
this.$emit('getComments');
},
//
@ -171,4 +183,7 @@ export default {
overflow-y: scroll;
height: calc(100vh - 450px);
}
.editors-div{
-webkit-box-shadow: 0 0 8px rgb(-1,0,0);
}
</style>

View File

@ -272,8 +272,8 @@ export default {
}
});
} else {
/* this.$refs.reviewComment.inputLight();*/
this.$warning(this.$t('test_track.comment.description_is_null'));
this.$refs.reviewComment.inputLight();
// this.$warning(this.$t('test_track.comment.description_is_null'));
}
} else {
this.$post('/test/review/case/edit', param, () => {