- Complete GGZ Ecademy Nuxt.js user portal - Learning products browser and management - Member management interface - User authentication and roles - Multi-language support (NL/EN) - Vuex store for state management - Component-based architecture
This commit is contained in:
24
components/PageComponent/PageComponent.vue
Normal file
24
components/PageComponent/PageComponent.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<component :is="componentRendered" :data="componentProp.content" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
componentProp: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
componentRendered() {
|
||||
return this.componentProp.component_type.name
|
||||
? () =>
|
||||
import(
|
||||
`@/components/DynamicComponents/${this.componentProp.component_type.name}`
|
||||
)
|
||||
: null
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user