Files
myprojplanet_vite/src/components/CMyInnerPage/CMyInnerPage.ts

42 lines
992 B
TypeScript
Raw Normal View History

2021-09-16 21:08:02 +02:00
import { defineComponent, ref, onMounted } from 'vue'
2025-03-01 14:14:43 +01:00
import type { IMyPage } from 'model'
2021-09-16 21:08:02 +02:00
import { useGlobalStore } from '@store/globalStore'
2025-03-01 14:14:43 +01:00
import { CImgText } from '@src/components/CImgText'
import { CCard } from '@src/components/CCard'
import { CMyPage } from '@src/components/CMyPage'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { useRouter } from 'vue-router'
2021-09-16 21:08:02 +02:00
export default defineComponent({
name: 'CMyInnerPage',
props: {
path: {
type: String,
required: true,
},
},
components: { CImgText, CCard, CMyPage, CTitleBanner },
setup(props) {
// const heightimg
// const imgback
const rec = ref(<IMyPage | undefined>{})
const globalStore = useGlobalStore()
const $router = useRouter()
2021-09-16 21:08:02 +02:00
function mounted() {
// console.log('$route.path', $route.path)
rec.value = globalStore.getPage(props.path)
// console.log('rec', rec)
2021-09-16 21:08:02 +02:00
}
onMounted(mounted)
return {
rec,
}
},
})