优化资金

This commit is contained in:
ljx
2025-08-26 19:25:15 +08:00
parent 4e08f7387f
commit c1d6a8d92c
3 changed files with 23 additions and 15 deletions

View File

@ -23,7 +23,7 @@ const props = defineProps({
},
// 数值
value: {
type: Number,
type: Number || String,
default: 205805.17
},
// 单位

View File

@ -147,14 +147,21 @@ const initEcharts = () => {
},
tooltip: {
trigger: 'item',
formatter: (params: any) => {
// 自定义提示框内容,显示更多项目信息
const data = params.data;
return `
<div style="font-weight: bold;">${data.name}</div>
<div>地点:${data.projectSite}</div>
<div>经纬度:${data.value[0].toFixed(6)}, ${data.value[1].toFixed(6)}</div>
`;
backgroundColor: 'rgba(3, 26, 52, 0.8)',
borderColor: '#1e3a6e',
textStyle: {
color: '#fff'
},
formatter: function (params: any) {
if (params.data) {
// 处理散点数据
const data = params.data;
return `
<div style="font-weight: bold;">${data.name}</div>
<div>地点:${data.projectSite}</div>
<div>经纬度:${data.value[0].toFixed(6)}, ${data.value[1].toFixed(6)}</div>
`;
}
}
},
series: [
@ -219,4 +226,4 @@ onUnmounted(() => {
height: 60%;
}
}
</style>
</style>