diff --git a/src/types/enum.ts b/src/types/enum.ts index 519775e..889e944 100644 --- a/src/types/enum.ts +++ b/src/types/enum.ts @@ -3,11 +3,11 @@ export const FlowType = { /** 主流程 */ MAIN: 'main', /** 历史流程 */ - HISTORICAL: 'historical', + HISTORY: 'history', /** 历史流程-Outfit */ - H_OUTFIT: 'historical-outfit', + H_OUTFIT: 'history-outfit', /** 历史流程-Tryon */ - H_TRYON: 'historical-tryon', + H_TRYON: 'history-tryon', /** 历史流程-AI */ - H_AI: 'historical-ai', + H_AI: 'history-ai', } \ No newline at end of file diff --git a/src/views/Workshop/creation/creation-list.vue b/src/views/Workshop/creation/creation-list.vue index 53756aa..83e3e92 100644 --- a/src/views/Workshop/creation/creation-list.vue +++ b/src/views/Workshop/creation/creation-list.vue @@ -1,367 +1,459 @@ diff --git a/src/views/Workshop/creation/index.vue b/src/views/Workshop/creation/index.vue index 6a0bb2f..37ead49 100644 --- a/src/views/Workshop/creation/index.vue +++ b/src/views/Workshop/creation/index.vue @@ -2,23 +2,25 @@ import { ref, reactive, onMounted, watch, computed } from 'vue' import CreationList from '@/views/Workshop/creation/creation-list.vue' import CreationDetails from '@/views/Workshop/creation/creation-details.vue' - - import { useRouter } from 'vue-router' + import { FlowType } from '@/types/enum' + import { useRouter, useRoute } from 'vue-router' const router = useRouter() - const styleUrl = computed(() => router.currentRoute.value.query.styleUrl); + const route = useRoute() + const styleUrl = computed(() => router.currentRoute.value.query.styleUrl) const emit = defineEmits(['view-type']) watch( () => router.currentRoute.value, () => emit('view-type', 1) ) - + const isChooseOne = computed(() => route.query.flowType === FlowType.HISTORY) + onMounted(() => { emit('view-type', 1) }) diff --git a/src/views/Workshop/index.vue b/src/views/Workshop/index.vue index 7ac4982..55d95c6 100644 --- a/src/views/Workshop/index.vue +++ b/src/views/Workshop/index.vue @@ -1,7 +1,9 @@