fix(用例评审): 修复只读用户可以给用例评审加评论的问题

This commit is contained in:
shiziyuan9527 2020-11-25 16:23:53 +08:00
parent efcf49537f
commit 45a7a05c14

View File

@ -23,9 +23,10 @@
resize="none"
:autosize="{ minRows: 4, maxRows: 4}"
@keyup.ctrl.enter.native="sendComment"
:disabled="isReadOnly"
>
</el-input>
<el-button type="primary" size="mini" class="send-btn" @click="sendComment">
<el-button type="primary" size="mini" class="send-btn" @click="sendComment" :disabled="isReadOnly">
{{ $t('test_track.comment.send') }}
</el-button>
</div>
@ -34,6 +35,7 @@
<script>
import ReviewCommentItem from "./ReviewCommentItem";
import {checkoutTestManagerOrTestUser} from "@/common/js/utils";
export default {
name: "ReviewComment",
@ -47,8 +49,12 @@ export default {
return {
result: {},
textarea: '',
isReadOnly: false
}
},
created() {
this.isReadOnly = !checkoutTestManagerOrTestUser();
},
methods: {
sendComment() {
let comment = {};