diff --git a/front/src/assets/main.scss b/front/src/assets/main.scss index d0cb26d..42feae5 100644 --- a/front/src/assets/main.scss +++ b/front/src/assets/main.scss @@ -26,11 +26,15 @@ a[href] { height: calc(100vh - 4.25rem); gap: 1.25rem; + &-title, + &-desc { + max-width: 40vw; + } &-title { - max-width: 28vw; text-align: center; font-family: 'Project Space'; + margin-top: 1rem; } h1 { @@ -38,8 +42,6 @@ a[href] { } &-desc { - max-width: 28vw; - /* text-align: center; */ font-size: 1.125rem; line-height: 1.2; } diff --git a/front/src/components/Main/index.vue b/front/src/components/Main/index.vue index fd9cfcb..7a37a0f 100644 --- a/front/src/components/Main/index.vue +++ b/front/src/components/Main/index.vue @@ -6,9 +6,11 @@ import { OrbitControls } from '@tresjs/cientos'; import MainLoadModels from './main_load_models.vue'; import { useItem } from '../../stores/item'; import { useRawData } from '../../stores/raw_data'; +import { useRoute } from 'vue-router'; const raw_dataStore = useRawData() const pageStore = useItem() +const route = useRoute() const camera = ref() const controls = ref() @@ -23,15 +25,10 @@ const controlsState = reactive({ autoRotate: true, }) +await raw_dataStore.load({ source: pageStore.page.scene_3d }) onMounted(async () => { - if (!raw_dataStore.data.id && pageStore.page.id) { - await raw_dataStore.load({ source: pageStore.page.scene_3d }) - } -}) - -watch(() => pageStore.page.id, async () => { + pageStore.load(route.params) await raw_dataStore.load({ source: pageStore.page.scene_3d }) - })