|
@@ -85,7 +85,7 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import { loadPack, togetherCallback, getFileUrl, asyncTimeout } from '@/utils'
|
|
import { loadPack, togetherCallback, getFileUrl, asyncTimeout } from '@/utils'
|
|
import { sdk, playSceneGuide, pauseSceneGuide, isScenePlayIng } from '@/sdk'
|
|
import { sdk, playSceneGuide, pauseSceneGuide, isScenePlayIng } from '@/sdk'
|
|
-import { createGuidePath, isTemploraryID, useAutoSetMode, guides, getGuidePaths } from '@/store'
|
|
|
|
|
|
+import { createGuidePath, isTemploraryID, useAutoSetMode, guides, getGuidePaths, guidePaths } from '@/store'
|
|
import { Dialog, Message } from 'bill/index'
|
|
import { Dialog, Message } from 'bill/index'
|
|
import { useViewStack } from '@/hook'
|
|
import { useViewStack } from '@/hook'
|
|
import { nextTick, ref, toRaw, watchEffect } from 'vue'
|
|
import { nextTick, ref, toRaw, watchEffect } from 'vue'
|
|
@@ -104,7 +104,6 @@ const updatePathInfo = (index: number, calcInfo: CalcPathProps[1]) => {
|
|
calcInfo
|
|
calcInfo
|
|
)
|
|
)
|
|
Object.assign(paths.value[index], info)
|
|
Object.assign(paths.value[index], info)
|
|
- console.log(info)
|
|
|
|
}
|
|
}
|
|
|
|
|
|
useViewStack(() =>
|
|
useViewStack(() =>
|
|
@@ -122,7 +121,11 @@ useAutoSetMode(paths, {
|
|
Dialog.alert('无法保存空路径导览!')
|
|
Dialog.alert('无法保存空路径导览!')
|
|
throw '无法保存空路径导览!'
|
|
throw '无法保存空路径导览!'
|
|
}
|
|
}
|
|
|
|
+ const oldPaths = getGuidePaths(props.data)
|
|
props.data.cover = paths.value[0].cover
|
|
props.data.cover = paths.value[0].cover
|
|
|
|
+ guidePaths.value = guidePaths.value
|
|
|
|
+ .filter(path => !oldPaths.includes(path))
|
|
|
|
+ .concat(paths.value)
|
|
if (isTemploraryID(props.data.id)) {
|
|
if (isTemploraryID(props.data.id)) {
|
|
guides.value.push(props.data)
|
|
guides.value.push(props.data)
|
|
}
|
|
}
|
|
@@ -139,6 +142,7 @@ const addPath = () => {
|
|
const index = paths.value.indexOf(current.value) + 1
|
|
const index = paths.value.indexOf(current.value) + 1
|
|
const path: GuidePath = createGuidePath({
|
|
const path: GuidePath = createGuidePath({
|
|
...pose,
|
|
...pose,
|
|
|
|
+ guideId: props.data.id,
|
|
cover: { url: dataURL, blob }
|
|
cover: { url: dataURL, blob }
|
|
})
|
|
})
|
|
paths.value.splice(index, 0, path)
|
|
paths.value.splice(index, 0, path)
|