Browse Source

修改设置背景默认值触发了isEdit问题

wangfumin 3 months ago
parent
commit
63a24d08e3

+ 1 - 0
src/layout/edit/scene-edit.vue

@@ -26,6 +26,7 @@ import { asyncTimeout } from "@/utils";
 const loaded = ref(false);
 const initialSys = async () => {
   await Promise.all([initialFuseModels(), initialScenes()]);
+  console.log(fuseModel, 777777)
   await loadModel(fuseModel);
   await asyncTimeout(1000);
   loaded.value = true;

+ 1 - 1
src/model/index.ts

@@ -23,7 +23,7 @@ export const getModelTypeDesc = (model: ModelType) => {
   }
 }
 export const getModelDesc = (model: ModelType) => {
-  console.log(model)
+  console.log(model, 66666)
   if (model === fuseModel) {
     return '融合场景'
   } else {

+ 1 - 1
src/views/setting/index.vue

@@ -11,7 +11,7 @@
 
     <ui-group title="设置天空">
       <ui-group-option>
-        <selectBack :value="[setting?.back, setting?.mapId]" @update:value="changeBack" />
+        <selectBack :value="setting?.back || setting?.mapId ? [setting?.back, setting?.mapId] : ['dt', 1]" @update:value="changeBack" />
       </ui-group-option>
     </ui-group>
   </RightFillPano>

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

@@ -101,9 +101,9 @@ const backs = computed(() => [
 // 添加默认选中逻辑
 onMounted(() => {
   // 如果没有获取到默认值(value[0]和value[1]都为空),则默认选中"无"选项
-  if (!props.value[0] && !props.value[1]) {
-    emit("update:value", ["dt", 1]);
-  }
+  // if (!props.value[0] && !props.value[1]) {
+  //   emit("update:value", ["dt", 1]);
+  // }
 });
 
 const activeParent = computed(() => {