fix(测试跟踪): 创建用例时用例名称不显示问题

This commit is contained in:
song-cc-rock 2023-03-06 15:27:23 +08:00 committed by fit2-zhao
parent e565020031
commit cbe63d6828
3 changed files with 7 additions and 4 deletions

View File

@ -4,13 +4,13 @@
<div class="case-edit-box">
<!-- 创建 or 编辑用例 -->
<div class="edit-header-container">
<div class="header-content-row">
<div class="header-content-row" :style="!isPublicShow ? 'width: 80%' : 'max-width: 65%'">
<!-- 用例名称展示与编辑 -->
<test-case-edit-name-view
:is-add="isAdd"
:editable-state="editableState"
:is-name-edit.sync="isNameEdit"
:is-public-show="isPublicShow"
:form="form"
@save="saveCaseWithoutRefresh"
/>
@ -1804,7 +1804,6 @@ export default {
.header-content-row {
display: flex;
align-items: center;
width: 80%;
.back {
margin-left: px2rem(24);
width: px2rem(20);

View File

@ -3,7 +3,7 @@
<!-- 基于form组件进行表单验证 -->
<el-form ref="caseDetailForm" :rules="rules" :model="form">
<!-- case name -->
<div class="case-name-row" v-on:keydown.enter.prevent v-if="editableState">
<div class="case-name-row" v-on:keydown.enter.prevent v-if="editable">
<div class="case-name case-title-wrap">
<div class="name title-wrap">{{ $t("case.case_name") }}</div>
<div class="required required-item"></div>

View File

@ -33,6 +33,7 @@ export default {
isNameEdit: Boolean,
editableState: Boolean,
isAdd: Boolean,
isPublicShow: Boolean
},
data() {
return {
@ -62,6 +63,9 @@ export default {
this.$emit('save');
},
handleNameClick() {
if (this.isPublicShow) {
return;
}
this.$emit('update:isNameEdit', !this.isNameEdit);
}
}