新增首页前置加载页并等待模型就绪
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
lyf
2026-07-05 19:57:13 +08:00
parent 21d118b967
commit 4b581da81d
5 changed files with 308 additions and 1 deletions

View File

@@ -26,6 +26,8 @@
@selection-clear="handleSelectionClear"
@target-focus="handleTargetFocus"
@auto-switch="handleAutoSwitch"
@initial-model-ready="handleInitialModelReady"
@initial-model-failed="handleInitialModelFailed"
/>
<!-- #endif -->
<!-- #ifndef H5 -->
@@ -401,6 +403,8 @@ const emit = defineEmits<{
selectionClear: []
targetFocus: [result: TargetPoiFocusResult]
autoSwitch: [event: { from: 'overview' | 'floor'; to: 'overview' | 'floor'; trigger: string; distance: number }]
initialModelReady: [event: { view: IndoorViewMode; floorId?: string; elapsedMs?: number }]
initialModelFailed: [event: { view: IndoorViewMode; floorId?: string; message: string; elapsedMs?: number }]
mapTap: [location: { latitude: number; longitude: number }]
}>()
@@ -706,6 +710,14 @@ const handleAutoSwitch = (event: { from: 'overview' | 'floor'; to: 'overview' |
emit('autoSwitch', event)
}
const handleInitialModelReady = (event: { view: IndoorViewMode; floorId?: string; elapsedMs?: number }) => {
emit('initialModelReady', event)
}
const handleInitialModelFailed = (event: { view: IndoorViewMode; floorId?: string; message: string; elapsedMs?: number }) => {
emit('initialModelFailed', event)
}
const handleMapTap = (location: { latitude?: number; longitude?: number }) => {
const { latitude, longitude } = location
if (latitude !== undefined && longitude !== undefined) {