fix(测试用例): 查看测试用例页面评论组件只读

This commit is contained in:
shiziyuan9527 2020-12-21 15:12:02 +08:00
parent cd0b466c38
commit 3865bae5a4
3 changed files with 13 additions and 4 deletions

View File

@ -9,6 +9,7 @@
<review-comment-item v-for="(comment,index) in comments" <review-comment-item v-for="(comment,index) in comments"
:key="index" :key="index"
:comment="comment" :comment="comment"
:read-only="readOnly"
@refresh="getComments()"/> @refresh="getComments()"/>
<div v-if="comments.length === 0" style="text-align: center"> <div v-if="comments.length === 0" style="text-align: center">
<i class="el-icon-chat-line-square" style="font-size: 15px;color: #8a8b8d;"> <i class="el-icon-chat-line-square" style="font-size: 15px;color: #8a8b8d;">
@ -31,6 +32,10 @@ export default {
caseId: { caseId: {
type: String, type: String,
default: '' default: ''
},
readOnly: {
type: Boolean,
default: false
} }
}, },
watch: { watch: {

View File

@ -157,7 +157,7 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<case-comment :case-id="testCaseId"/> <case-comment :case-id="testCaseId" :read-only="true"/>
</el-col> </el-col>
</el-row> </el-row>

View File

@ -11,8 +11,8 @@
{{ comment.createTime | timestampFormatDate }} {{ comment.createTime | timestampFormatDate }}
</span> </span>
<span class="comment-delete"> <span class="comment-delete">
<i class="el-icon-edit" style="font-size: 9px;margin-right: 6px;" @click="openEdit"/> <el-link icon="el-icon-edit" style="font-size: 9px;margin-right: 6px;" @click="openEdit" :disabled="readOnly"/>
<i class="el-icon-close" @click="deleteComment"/> <el-link icon="el-icon-close" @click="deleteComment" :disabled="readOnly"/>
</span> </span>
<br/> <br/>
<div class="comment-desc" style="font-size: 10px;color: #303133"> <div class="comment-desc" style="font-size: 10px;color: #303133">
@ -50,7 +50,11 @@ export default {
name: "ReviewCommentItem", name: "ReviewCommentItem",
components: {MsDialogFooter}, components: {MsDialogFooter},
props: { props: {
comment: Object comment: Object,
readOnly: {
type: Boolean,
default: false
}
}, },
data() { data() {
return { return {