bill 8 달 전
부모
커밋
5a5098732c
3개의 변경된 파일21개의 추가작업 그리고 6개의 파일을 삭제
  1. 0 1
      src/components/path/sign.vue
  2. 0 1
      src/sdk/association/fuseMode.ts
  3. 21 4
      src/views/guide/path/edit-path.vue

+ 0 - 1
src/components/path/sign.vue

@@ -123,7 +123,6 @@ path.bus.on("linePositionChange", (position) => {
 });
 
 onUnmounted(() => {
-  console.error(path, "destory");
   path.destroy();
 });
 defineExpose(path);

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

@@ -58,7 +58,6 @@ const setModels = (sdk: SDK, models: FuseModels, oldModels: FuseModels) => {
     const itemRaw = toRaw(item);
     let sceneModel: SceneModel;
     try {
-      console.log('添加模型', itemRaw)
       sceneModel = sdk.addModel({
         ...itemRaw,
         ...modelRange,

+ 21 - 4
src/views/guide/path/edit-path.vue

@@ -163,7 +163,15 @@ import {
   showRightCtrlPanoStack,
   showRightPanoStack,
 } from "@/env";
-import { computed, onUnmounted, ref, shallowRef, watch, watchEffect } from "vue";
+import {
+  computed,
+  nextTick,
+  onUnmounted,
+  ref,
+  shallowRef,
+  watch,
+  watchEffect,
+} from "vue";
 import { isTemploraryID, Path } from "@/store";
 import { RightFillPano } from "@/layout";
 import { useViewStack } from "@/hook";
@@ -242,6 +250,7 @@ let unKeepAdding = shallowRef<() => void>();
 const keepAdding = () => {
   unKeepAdding.value && unKeepAdding.value();
   node.value?.changeCanEdit(true);
+  console.error(node.value?.changeCanEdit);
   // const hide = Message.show({ msg: "请在模型上单击选择路径点位置", type: "warning" });
 
   unKeepAdding.value = () => {
@@ -251,9 +260,17 @@ const keepAdding = () => {
   };
 };
 
-if (!props.data.points.length) {
-  keepAdding();
-}
+watch(
+  node,
+  () => {
+    if (!props.data.points.length) {
+      keepAdding();
+      console.error("keeplo");
+      // nextTick(() => stopWatch());
+    }
+  },
+  { immediate: true }
+);
 
 useViewStack(() => {
   return togetherCallback([