Parcourir la source

Merge branch 'xj' of http://192.168.0.115:3000/bill/fuse-code into xj

xzw il y a 1 an
Parent
commit
d538bc229c
2 fichiers modifiés avec 21 ajouts et 4 suppressions
  1. 14 3
      src/model/app.vue
  2. 7 1
      src/views/merge/index.vue

+ 14 - 3
src/model/app.vue

@@ -14,7 +14,14 @@
         <img src="@/assets/icon_switch.png" ctrl />
       </span>
 
-      <span class="scale" :style="{ width: scaleInfo.width + 'px' }">
+      <span
+        class="scale"
+        :class="{ fullScale: full === 'map' }"
+        :style="{
+          width: scaleInfo.width + 'px',
+          color: setting?.mapType === 'dark-standard' ? '#fff' : '#000',
+        }"
+      >
         {{ getShowScale(scaleInfo.actual) }}
       </span>
     </div>
@@ -23,7 +30,7 @@
 
 <script lang="ts">
 import { defineComponent, ref, watchEffect, computed, watch, nextTick } from "vue";
-import { SceneType } from "@/store";
+import { SceneType, setting } from "@/store";
 import { params } from "@/env";
 import { fuseModel, modelProps } from "./index";
 import { modelSDKFactory } from "./platform";
@@ -215,6 +222,7 @@ export const Model = defineComponent({
 
     return {
       getShowScale,
+      setting,
       scaleInfo,
       iframeRef,
       full,
@@ -305,7 +313,6 @@ export default Model;
   position: absolute;
   left: 10px;
   bottom: 10px;
-  color: #fff;
   z-index: 1;
 
   &::after,
@@ -324,5 +331,9 @@ export default Model;
   &::after {
     right: 0;
   }
+
+  &.fullScale {
+    left: calc(var(--editor-menu-left) + var(--editor-menu-width) + 10px);
+  }
 }
 </style>

+ 7 - 1
src/views/merge/index.vue

@@ -124,12 +124,18 @@ watch(
 
 const reset = async () => {
   if (custom.currentModel && (await Dialog.confirm("确定恢复默认?此操作无法撤销"))) {
+    const rotation = getSceneModel(custom.currentModel)!.getDefaultRotation();
     Object.assign(custom.currentModel, {
       ...defaultFuseModelAttrs,
-      rotation: getSceneModel(custom.currentModel)!.getDefaultRotation(),
+      rotation: {
+        x: rotation.x,
+        y: rotation.y,
+        z: rotation.z,
+      },
     });
     await nextTick();
 
+    console.error("默认旋转值", getSceneModel(custom.currentModel)!.getDefaultRotation());
     custom.currentModel && (custom.currentModel.bottom = 0);
   }
 };