1
This commit is contained in:
parent
3b024cb6cd
commit
ede1aec0b0
|
|
@ -175,11 +175,9 @@ const initChart = async () => {
|
|||
// 添加鼠标悬浮事件监听
|
||||
chart.on("mouseover", function (params) {
|
||||
if (!params.data) return
|
||||
|
||||
// 如果是用户选择的节点,不处理鼠标悬停效果
|
||||
if (userSelectedNodeIndex.value !== null && params.dataIndex === userSelectedNodeIndex.value) {
|
||||
if (userSelectedNodeIndex.value !== null && params.dataIndex === userSelectedNodeIndex.value)
|
||||
return
|
||||
}
|
||||
|
||||
if (params.dataType === "node") {
|
||||
// 仅节点时触发相邻高亮
|
||||
|
|
|
|||
|
|
@ -35,13 +35,17 @@ const props = defineProps({
|
|||
}
|
||||
})
|
||||
|
||||
const anchorMonitorList = ref(props.anchorMonitorList)
|
||||
|
||||
const sortAnchorMonitorListByTime = (anchorMonitorList) => {
|
||||
return anchorMonitorList.sort((a, b) => {
|
||||
// 将时间字符串转换为时间戳进行比较
|
||||
return new Date(a.time.trim()) - new Date(b.time.trim())
|
||||
})
|
||||
}
|
||||
props.anchorMonitorList = sortAnchorMonitorListByTime(props.anchorMonitorList)
|
||||
|
||||
anchorMonitorList.value = sortAnchorMonitorListByTime(anchorMonitorList.value)
|
||||
|
||||
const startAutoScroll = () => {
|
||||
if (!monitorListRef.value) return
|
||||
scrollTimer = setInterval(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user