bill 4 tháng trước cách đây
mục cha
commit
249f0d501d

+ 13 - 13
src/layout/edit/fuse-left-pano.vue

@@ -26,19 +26,19 @@ import { LeftPano } from "@/layout";
 
 import type { FuseModel } from "@/store";
 
-watch(
-  () => custom.currentModel,
-  (model, oldModel) => {
-    if (oldModel && getFuseModelShowVariable(oldModel).value) {
-      getSceneModel(oldModel)?.changeSelect(false);
-      activeModel({ showMode: "fuse" });
-    }
-    if (model && getFuseModelShowVariable(model).value) {
-      getSceneModel(model)?.changeSelect(true);
-      activeModel({ active: model, showMode: "fuse" });
-    }
-  }
-);
+// watch(
+//   () => custom.currentModel,
+//   (model, oldModel) => {
+//     if (oldModel && getFuseModelShowVariable(oldModel).value) {
+//       getSceneModel(oldModel)?.changeSelect(false);
+//       activeModel({ showMode: "fuse" });
+//     }
+//     if (model && getFuseModelShowVariable(model).value) {
+//       getSceneModel(model)?.changeSelect(true);
+//       activeModel({ active: model, showMode: "fuse" });
+//     }
+//   }
+// );
 
 const modelChangeSelect = (model: FuseModel) => {
   custom.currentModel = model === custom.currentModel ? null : model;

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

@@ -197,7 +197,6 @@ export const activeModel = (status: {
 
   setTimeout(() => {
     if (status.showMode !== "pano" && model) {
-      console.error(status)
       if (oldStatus.showMode !== 'pano' || status.fore) {
         model && model.changeSelect(true);
       }

+ 13 - 3
src/views/setting/select-back.vue

@@ -13,16 +13,26 @@
             />
           </div>
           <template #overlay>
-            <Menu :selectedKeys="[value]">
+            <Menu
+              :selectedKeys="[value]"
+              :default-active="value[1]?.toString()"
+              active-text-color="#ffd04b"
+            >
               <MenuItem
                 v-for="item in back.children"
                 @click="
                   value[1] !== item.value &&
                     $emit('update:value', [undefined, item.value])
                 "
-                :key="item.value"
+                :index="item.value.toString()"
               >
-                {{ item.label }}
+                <span
+                  :style="{
+                    color:
+                      value[1] === item.value ? 'var(--colors-primary-base) ' : '#fff',
+                  }"
+                  >{{ item.label }}</span
+                >
               </MenuItem>
             </Menu>
           </template>