Commit 617a5909 by 李伟康

refactor(src/views/earlyWarningManager/strategyAnalysis/index.vue): 优化策略分析页面表格提示功能

1. 将表格描述列的自定义插槽从#description改为#tooltip,适配统一的提示渲染逻辑
2. 为策略说明、任务描述列配置prop和addHtml为tooltip,实现动态绑定字段的提示内容
3. 调整表头sticky样式的z-index从2提升至9,避免被其他元素遮挡
1 parent a2715552
...@@ -209,20 +209,18 @@ ...@@ -209,20 +209,18 @@
</div> </div>
</template> </template>
<template #description="scope"> <template #tooltip="scope">
<div> <el-tooltip v-if="scope.scope[scope.columnsObj.prop]"
<el-tooltip v-if="scope.scope.description" effect="dark"
effect="dark" placement="top">
placement="top"> <template #content>
<template #content> <div class="tooltip-content-max">
<div class="tooltip-content-max"> <div>{{ scope.scope[scope.columnsObj.prop] }}</div>
<div>{{ scope.scope.description }}</div> </div>
</div> </template>
</template> <span class="two-line-ellipsis">{{ scope.scope[scope.columnsObj.prop] }}</span>
<span class="two-line-ellipsis">{{ scope.scope.description }}</span> </el-tooltip>
</el-tooltip> <span v-else>-</span>
<span v-else>-</span>
</div>
</template> </template>
<template #auth-button="scope"> <template #auth-button="scope">
<el-button type="text" <el-button type="text"
...@@ -527,8 +525,9 @@ export default { ...@@ -527,8 +525,9 @@ export default {
}, },
{ {
label: "策略说明", label: "策略说明",
prop: "description",
minWidth: 160, minWidth: 160,
addHtml: "description", addHtml: "tooltip",
}, },
{ {
label: "执行周期", label: "执行周期",
...@@ -559,6 +558,7 @@ export default { ...@@ -559,6 +558,7 @@ export default {
label: "任务描述", label: "任务描述",
prop: "taskDescription", prop: "taskDescription",
minWidth: 160, minWidth: 160,
addHtml: "tooltip",
}, },
], ],
}, },
...@@ -1072,7 +1072,7 @@ export default { ...@@ -1072,7 +1072,7 @@ export default {
background-color: #fff; background-color: #fff;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 2; z-index: 9;
padding-right: 24px; padding-right: 24px;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!