feat: 优化运动监控页面的生命周期管理,调整场景读取和机器人初始化顺序,提升性能和用户体验
This commit is contained in:
parent
6fb243370d
commit
32469bf6a7
@ -352,15 +352,15 @@ onMounted(() => {
|
|||||||
|
|
||||||
//#region 生命周期管理
|
//#region 生命周期管理
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await readScene();
|
|
||||||
await editor.value?.initRobots();
|
|
||||||
|
|
||||||
if (mode.value === 'live') {
|
if (mode.value === 'live') {
|
||||||
|
await readScene();
|
||||||
await monitorScene();
|
await monitorScene();
|
||||||
} else {
|
} else {
|
||||||
playback.connect(props.sid);
|
playback.connect(props.sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await editor.value?.initRobots();
|
||||||
|
|
||||||
storageLocationService.value?.startMonitoring({ interval: 1 });
|
storageLocationService.value?.startMonitoring({ interval: 1 });
|
||||||
// 自动保存和恢复视图状态
|
// 自动保存和恢复视图状态
|
||||||
await handleAutoSaveAndRestoreViewState();
|
await handleAutoSaveAndRestoreViewState();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user