历史记录功能加入
This commit is contained in:
@@ -18,15 +18,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, onMounted } from 'vue'
|
import { ref, watch, onMounted, computed } from 'vue'
|
||||||
import Agent from './components/Agent.vue'
|
import Agent from './components/Agent.vue'
|
||||||
import Preview from './components/Preview.vue'
|
import Preview from './components/Preview.vue'
|
||||||
import VersionTreeIndex from './components/versionTree/index.vue'
|
import VersionTreeIndex from './components/versionTree/index.vue'
|
||||||
import { useProjectStore } from '@/stores'
|
import { useProjectStore } from '@/stores'
|
||||||
import { getProjectInfo } from '@/api/agent'
|
import { getProjectInfo } from '@/api/agent'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
|
|
||||||
const agentTitle = ref('Retro Sofa Sketch')
|
const agentTitle = ref('Retro Sofa Sketch')
|
||||||
const previewType = ref<'sketch' | 'report'>('sketch')
|
const previewType = ref<'sketch' | 'report'>('sketch')
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
const VersionTreeIndexRef = ref()
|
const VersionTreeIndexRef = ref()
|
||||||
const agentRef = ref()
|
const agentRef = ref()
|
||||||
@@ -47,7 +50,17 @@
|
|||||||
agentRef.value?.inputRef?.addReportTag('Restore')
|
agentRef.value?.inputRef?.addReportTag('Restore')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const proJectId = computed(() => route.params.id)
|
||||||
const projectStore = useProjectStore()
|
const projectStore = useProjectStore()
|
||||||
|
watch(
|
||||||
|
() => proJectId.value,
|
||||||
|
(newVal, oldVal) => {
|
||||||
|
if (newVal) {
|
||||||
|
projectStore.setId(newVal)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
watch(
|
watch(
|
||||||
() => projectStore.state.id,
|
() => projectStore.state.id,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user