bill 7 月之前
父节点
当前提交
112a60dbe9
共有 2 个文件被更改,包括 8 次插入5 次删除
  1. 3 4
      src/layout/model-list/index.vue
  2. 5 1
      src/sdk/association/fuseMode.ts

+ 3 - 4
src/layout/model-list/index.vue

@@ -48,7 +48,7 @@ import { activeModel, getSupperPanoModel } from "@/sdk/association";
 import { fuseModels, getFuseModelShowVariable } from "@/store";
 import type { FuseModel } from "@/store";
 import { currentModel, fuseModel, loadModel } from "@/model";
-import {sdk} from "@/sdk/sdk";
+import { sdk } from "@/sdk/sdk";
 
 export type ModelListProps = {
   title?: string;
@@ -73,15 +73,14 @@ const modelList = computed(() =>
   }))
 );
 
-
 const modelChangeSelect = (model: FuseModel, mode: "pano" | "fuse", f = false) => {
   if (getFuseModelShowVariable(model).value) {
     if (custom.currentModel === model && mode === custom.showMode) {
       if (!f) return;
 
-      activeModel({ showMode: "fuse", active: undefined });
+      activeModel({ showMode: "fuse", active: undefined, fore: f });
     } else {
-      activeModel({ showMode: mode, active: model });
+      activeModel({ showMode: mode, active: model, fore: f });
     }
   }
 

+ 5 - 1
src/sdk/association/fuseMode.ts

@@ -156,6 +156,7 @@ const setModels = (sdk: SDK, models: FuseModels, oldModels: FuseModels) => {
 export const activeModel = (status: {
   showMode: "fuse" | "pano";
   active?: FuseModel;
+  fore?: boolean
 }) => {
   const oldStatus = {
     showMode: custom.showMode,
@@ -196,7 +197,10 @@ export const activeModel = (status: {
 
   setTimeout(() => {
     if (status.showMode !== "pano" && model) {
-      // model && model.changeSelect(true);
+      console.error(status)
+      if (oldStatus.showMode !== 'pano' || status.fore) {
+        model && model.changeSelect(true);
+      }
     }
   }, 35);