瀏覽代碼

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

houzekong 1 天之前
父節點
當前提交
e890aa4d83
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/views/vent/monitorManager/fanLocalMonitor/fanLocal.threejs.ts

+ 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;
 };
 
 // 为了兼容性而添加的方法导出