fix(测试跟踪): 列表自定义字段名称过长缩略显示
This commit is contained in:
parent
9bf8109d9a
commit
51dc87d863
|
@ -691,6 +691,11 @@ export default {
|
|||
border-bottom: 1px solid rgba(31, 35, 41, 0.15);
|
||||
}
|
||||
|
||||
:deep(.el-table th > .cell) {
|
||||
word-break: keep-all !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
:deep(.ms-select-all-fixed th:nth-child(2) .table-select-icon) {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
:sortable="sortable"
|
||||
:filter-method="filterMethod"
|
||||
:filtered-value="filteredValue "
|
||||
:render-header="renderHeader"
|
||||
:show-overflow-tooltip="showOverflowTooltip">
|
||||
|
||||
<template v-slot:default="scope">
|
||||
|
@ -89,6 +90,26 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.active = true;
|
||||
},
|
||||
methods: {
|
||||
renderHeader(h, data) {
|
||||
if (data.column.label.length > 7) {
|
||||
return h("span", [
|
||||
h("el-tooltip", {
|
||||
attrs: {
|
||||
class: "item",
|
||||
effect: "dark",
|
||||
content: data.column.label,
|
||||
placement: "top"
|
||||
}
|
||||
}, [
|
||||
h("span", data.column.label)
|
||||
])
|
||||
])
|
||||
} else {
|
||||
return h("span", data.column.label);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue