Răsfoiți Sursa

[FIx 0000] 局部风机路由多次切换时模型显示异常的问题修复

houzekong 1 zi în urmă
părinte
comite
e890aa4d83

+ 5 - 0
src/views/vent/monitorManager/fanLocalMonitor/fanLocal.threejs.ts

@@ -192,6 +192,11 @@ export const destroy = () => {
     if (item.context) item.context.destroy();
   });
   model.destroy();
+  // 清除模块级状态,确保第二次进入时重新初始化
+  model = null;
+  group = undefined;
+  cacheKey = '';
+  modelContextList.length = 0;
 };
 
 // 为了兼容性而添加的方法导出