优化列表多余滚动条、图形提示框优化
This commit is contained in:
@@ -166,9 +166,9 @@
|
||||
legend: legendData,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
confine: true, // 将tooltip限制在图表的区域内,防止超出屏幕[1,7](@ref)
|
||||
enterable: true, // 关键配置:允许鼠标移入tooltip内部[1,2,7](@ref)
|
||||
extraCssText: 'z-index: 2000;', // 设置一个较高的层级
|
||||
confine: true, // 将tooltip限制在图表的区域内,防止超出屏幕
|
||||
enterable: dataXY.tooltipFormatter ? true : false, // 关键配置:允许鼠标移入tooltip内部
|
||||
extraCssText: dataXY.tooltipFormatter ? 'z-index: 2000;' : 'z-index: 2000;background-color: #ffffffb3;', // 设置一个较高的层级
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
label: {
|
||||
@@ -198,11 +198,11 @@
|
||||
const date = params[0].name;
|
||||
// 构建提示框HTML内容
|
||||
let html = `<div><div>${date}</div>`;
|
||||
if (params && params.length >= 7) {
|
||||
html = `<div style="max-height: 175px; overflow-y: auto;">
|
||||
<div>${date}</div>
|
||||
`;
|
||||
}
|
||||
// if (params && params.length >= 7) {
|
||||
// html = `<div style="max-height: 175px; overflow-y: auto;">
|
||||
// <div>${date}</div>
|
||||
// `;
|
||||
// }
|
||||
// 遍历所有系列
|
||||
params.forEach(paramItem => {
|
||||
if (dataXY.tooltipFormatter && dataXY.tooltipFormatter.customList) {
|
||||
@@ -237,6 +237,18 @@
|
||||
</div>
|
||||
<span style="font-weight: bold; color: #2f3542;margin-left:20px;"> ${paramItem.value || paramItem.value === 0 ? paramItem.value : '-'}</span>
|
||||
</div>`;
|
||||
// 目前应用与服务器管理挂载文件处
|
||||
if (dataXY && dataXY.otherModel) {
|
||||
html += `
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin: 4px 0;">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<span style="display: inline-block; width: 10px; height: 10px; border-radius: 50%;margin-right: 8px;"></span>
|
||||
<span style="color: #57606f;">${dataXY.otherModel.name} </span>
|
||||
</div>
|
||||
<span style="font-weight: bold; color: #2f3542;margin-left:20px;"> ${dataXY.otherModel.value[paramItem.dataIndex] || dataXY.otherModel.value[paramItem.dataIndex] === 0 ? dataXY.otherModel.value[paramItem.dataIndex] : '-'}</span>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
});
|
||||
return html += `</div>`;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="w100 h100">
|
||||
<div class="w100">
|
||||
<!-- 表格头部按钮 -->
|
||||
<el-row :gutter="10" style="margin: 0 0 8px 0;">
|
||||
<template v-if="config && config.tableButton && config.tableButton.top">
|
||||
|
||||
Reference in New Issue
Block a user