feat RTK热力图绘制

This commit is contained in:
Ironsp
2026-09-17 16:20:57 +08:00
parent 1ae0371c18
commit c1d2958095
10 changed files with 843 additions and 65 deletions

View File

@@ -7,10 +7,20 @@ import { getCurrentInstance, nextTick, onMounted, onUnmounted, ref, watch } from
import { useCurrentProject } from '@/composables/useCurrentProject'
import { createMockRtkStream } from '@/mock/rtkTrack'
const props = withDefaults(defineProps<{
/** canvas-id,同页多实例时需唯一 */
canvasId?: string
/** 是否点击跳转全屏 RTK 页(全屏页内应关闭) */
navigateOnClick?: boolean
}>(), {
canvasId: 'rtkTrackCanvas',
navigateOnClick: true,
})
const { hasCurrentProject } = useCurrentProject()
const instance = getCurrentInstance()?.proxy
const CANVAS_ID = 'rtkTrackCanvas'
const CANVAS_ID = props.canvasId
const PADDING = 28
const ROLLER_WIDTH = 14
const MIN_H = 160
@@ -31,6 +41,8 @@ let fixedMaxLat = 0 // 北端固定(起点一侧)
let pxPerMeter = 1
function goToRtk() {
if (!props.navigateOnClick)
return
uni.navigateTo({ url: '/pages/rtk/index' })
}