fix(测试跟踪): 修复功能用例列表多个标签鼠标悬浮未用分隔符隔开显示问题

--bug=1022348 --user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001022348
This commit is contained in:
guoyuqi 2023-02-06 14:39:25 +08:00 committed by xiaomeinvG
parent e0783b3ec3
commit 208906eafe
1 changed files with 34 additions and 6 deletions

View File

@ -122,13 +122,24 @@
prop="tags"
:field="item"
:fields-width="fieldsWidth"
:label="$t('commons.tag')"
min-width="80">
min-width="80px"
:show-overflow-tooltip="false"
:label="$t('commons.tag')">
<template v-slot:default="scope">
<ms-tag v-for="(itemName,index) in scope.row.tags" :key="index" type="success" effect="plain"
:show-tooltip="scope.row.tags.length===1&&itemName.length*12<=80"
:content="itemName" style="margin-left: 0px; margin-right: 2px"/>
<span/>
<el-tooltip class="item" effect="dark" placement="top">
<div v-html="getTagToolTips(scope.row.tags)" slot="content"></div>
<div class="oneLine">
<ms-tag
v-for="(itemName, index) in scope.row.tags"
:key="index"
type="success"
effect="plain"
:show-tooltip="scope.row.tags.length === 1 && itemName.length * 12 <= 100"
:content="itemName"
style="margin-left: 0px; margin-right: 2px"/>
</div>
</el-tooltip>
<span/>
</template>
</ms-table-column>
@ -553,6 +564,17 @@ export default {
});
});
},
getTagToolTips(tags) {
try {
let showTips = '';
tags.forEach((item) => {
showTips += item + ',';
});
return showTips.substr(0, showTips.length - 1);
} catch (e) {
return '';
}
},
initConditionComponents() {
this.condition.components = initTestCaseConditionComponents(this.condition, this.testCaseTemplate.customFields, this.trashEnable);
},
@ -1072,6 +1094,12 @@ export default {
margin-left: 10px;
}
.oneLine {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
:deep(.el-table) {
overflow: auto;
}