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
43299ae4fe
commit
e1311b3062
|
@ -1,9 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="bar-container">
|
<div class="bar-container">
|
||||||
<div class="left-item bar-item">
|
<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 }}
|
{{ testCase.name }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<el-popover v-if="reviewerStatus && reviewerStatus.length > 0" placement="right" trigger="hover">
|
<el-popover v-if="reviewerStatus && reviewerStatus.length > 0" placement="right" trigger="hover">
|
||||||
|
|
||||||
<div class="status-tip" v-for="item in reviewerStatus" :key="item.author">
|
<div class="status-tip" v-for="item in reviewerStatus" :key="item.author">
|
||||||
|
@ -51,7 +57,8 @@ export default {
|
||||||
components: {ReviewStatus, MsUserIcon},
|
components: {ReviewStatus, MsUserIcon},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
reviewerStatus: null
|
reviewerStatus: null,
|
||||||
|
nameLengthLimit: 50
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
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: {
|
watch: {
|
||||||
testCase() {
|
testCase() {
|
||||||
this.getReviewerStatus();
|
this.getReviewerStatus();
|
||||||
|
|
|
@ -504,7 +504,11 @@ export default {
|
||||||
this.$refs.testReviewTestCaseEdit.openTestCaseEdit(testCase, this.tableData);
|
this.$refs.testReviewTestCaseEdit.openTestCaseEdit(testCase, this.tableData);
|
||||||
},
|
},
|
||||||
handleDelete(testCase) {
|
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'),
|
confirmButtonText: this.$t('commons.confirm'),
|
||||||
callback: (action) => {
|
callback: (action) => {
|
||||||
if (action === 'confirm') {
|
if (action === 'confirm') {
|
||||||
|
|
Loading…
Reference in New Issue