Files
newfreeplanet_OLD/src/components/CShowContentPage/CShowContentPage.ts
2022-11-29 13:59:18 +01:00

41 lines
846 B
TypeScript
Executable File

import { defineComponent, ref, computed, PropType, toRef, onMounted, onBeforeUnmount } from 'vue'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { tools } from '@store/Modules/tools'
import { Logo } from '@/components/logo'
import { LandingFooter } from '@/components/LandingFooter'
import { IMyPage } from 'model'
export default defineComponent({
name: 'CShowContentPage',
components: {Logo, LandingFooter},
props: {
path: {
type: String,
required: true,
},
},
setup(props) {
const { t } = useI18n();
const rec = ref<IMyPage | null>(null)
const globalStore = useGlobalStore()
async function created() {
rec.value = await globalStore.loadPage(props.path)
}
created()
return {
t,
tools,
rec,
}
},
})