Browse Source

Merge branch 'v1.9.0' of http://192.168.0.115:3000/bill/fuse-code into v1.9.0

xzw 3 months ago
parent
commit
d3a3e4ede5

+ 2 - 0
src/env/index.ts

@@ -4,6 +4,7 @@ import { reactive, ref } from "vue";
 import type { FuseModel, Path, TaggingPosition, View } from "@/store";
 export const namespace = "/fusion";
 export const viewModeStack = stackFactory(ref<"full" | "auto">("auto"));
+export const recordIngStack = stackFactory(ref(false));
 export const showToolbarStack = stackFactory(ref<boolean>(false));
 export const showHeadBarStack = stackFactory(ref<boolean>(true));
 export const showRightPanoStack = stackFactory(ref<boolean>(true));
@@ -36,6 +37,7 @@ export const showTaggingPositionsStack = stackFactory(
 export const currentViewStack = stackFactory(ref<View>());
 
 export const custom = flatStacksValue({
+  recordIng: recordIngStack,
   viewMode: viewModeStack,
   showToolbar: showToolbarStack,
   showRightPano: showRightPanoStack,

+ 5 - 2
src/layout/scene-list/index.vue

@@ -69,6 +69,7 @@ import List from "@/components/list/index.vue";
 import ModelList from "../model-list/index.vue";
 import { fuseModel, getModelTypeDesc } from "@/model";
 import { Button } from "ant-design-vue";
+import { custom } from "@/env";
 
 import type { ModelType, FuseModelType } from "@/model";
 import type { Scene } from "@/store";
@@ -124,8 +125,10 @@ const stopWatch = watch(
   list,
   () => {
     if (!list.value.some((model) => model.raw === fuseModel) && list.value.length) {
-      updateCurrent(list.value[0].raw as any);
-      nextTick(() => stopWatch());
+      if (!custom.recordIng) {
+        updateCurrent(list.value[0].raw as any);
+        nextTick(() => stopWatch());
+      }
     }
   },
   { immediate: true }

+ 7 - 1
src/model/index.ts

@@ -1,7 +1,7 @@
 import App from './app.vue'
 import { appEl, SceneTypeDesc, scenes } from '@/store'
 import { mount, deepIsRevise } from '@/utils'
-import { reactive, ref } from 'vue'
+import { reactive, ref, watchEffect } from 'vue'
 
 import type { Scene } from '@/store'
 import type { ModelExpose } from './platform'
@@ -14,6 +14,9 @@ export type { ModelExpose }
 
 export const fuseModel = Symbol('fuse')
 export const currentModel = ref<ModelType>(fuseModel)
+watchEffect(() => {
+  console.error(currentModel.value, 'currentModel')
+}, { flush: 'sync'  })
 export const modelProps: ModelProps = reactive({ type: currentModel, callback: null })
 export const getModelTypeDesc = (model: ModelType) => {
   if (model === fuseModel) {
@@ -36,6 +39,8 @@ const _loadModel = (() => {
   let oldResult: Promise<ModelExpose>
 
   return (modelType: ModelType) => {
+    console.log(oldModelType, modelType, 'oldModelType')
+    console.log(deepIsRevise(oldModelType, modelType), 'oldModelType')
     if (!deepIsRevise(oldModelType, modelType)) {
       return oldResult
     }
@@ -49,6 +54,7 @@ const _loadModel = (() => {
           resolve(data)
         }
       }
+      console.log(modelType, oldModelType, '不是吧')
       currentModel.value = modelType
     })
   }

+ 5 - 2
src/views/record/shot-imitate.vue

@@ -43,12 +43,15 @@ const component = shallowRef<Component | null>(null)
 
 watchEffect(() => {
   const route = getRouteConfig(activeName.value)
-  route?.component().then(comp => component.value = comp.default)
+  route?.component().then(comp => {
+    component.value = comp.default
+  })
 })
-
+"D:/A-project/fuse-code/src/views/summary/index.vue"
 const showLeftPano = ref(false)
 
 watch(currentModel, () => {
+  console.log(currentModel.value, '我的天')
   if (currentModel.value) {
     showLeftPano.value = false
   }

+ 2 - 0
src/views/record/shot.vue

@@ -75,6 +75,7 @@ import {
   bottomBarHeightStack,
   showHeadBarStack,
   showLeftPanoStack,
+  recordIngStack
 } from "@/env";
 import { appEl } from "@/store";
 import { useViewStack } from "@/hook";
@@ -113,6 +114,7 @@ export default defineComponent({
     const countdown = ref(0);
     let interval: NodeJS.Timer;
     let recordIng = ref(false);
+    recordIngStack.push(recordIng);
     const start = () => {
       if (size.value > MAX_SIZE || pauseTime.value < 2000) {
         return Message.warning("已超出限制大小无法继续录制,可保存后继续录制!");