refactor(测试跟踪): 评审用例,名称显示优化
--bug=1024635 --user=陈建星 【测试跟踪】用例评审-开始评审-用例名称较长时-显示需优化 https://www.tapd.cn/55049933/s/1353144 --bug=1024637 --user=陈建星 【测试跟踪】用例评审-取消关联用例-弹窗“x”被遮挡 https://www.tapd.cn/55049933/s/1353087
This commit is contained in:
parent
9a78c63fae
commit
886da39018
|
@ -1,9 +1,15 @@
|
|||
<template>
|
||||
<div class="bar-container">
|
||||
<div class="left-item bar-item">
|
||||
<span>
|
||||
<el-tooltip v-if="longerThanLimit" :content="testCase.name" effect="dark" placement="bottom-start">
|
||||
<span>
|
||||
{{ this.displayName }}
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<span v-else>
|
||||
{{ testCase.name }}
|
||||
</span>
|
||||
|
||||
<el-popover v-if="reviewerStatus && reviewerStatus.length > 0" placement="right" trigger="hover">
|
||||
|
||||
<div class="status-tip" v-for="item in reviewerStatus" :key="item.author">
|
||||
|
@ -51,7 +57,8 @@ export default {
|
|||
components: {ReviewStatus, MsUserIcon},
|
||||
data() {
|
||||
return {
|
||||
reviewerStatus: null
|
||||
reviewerStatus: null,
|
||||
nameLengthLimit: 50
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
@ -62,6 +69,17 @@ export default {
|
|||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
displayName() {
|
||||
if (this.longerThanLimit) {
|
||||
return this.testCase.name.substring(0, this.nameLengthLimit) + '...';
|
||||
}
|
||||
return this.testCase.name;
|
||||
},
|
||||
longerThanLimit() {
|
||||
return this.testCase.name && this.testCase.name.length > this.nameLengthLimit;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
testCase() {
|
||||
this.getReviewerStatus();
|
||||
|
|
|
@ -504,7 +504,11 @@ export default {
|
|||
this.$refs.testReviewTestCaseEdit.openTestCaseEdit(testCase, this.tableData);
|
||||
},
|
||||
handleDelete(testCase) {
|
||||
this.$alert(this.$t('test_track.plan_view.confirm_cancel_relevance') + ' ' + testCase.name + " ?", '', {
|
||||
let tip = this.$t('test_track.plan_view.confirm_cancel_relevance') + ' ' + testCase.name;
|
||||
if (tip.length > 50) {
|
||||
tip = tip.substring(0, 50) + '...';
|
||||
}
|
||||
this.$alert( tip + " ?", '', {
|
||||
confirmButtonText: this.$t('commons.confirm'),
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
|
|
Loading…
Reference in New Issue