feat RTK热力图绘制
This commit is contained in:
@@ -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' })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user