flat: 删除hr tool

This commit is contained in:
Apcallover
2024-03-11 09:57:57 +08:00
parent a139ba3008
commit 73046d3033
4 changed files with 21 additions and 9 deletions

View File

@@ -76,8 +76,10 @@
<!--自定义列-->
<template slot="labelName" slot-scope="{ row }">
<el-tooltip effect="dark" placement="top">
<div slot="content" >{{ row.labelName }}<br /></div>
<div>{{ row.labelName | ellipsis }}</div>
<div slot="content">
<div v-for="(item, index) in clipStr(row.labelName)" :key="index"><div>{{item}}</div></div>
</div>
<span>{{ row.labelName.length > 20 ? row.labelName.substring(0, 20) : row.labelName}}</span>
</el-tooltip>
</template>
<template slot="resume" slot-scope="{ row }">
@@ -1147,7 +1149,16 @@ export default {
this.selectionClear();
});
},
clipStr(str) {
const clip = []
if(str && str.length > 50) {
for (let i = 0; i < Math.ceil(str.length / 50); i++) {
clip.push(str.slice(i * 50,i * 50 + 50))
}
return clip
}
return [str]
},
},
};